Changeset 115451 in webkit


Ignore:
Timestamp:
Apr 27, 2012 11:05:58 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Christophe Dumez <Christophe Dumez> 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:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r115450 r115451  
     12012-04-27  Christophe Dumez  <christophe.dumez@intel.com>
     2
     3        [EFL] ResourceError domain needs to be properly set in FrameLoaderClient
     4        https://bugs.webkit.org/show_bug.cgi?id=84129
     5
     6        Reviewed by Nate Chapin.
     7
     8        Unskip the tests which require EFL's DumpRenderTree to support
     9        LayoutTestController's dumpResourceLoadCallbacks() and print out
     10        correctly information about resource loading errors.
     11
     12        * platform/efl/Skipped:
     13
    1142012-04-27  Dimitri Glazkov  <dglazkov@chromium.org>
    215
  • trunk/LayoutTests/platform/efl/Skipped

    r115415 r115451  
    996996http/tests/multipart/policy-ignore-crash.php
    997997http/tests/security/feed-urls-from-remote.html
    998 
    999 # ResourceError domain needs to be properly set in FrameLoaderClient
    1000 # https://bugs.webkit.org/show_bug.cgi?id=84129
    1001 http/tests/misc/window-dot-stop.html
    1002 http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html
    1003 http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html
    1004 http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html
    1005 http/tests/security/XFrameOptions/x-frame-options-deny.html
    1006 http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html
    1007 http/tests/xmlhttprequest/abort-should-cancel-load.html
    1008998
    1009999# Test times out (via GTK+)
  • trunk/Source/WebKit/efl/ChangeLog

    r115449 r115451  
     12012-04-27  Christophe Dumez  <christophe.dumez@intel.com>
     2
     3        [EFL] ResourceError domain needs to be properly set in FrameLoaderClient
     4        https://bugs.webkit.org/show_bug.cgi?id=84129
     5
     6        Reviewed by Nate Chapin.
     7
     8        Properly set ResourceError objects' domain instead of using a generic
     9        one. This allows WebKit and NSURL errors to be distinguished, which is
     10        required to properly print out information in EFL's DumpRenderTree
     11        when dumpResourceLoadCallbacks() returns true.
     12
     13        * WebCoreSupport/FrameLoaderClientEfl.cpp:
     14        (WebCore::FrameLoaderClientEfl::cancelledError):
     15        (WebCore::FrameLoaderClientEfl::blockedError):
     16        (WebCore::FrameLoaderClientEfl::cannotShowURLError):
     17        (WebCore::FrameLoaderClientEfl::interruptedForPolicyChangeError):
     18        (WebCore::FrameLoaderClientEfl::cannotShowMIMETypeError):
     19        (WebCore::FrameLoaderClientEfl::fileDoesNotExistError):
     20        (WebCore::FrameLoaderClientEfl::pluginWillHandleLoadError):
     21
    1222012-04-27  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
    223
  • trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp

    r115415 r115451  
    840840};
    841841
     842// Domains used for ResourceError
     843const char* const NSURLErrorDomain = "NSURLErrorDomain";
     844const char* const WebKitErrorDomain = "WebKitErrorDomain";
     845
    842846ResourceError FrameLoaderClientEfl::cancelledError(const ResourceRequest& request)
    843847{
    844     ResourceError error("Error", -999, request.url().string(),
     848    ResourceError error(NSURLErrorDomain, -999, request.url().string(),
    845849                        "Request cancelled");
    846850    error.setIsCancellation(true);
     
    850854ResourceError FrameLoaderClientEfl::blockedError(const ResourceRequest& request)
    851855{
    852     return ResourceError("Error", WebKitErrorCannotUseRestrictedPort, request.url().string(),
     856    return ResourceError(WebKitErrorDomain, WebKitErrorCannotUseRestrictedPort, request.url().string(),
    853857                         "Request blocked");
    854858}
     
    856860ResourceError FrameLoaderClientEfl::cannotShowURLError(const ResourceRequest& request)
    857861{
    858     return ResourceError("Error", WebKitErrorCannotShowURL, request.url().string(),
     862    return ResourceError(WebKitErrorDomain, WebKitErrorCannotShowURL, request.url().string(),
    859863                         "Cannot show URL");
    860864}
     
    862866ResourceError FrameLoaderClientEfl::interruptedForPolicyChangeError(const ResourceRequest& request)
    863867{
    864     return ResourceError("Error", WebKitErrorFrameLoadInterruptedByPolicyChange,
     868    return ResourceError(WebKitErrorDomain, WebKitErrorFrameLoadInterruptedByPolicyChange,
    865869                         request.url().string(), "Frame load interrupted by policy change");
    866870}
     
    868872ResourceError FrameLoaderClientEfl::cannotShowMIMETypeError(const ResourceResponse& response)
    869873{
    870     return ResourceError("Error", WebKitErrorCannotShowMIMEType, response.url().string(),
     874    return ResourceError(NSURLErrorDomain, WebKitErrorCannotShowMIMEType, response.url().string(),
    871875                         "Cannot show mimetype");
    872876}
     
    874878ResourceError FrameLoaderClientEfl::fileDoesNotExistError(const ResourceResponse& response)
    875879{
    876     return ResourceError("Error", -998 /* ### */, response.url().string(),
     880    return ResourceError(NSURLErrorDomain, -998 /* ### */, response.url().string(),
    877881                         "File does not exist");
    878882}
     
    880884ResourceError FrameLoaderClientEfl::pluginWillHandleLoadError(const ResourceResponse& response)
    881885{
    882     return ResourceError("Error", WebKitErrorPluginWillHandleLoad, response.url().string(),
     886    return ResourceError(WebKitErrorDomain, WebKitErrorPluginWillHandleLoad, response.url().string(),
    883887                         "Plugin will handle load");
    884888}
Note: See TracChangeset for help on using the changeset viewer.