Multiple http/wpt/beacon/contentextensions/ test are flaky.
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jan 2018 02:30:51 +0000 (02:30 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jan 2018 02:30:51 +0000 (02:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=179256
<rdar://problem/35401978>

Reviewed by Alex Christensen.

Tools:

Update WebKitTestRunner to set a temporary path for content extensions so that its WKTR
instance gets its own folder to avoid conflicts and flakiness.

* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformConfigureViewForTest):

LayoutTests:

Stop marking content extensions tests as flaky.

* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226751 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/TestExpectations
Tools/ChangeLog
Tools/WebKitTestRunner/mac/TestControllerMac.mm

index 51a59abcafc78a5e0394f49c0b7138d85a96067f..6f8f613ddec41e6d7403367ec2ecfe0c27c7e07b 100644 (file)
@@ -1,3 +1,15 @@
+2018-01-10  Chris Dumez  <cdumez@apple.com>
+
+        Multiple http/wpt/beacon/contentextensions/ test are flaky.
+        https://bugs.webkit.org/show_bug.cgi?id=179256
+        <rdar://problem/35401978>
+
+        Reviewed by Alex Christensen.
+
+        Stop marking content extensions tests as flaky.
+
+        * platform/mac-wk2/TestExpectations:
+
 2018-01-10  Tim Horton  <timothy_horton@apple.com>
 
         REGRESSION (r213590): Swipe from edge to go to previous page is significantly slower than tapping back button on Twitter
index 38f4a32cbd59cb9cdbc05f14697379d56fc01fcd..e29899e8858cc5d13ba31a979791af27ab660948 100644 (file)
@@ -525,10 +525,12 @@ webkit.org/b/141085 http/tests/media/video-query-url.html [ Pass Timeout ]
 ########################################
 
 # Content Extensions tests must be enabled explicitly on mac-wk2.
-http/tests/contentextensions [ Pass Failure  ]
-http/tests/websocket/tests/hybi/contentextensions [ Pass Failure ]
+http/tests/contentextensions [ Pass ]
+http/tests/websocket/tests/hybi/contentextensions [ Pass ]
+[ Sierra+ ] http/wpt/beacon/contentextensions [ Pass ]
+
+# The following tests are flaky.
 webkit.org/b/179557 http/tests/websocket/tests/hybi/contentextensions/upgrade-worker.html [ Pass Failure ]
-webkit.org/b/179256 [ Sierra+ ] http/wpt/beacon/contentextensions [ Pass Failure ]
 webkit.org/b/168081 http/tests/contentextensions/async-xhr-onerror.html [ Pass Timeout ]
 webkit.org/b/146400 http/tests/contentextensions/character-set-basic-support.html [ Pass Failure ]
 webkit.org/b/168082 [ Sierra ] http/tests/contentextensions/invalid-selector.html [ Pass ImageOnlyFailure ]
index 571d7dc7036dc3ea83a95cc113675df72867e4af..616605f4360d786dc89712e9525a1e2e4aa15726 100644 (file)
@@ -1,3 +1,17 @@
+2018-01-10  Chris Dumez  <cdumez@apple.com>
+
+        Multiple http/wpt/beacon/contentextensions/ test are flaky.
+        https://bugs.webkit.org/show_bug.cgi?id=179256
+        <rdar://problem/35401978>
+
+        Reviewed by Alex Christensen.
+
+        Update WebKitTestRunner to set a temporary path for content extensions so that its WKTR
+        instance gets its own folder to avoid conflicts and flakiness.
+
+        * WebKitTestRunner/mac/TestControllerMac.mm:
+        (WTR::TestController::platformConfigureViewForTest):
+
 2018-01-10  Tim Horton  <timothy_horton@apple.com>
 
         REGRESSION (r213590): Swipe from edge to go to previous page is significantly slower than tapping back button on Twitter
index 37ab44ba5111a9b1b07ddcf1280dcab4917852cc..faa3f9eefa02beee0ea194354c0c85756c03a6e3 100644 (file)
@@ -133,7 +133,15 @@ void TestController::platformConfigureViewForTest(const TestInvocation& test)
         return;
     
     __block bool doneCompiling = false;
-    [[_WKUserContentExtensionStore defaultStore] compileContentExtensionForIdentifier:@"TestContentExtensions" encodedContentExtension:contentExtensionString completionHandler:^(_WKUserContentFilter *filter, NSError *error)
+
+    NSURL *tempDir;
+    if (const char* dumpRenderTreeTemp = libraryPathForTesting()) {
+        String temporaryFolder = String::fromUTF8(dumpRenderTreeTemp);
+        tempDir = [NSURL fileURLWithPath:[(NSString*)temporaryFolder stringByAppendingPathComponent:@"ContentExtensions"] isDirectory:YES];
+    } else
+        tempDir = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:@"ContentExtensions"] isDirectory:YES];
+
+    [[_WKUserContentExtensionStore storeWithURL:tempDir] compileContentExtensionForIdentifier:@"TestContentExtensions" encodedContentExtension:contentExtensionString completionHandler:^(_WKUserContentFilter *filter, NSError *error)
     {
         if (!error)
             [mainWebView()->platformView().configuration.userContentController _addUserContentFilter:filter];