Title: [240756] trunk/Tools
Revision
240756
Author
[email protected]
Date
2019-01-30 19:56:19 -0800 (Wed, 30 Jan 2019)

Log Message

REGRESSION(r240541): WebKit.WebsitePoliciesCustomJavaScriptUserAgent is failing since introduction on iOS
https://bugs.webkit.org/show_bug.cgi?id=193979

Reviewed by Wenson Hsieh.

Fix the test for iOS. Make the test work with iOS UA string.

* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (240755 => 240756)


--- trunk/Tools/ChangeLog	2019-01-31 03:27:59 UTC (rev 240755)
+++ trunk/Tools/ChangeLog	2019-01-31 03:56:19 UTC (rev 240756)
@@ -1,3 +1,14 @@
+2019-01-30  Ryosuke Niwa  <[email protected]>
+
+        REGRESSION(r240541): WebKit.WebsitePoliciesCustomJavaScriptUserAgent is failing since introduction on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=193979
+
+        Reviewed by Wenson Hsieh.
+
+        Fix the test for iOS. Make the test work with iOS UA string.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
+
 2019-01-30  Ryan Haddad  <[email protected]>
 
         Replace High Sierra LLINT CLoop bot due to hardware failure

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm (240755 => 240756)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm	2019-01-31 03:27:59 UTC (rev 240755)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm	2019-01-31 03:56:19 UTC (rev 240756)
@@ -1139,8 +1139,8 @@
     [schemeHandler addMappingFromURLString:@"test://www.apple.com/subframe.html" toData:customUserAgentSubFrameTestBytes];
     [schemeHandler setTaskHandler:[](id <WKURLSchemeTask> task) {
         auto* userAgentString = [task.request valueForHTTPHeaderField:@"User-Agent"];
-        EXPECT_TRUE([userAgentString hasPrefix:@"Mozilla/5.0 (Macintosh;"]);
-        EXPECT_TRUE([userAgentString hasSuffix:@"(KHTML, like Gecko)"]);
+        EXPECT_TRUE([userAgentString hasPrefix:@"Mozilla/5.0 "]);
+        EXPECT_TRUE([userAgentString containsString:@"(KHTML, like Gecko)"]);
     }];
     [configuration setURLSchemeHandler:schemeHandler.get() forURLScheme:@"test"];
     [configuration preferences]._needsSiteSpecificQuirks = YES;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to