Title: [244539] trunk/LayoutTests
Revision
244539
Author
[email protected]
Date
2019-04-23 08:36:58 -0700 (Tue, 23 Apr 2019)

Log Message

REGRESSION (r240727) [ Mac iOS ] Layout Test http/tests/workers/service/basic-register-exceptions.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=194368
<rdar://problem/47937467>

Reviewed by Alex Christensen.

Test was exiting sooner than the last registration was rejected.
Make sure that the test is run until the end in a more ordered way.

* http/tests/workers/service/basic-register-exceptions-expected.txt:
* http/tests/workers/service/resources/basic-register-exceptions.js:
(async.doTest):
(then): Deleted.
(catch): Deleted.
* platform/mac-wk2/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (244538 => 244539)


--- trunk/LayoutTests/ChangeLog	2019-04-23 10:47:45 UTC (rev 244538)
+++ trunk/LayoutTests/ChangeLog	2019-04-23 15:36:58 UTC (rev 244539)
@@ -1,3 +1,21 @@
+2019-04-23  Youenn Fablet  <[email protected]>
+
+        REGRESSION (r240727) [ Mac iOS ] Layout Test http/tests/workers/service/basic-register-exceptions.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=194368
+        <rdar://problem/47937467>
+
+        Reviewed by Alex Christensen.
+
+        Test was exiting sooner than the last registration was rejected.
+        Make sure that the test is run until the end in a more ordered way.
+
+        * http/tests/workers/service/basic-register-exceptions-expected.txt:
+        * http/tests/workers/service/resources/basic-register-exceptions.js:
+        (async.doTest):
+        (then): Deleted.
+        (catch): Deleted.
+        * platform/mac-wk2/TestExpectations:
+
 2019-04-23  Carlos Garcia Campos  <[email protected]>
 
         [ATK] Implement AtkComponentIface scroll_to methods

Modified: trunk/LayoutTests/http/tests/workers/service/basic-register-exceptions-expected.txt (244538 => 244539)


--- trunk/LayoutTests/http/tests/workers/service/basic-register-exceptions-expected.txt	2019-04-23 10:47:45 UTC (rev 244538)
+++ trunk/LayoutTests/http/tests/workers/service/basic-register-exceptions-expected.txt	2019-04-23 15:36:58 UTC (rev 244539)
@@ -1,9 +1,10 @@
-CONSOLE MESSAGE: line 20: Registration failed with error: TypeError: serviceWorker.register() cannot be called with an empty script URL
-CONSOLE MESSAGE: line 30: Registration failed with error: TypeError: serviceWorker.register() must be called with a valid relative script URL
-CONSOLE MESSAGE: line 40: Registration failed with error: TypeError: serviceWorker.register() must be called with a script URL whose protocol is either HTTP or HTTPS
-CONSOLE MESSAGE: line 50: Registration failed with error: TypeError: serviceWorker.register() must be called with a script URL whose path does not contain '%2f' or '%5c'
-CONSOLE MESSAGE: line 60: Registration failed with error: TypeError: Scope URL provided to serviceWorker.register() must be either HTTP or HTTPS
-CONSOLE MESSAGE: line 70: Registration failed with error: TypeError: Scope URL provided to serviceWorker.register() cannot have a path that contains '%2f' or '%5c'
-CONSOLE MESSAGE: line 80: Registration failed with error: SecurityError: Script origin does not match the registering client's origin
-CONSOLE MESSAGE: line 91: Registration failed with error: SecurityError: Scope origin does not match the registering client's origin
+CONSOLE MESSAGE: line 24: Registration failed with error: TypeError: Script http://127.0.0.1:8000/workers/service/image-mime-type.php load failed
+CONSOLE MESSAGE: line 24: Registration failed with error: TypeError: serviceWorker.register() cannot be called with an empty script URL
+CONSOLE MESSAGE: line 24: Registration failed with error: TypeError: serviceWorker.register() must be called with a valid relative script URL
+CONSOLE MESSAGE: line 24: Registration failed with error: TypeError: serviceWorker.register() must be called with a script URL whose protocol is either HTTP or HTTPS
+CONSOLE MESSAGE: line 24: Registration failed with error: TypeError: serviceWorker.register() must be called with a script URL whose path does not contain '%2f' or '%5c'
+CONSOLE MESSAGE: line 24: Registration failed with error: TypeError: Scope URL provided to serviceWorker.register() must be either HTTP or HTTPS
+CONSOLE MESSAGE: line 24: Registration failed with error: TypeError: Scope URL provided to serviceWorker.register() cannot have a path that contains '%2f' or '%5c'
+CONSOLE MESSAGE: line 24: Registration failed with error: SecurityError: Script origin does not match the registering client's origin
+CONSOLE MESSAGE: line 24: Registration failed with error: SecurityError: Scope origin does not match the registering client's origin
 

Modified: trunk/LayoutTests/http/tests/workers/service/resources/basic-register-exceptions.js (244538 => 244539)


