Title: [115451] trunk
Revision
115451
Author
[email protected]
Date
2012-04-27 11:05:58 -0700 (Fri, 27 Apr 2012)

Log Message

[EFL] ResourceError domain needs to be properly set in FrameLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=84129

Patch by Christophe Dumez <[email protected]> on 2012-04-27
Reviewed by Nate Chapin.

Source/WebKit/efl:

Properly set ResourceError objects' domain instead of using a generic
one. This allows WebKit and NSURL errors to be distinguished, which is
required to properly print out information in EFL's DumpRenderTree
when dumpResourceLoadCallbacks() returns true.

* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::cancelledError):
(WebCore::FrameLoaderClientEfl::blockedError):
(WebCore::FrameLoaderClientEfl::cannotShowURLError):
(WebCore::FrameLoaderClientEfl::interruptedForPolicyChangeError):
(WebCore::FrameLoaderClientEfl::cannotShowMIMETypeError):
(WebCore::FrameLoaderClientEfl::fileDoesNotExistError):
(WebCore::FrameLoaderClientEfl::pluginWillHandleLoadError):

LayoutTests:

Unskip the tests which require EFL's DumpRenderTree to support
LayoutTestController's dumpResourceLoadCallbacks() and print out
correctly information about resource loading errors.

* platform/efl/Skipped:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (115450 => 115451)


--- trunk/LayoutTests/ChangeLog	2012-04-27 18:03:07 UTC (rev 115450)
+++ trunk/LayoutTests/ChangeLog	2012-04-27 18:05:58 UTC (rev 115451)
@@ -1,3 +1,16 @@
+2012-04-27  Christophe Dumez  <[email protected]>
+
+        [EFL] ResourceError domain needs to be properly set in FrameLoaderClient
+        https://bugs.webkit.org/show_bug.cgi?id=84129
+
+        Reviewed by Nate Chapin.
+
+        Unskip the tests which require EFL's DumpRenderTree to support
+        LayoutTestController's dumpResourceLoadCallbacks() and print out
+        correctly information about resource loading errors.
+
+        * platform/efl/Skipped:
+
 2012-04-27  Dimitri Glazkov  <[email protected]>
 
         [Chromium] platform/chromium/media/video-capture-preview.html is a flaky crash.

Modified: trunk/LayoutTests/platform/efl/Skipped (115450 => 115451)


--- trunk/LayoutTests/platform/efl/Skipped	2012-04-27 18:03:07 UTC (rev 115450)
+++ trunk/LayoutTests/platform/efl/Skipped	2012-04-27 18:05:58 UTC (rev 115451)
@@ -996,16 +996,6 @@
 http/tests/multipart/policy-ignore-crash.php
 http/tests/security/feed-urls-from-remote.html
 
-# ResourceError domain needs to be properly set in FrameLoaderClient
-# https://bugs.webkit.org/show_bug.cgi?id=84129
-http/tests/misc/window-dot-stop.html
-http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html
-http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html
-http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html
-http/tests/security/XFrameOptions/x-frame-options-deny.html
-http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html
-http/tests/xmlhttprequest/abort-should-cancel-load.html
-
 # Test times out (via GTK+)
 # https://bugs.webkit.org/show_bug.cgi?id=64085
 http/tests/misc/iframe-reparenting-id-collision.html

Modified: trunk/Source/WebKit/efl/ChangeLog (115450 => 115451)


