Changeset 207582 in webkit


Ignore:
Timestamp:
Oct 19, 2016 5:47:39 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Re-enable URLParser for non-Safari Cocoa apps after r207321
https://bugs.webkit.org/show_bug.cgi?id=163690

Patch by Alex Christensen <achristensen@webkit.org> on 2016-10-19
Reviewed by Darin Adler.

Source/WebCore:

I disabled the URLParser for non-Safari applications in r207305
to give me time to make URLParser more compatible, which I did in r207321

Updated some API tests which will be investigated in
https://bugs.webkit.org/show_bug.cgi?id=163127

  • platform/URLParser.cpp:

(WebCore::URLParser::setEnabled):
(WebCore::URLParser::enabled):

  • testing/js/WebCoreTestSupport.cpp:

(WebCoreTestSupport::setURLParserEnabled): Deleted.

  • testing/js/WebCoreTestSupport.h:

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(DumpRenderTreeMain):

  • TestWebKitAPI/Tests/WebKit2Cocoa/LoadInvalidURLRequest.mm:

(-[LoadInvalidURLNavigationActionDelegate webView:didFailProvisionalNavigation:withError:]):

  • TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm:

(TestWebKitAPI::TEST):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::TestController):

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r207581 r207582  
     12016-10-19  Alex Christensen  <achristensen@webkit.org>
     2
     3        Re-enable URLParser for non-Safari Cocoa apps after r207321
     4        https://bugs.webkit.org/show_bug.cgi?id=163690
     5
     6        Reviewed by Darin Adler.
     7
     8        I disabled the URLParser for non-Safari applications in r207305
     9        to give me time to make URLParser more compatible, which I did in r207321
     10
     11        Updated some API tests which will be investigated in
     12        https://bugs.webkit.org/show_bug.cgi?id=163127
     13
     14        * platform/URLParser.cpp:
     15        (WebCore::URLParser::setEnabled):
     16        (WebCore::URLParser::enabled):
     17        * testing/js/WebCoreTestSupport.cpp:
     18        (WebCoreTestSupport::setURLParserEnabled): Deleted.
     19        * testing/js/WebCoreTestSupport.h:
     20
    1212016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
    222
  • trunk/Source/WebCore/platform/URLParser.cpp

    r207321 r207582  
    28442844}
    28452845
    2846 enum class URLParserEnabled {
    2847     Undetermined,
    2848     Yes,
    2849     No
    2850 };
    2851 
    2852 static URLParserEnabled urlParserEnabled = URLParserEnabled::Undetermined;
     2846static bool urlParserEnabled = true;
    28532847
    28542848void URLParser::setEnabled(bool enabled)
    28552849{
    2856     urlParserEnabled = enabled ? URLParserEnabled::Yes : URLParserEnabled::No;
     2850    urlParserEnabled = enabled;
    28572851}
    28582852
    28592853bool URLParser::enabled()
    28602854{
    2861     if (urlParserEnabled == URLParserEnabled::Undetermined) {
    2862 #if PLATFORM(MAC)
    2863         urlParserEnabled = MacApplication::isSafari() ? URLParserEnabled::Yes : URLParserEnabled::No;
    2864 #elif PLATFORM(IOS)
    2865         urlParserEnabled = IOSApplication::isMobileSafari() ? URLParserEnabled::Yes : URLParserEnabled::No;
    2866 #else
    2867         urlParserEnabled = URLParserEnabled::Yes;
    2868 #endif
    2869     }
    2870     return urlParserEnabled == URLParserEnabled::Yes;
     2855    return urlParserEnabled;
    28712856}
    28722857
  • trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp

    r207305 r207582  
    122122}
    123123
    124 void setURLParserEnabled(bool enabled)
    125 {
    126     URLParser::setEnabled(enabled);
    127 }
    128 
    129124void installMockGamepadProvider()
    130125{
  • trunk/Source/WebCore/testing/js/WebCoreTestSupport.h

    r207305 r207582  
    5757void initializeLogChannelsIfNecessary() TEST_SUPPORT_EXPORT;
    5858void setAllowsAnySSLCertificate(bool) TEST_SUPPORT_EXPORT;
    59 void setURLParserEnabled(bool) TEST_SUPPORT_EXPORT;
    6059
    6160void installMockGamepadProvider() TEST_SUPPORT_EXPORT;
  • trunk/Tools/ChangeLog

    r207568 r207582  
     12016-10-19  Alex Christensen  <achristensen@webkit.org>
     2
     3        Re-enable URLParser for non-Safari Cocoa apps after r207321
     4        https://bugs.webkit.org/show_bug.cgi?id=163690
     5
     6        Reviewed by Darin Adler.
     7
     8        * DumpRenderTree/mac/DumpRenderTree.mm:
     9        (DumpRenderTreeMain):
     10        * TestWebKitAPI/Tests/WebKit2Cocoa/LoadInvalidURLRequest.mm:
     11        (-[LoadInvalidURLNavigationActionDelegate webView:didFailProvisionalNavigation:withError:]):
     12        * TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm:
     13        (TestWebKitAPI::TEST):
     14        * WebKitTestRunner/TestController.cpp:
     15        (WTR::TestController::TestController):
     16
    1172016-10-19  Ryan Haddad  <ryanhaddad@apple.com>
    218
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r207561 r207582  
    14121412int DumpRenderTreeMain(int argc, const char *argv[])
    14131413{
    1414     WebCoreTestSupport::setURLParserEnabled(true);
    14151414    atexit(atexitFunction);
    14161415
  • trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LoadInvalidURLRequest.mm

    r207315 r207582  
    5555- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error
    5656{
    57     EXPECT_WK_STREQ(error.domain, @"WebKitErrorDomain");
    58     EXPECT_EQ(error.code, WebKitErrorCannotShowURL);
     57    EXPECT_WK_STREQ(error.domain, @"NSURLErrorDomain");
     58    EXPECT_EQ(error.code, -1003);
    5959    EXPECT_TRUE([error.userInfo[@"NSErrorFailingURLKey"] isEqual:literalURL(literal)]);
    6060
  • trunk/Tools/TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm

    r207315 r207582  
    7878        Util::run(&didFinishTest);
    7979
    80         EXPECT_TRUE(didFailProvisionalLoad);
     80        EXPECT_FALSE(didFailProvisionalLoad);
    8181    }
    8282}
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r207561 r207582  
    116116TestController::TestController(int argc, const char* argv[])
    117117{
    118     WebCoreTestSupport::setURLParserEnabled(true);
    119118    initialize(argc, argv);
    120119    controller = this;
Note: See TracChangeset for help on using the changeset viewer.