--- trunk/LayoutTests/http/tests/workers/service/resources/basic-register-exceptions.js	2019-04-23 10:47:45 UTC (rev 244538)
+++ trunk/LayoutTests/http/tests/workers/service/resources/basic-register-exceptions.js	2019-04-23 15:36:58 UTC (rev 244539)
@@ -3,95 +3,30 @@
     finishSWTest();
 }
 
-navigator.serviceWorker.register("image-mime-type.php", { })
-.then(function(r) {
-	console.log("Registered! (unexpectedly)");
-}, function(e) {
-	console.log("Registration failed with error: " + e);
-})
-.catch(function(e) {
-	console.log("Exception registering: " + e);
-});
+var registrations = [
+    ["image-mime-type.php", {}],
+    ["", {}],
+    ["http://127.0.0.1:abc", {}],
+    ["somescheme://script.js", { }],
+    ["resources/%2fscript.js", { }],
+    ["resources/script.js", { scope: "somescheme://script.js" }],
+    ["resources/script.js", { scope: "%2fscript.js" }],
+    ["http://localhost:8000/workers/service/resources/empty-worker.js", { }],
+    ["resources/empty-worker.js", { scope: "http://localhost:8000/workers/service/" }]
+];
 
-navigator.serviceWorker.register("", { })
-.then(function(r) {
-	console.log("Registered! (unexpectedly)");
-}, function(e) {
-	console.log("Registration failed with error: " + e);
-})
-.catch(function(e) {
-	console.log("Exception registering: " + e);
-});
+async function doTest()
+{
+    for (let registration of registrations) {
+        await navigator.serviceWorker.register(registration[0], registration[1]).then(function(r) {
+            console.log("Registered! (unexpectedly)");
+        }, function(e) {
+            console.log("Registration failed with error: " + e);
+        }).catch(function(e) {
+            console.log("Exception registering: " + e);i
+        });
+    }
+    finishSWTest();
+}
 
-navigator.serviceWorker.register("http://127.0.0.1:abc", { })
-.then(function(r) {
-	console.log("Registered! (unexpectedly)");
-}, function(e) {
-	console.log("Registration failed with error: " + e);
-})
-.catch(function(e) {
-	console.log("Exception registering: " + e);
-});
-
-navigator.serviceWorker.register("somescheme://script.js", { })
-.then(function(r) {
-	console.log("Registered! (unexpectedly)");
-}, function(e) {
-	console.log("Registration failed with error: " + e);
-})
-.catch(function(e) {
-	console.log("Exception registering: " + e);
-});
-
-navigator.serviceWorker.register("resources/%2fscript.js", { })
-.then(function(r) {
-	console.log("Registered! (unexpectedly)");
-}, function(e) {
-	console.log("Registration failed with error: " + e);
-})
-.catch(function(e) {
-	console.log("Exception registering: " + e);
-});
-
-navigator.serviceWorker.register("resources/script.js", { scope: "somescheme://script.js" })
-.then(function(r) {
-	console.log("Registered! (unexpectedly)");
-}, function(e) {
-	console.log("Registration failed with error: " + e);
-})
-.catch(function(e) {
-	console.log("Exception registering: " + e);
-});
-
-navigator.serviceWorker.register("resources/script.js", { scope: "%2fscript.js" })
-.then(function(r) {
-	console.log("Registered! (unexpectedly)");
-}, function(e) {
-	console.log("Registration failed with error: " + e);
-})
-.catch(function(e) {
-	console.log("Exception registering: " + e);
-});
-
-navigator.serviceWorker.register("http://localhost:8000/workers/service/resources/empty-worker.js", { })
-.then(function(r) {
-	console.log("Registered! (unexpectedly)");
-}, function(e) {
-	console.log("Registration failed with error: " + e);
-})
-.catch(function(e) {
-	console.log("Exception registering: " + e);
-});
-
-navigator.serviceWorker.register("resources/empty-worker.js", { scope: "http://localhost:8000/workers/service/" })
-.then(function(r) {
-	console.log("Registered! (unexpectedly)");
-	done();
-}, function(e) {
-	console.log("Registration failed with error: " + e);
-	done();
-})
-.catch(function(e) {
-	console.log("Exception registering: " + e);
-	done();
-});
+doTest();

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (244538 => 244539)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2019-04-23 10:47:45 UTC (rev 244538)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2019-04-23 15:36:58 UTC (rev 244539)
@@ -913,8 +913,6 @@
 
 webkit.org/b/194826 http/tests/resourceLoadStatistics/do-not-block-top-level-navigation-redirect.html [ Pass Timeout ]
 
-webkit.org/b/194368 http/tests/workers/service/basic-register-exceptions.html [ Pass Failure ]
-
 webkit.org/b/194253 scrollingcoordinator/scrolling-tree/fixed-inside-frame.html [ Pass Failure ]
 
 webkit.org/b/194916 fast/mediastream/MediaStream-video-element.html [ Pass Failure ]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to