--- trunk/Source/WebKit/efl/ChangeLog	2012-04-27 18:03:07 UTC (rev 115450)
+++ trunk/Source/WebKit/efl/ChangeLog	2012-04-27 18:05:58 UTC (rev 115451)
@@ -1,3 +1,24 @@
+2012-04-27  Christophe Dumez  <[email protected]>
+
+        [EFL] ResourceError domain needs to be properly set in FrameLoaderClient
+        https://bugs.webkit.org/show_bug.cgi?id=84129
+
+        Reviewed by Nate Chapin.
+
+        Properly set ResourceError objects' domain instead of using a generic
+        one. This allows WebKit and NSURL errors to be distinguished, which is
+        required to properly print out information in EFL's DumpRenderTree
+        when dumpResourceLoadCallbacks() returns true.
+
+        * WebCoreSupport/FrameLoaderClientEfl.cpp:
+        (WebCore::FrameLoaderClientEfl::cancelledError):
+        (WebCore::FrameLoaderClientEfl::blockedError):
+        (WebCore::FrameLoaderClientEfl::cannotShowURLError):
+        (WebCore::FrameLoaderClientEfl::interruptedForPolicyChangeError):
+        (WebCore::FrameLoaderClientEfl::cannotShowMIMETypeError):
+        (WebCore::FrameLoaderClientEfl::fileDoesNotExistError):
+        (WebCore::FrameLoaderClientEfl::pluginWillHandleLoadError):
+
 2012-04-27  Mikhail Pozdnyakov  <[email protected]>
 
         [EFL] tabsToLinks ewk_view setting

Modified: trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp (115450 => 115451)


--- trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp	2012-04-27 18:03:07 UTC (rev 115450)
+++ trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp	2012-04-27 18:05:58 UTC (rev 115451)
@@ -839,9 +839,13 @@
     WebKitErrorPluginWillHandleLoad = 204
 };
 
+// Domains used for ResourceError
+const char* const NSURLErrorDomain = "NSURLErrorDomain";
+const char* const WebKitErrorDomain = "WebKitErrorDomain";
+
 ResourceError FrameLoaderClientEfl::cancelledError(const ResourceRequest& request)
 {
-    ResourceError error("Error", -999, request.url().string(),
+    ResourceError error(NSURLErrorDomain, -999, request.url().string(),
                         "Request cancelled");
     error.setIsCancellation(true);
     return error;
@@ -849,37 +853,37 @@
 
 ResourceError FrameLoaderClientEfl::blockedError(const ResourceRequest& request)
 {
-    return ResourceError("Error", WebKitErrorCannotUseRestrictedPort, request.url().string(),
+    return ResourceError(WebKitErrorDomain, WebKitErrorCannotUseRestrictedPort, request.url().string(),
                          "Request blocked");
 }
 
 ResourceError FrameLoaderClientEfl::cannotShowURLError(const ResourceRequest& request)
 {
-    return ResourceError("Error", WebKitErrorCannotShowURL, request.url().string(),
+    return ResourceError(WebKitErrorDomain, WebKitErrorCannotShowURL, request.url().string(),
                          "Cannot show URL");
 }
 
 ResourceError FrameLoaderClientEfl::interruptedForPolicyChangeError(const ResourceRequest& request)
 {
-    return ResourceError("Error", WebKitErrorFrameLoadInterruptedByPolicyChange,
+    return ResourceError(WebKitErrorDomain, WebKitErrorFrameLoadInterruptedByPolicyChange,
                          request.url().string(), "Frame load interrupted by policy change");
 }
 
 ResourceError FrameLoaderClientEfl::cannotShowMIMETypeError(const ResourceResponse& response)
 {
-    return ResourceError("Error", WebKitErrorCannotShowMIMEType, response.url().string(),
+    return ResourceError(NSURLErrorDomain, WebKitErrorCannotShowMIMEType, response.url().string(),
                          "Cannot show mimetype");
 }
 
 ResourceError FrameLoaderClientEfl::fileDoesNotExistError(const ResourceResponse& response)
 {
-    return ResourceError("Error", -998 /* ### */, response.url().string(),
+    return ResourceError(NSURLErrorDomain, -998 /* ### */, response.url().string(),
                          "File does not exist");
 }
 
 ResourceError FrameLoaderClientEfl::pluginWillHandleLoadError(const ResourceResponse& response)
 {
-    return ResourceError("Error", WebKitErrorPluginWillHandleLoad, response.url().string(),
+    return ResourceError(WebKitErrorDomain, WebKitErrorPluginWillHandleLoad, response.url().string(),
                          "Plugin will handle load");
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to