Title: [254834] trunk/LayoutTests
Revision
254834
Author
[email protected]
Date
2020-01-20 12:51:24 -0800 (Mon, 20 Jan 2020)

Log Message

REGRESSION (r250655?): [ Mac Debug ] inspector/runtime/promise-native-getter.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=206303
<rdar://problem/58612520>

Reviewed by Darin Adler.

Rework the test to not be reliant on real world timing.

* inspector/runtime/promise-native-getter.html:
* inspector/runtime/promise-native-getter-expected.txt:
* platform/mac/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (254833 => 254834)


--- trunk/LayoutTests/ChangeLog	2020-01-20 20:24:54 UTC (rev 254833)
+++ trunk/LayoutTests/ChangeLog	2020-01-20 20:51:24 UTC (rev 254834)
@@ -1,3 +1,17 @@
+2020-01-20  Devin Rousso  <[email protected]>
+
+        REGRESSION (r250655?): [ Mac Debug ] inspector/runtime/promise-native-getter.html is a flaky timeout
+        https://bugs.webkit.org/show_bug.cgi?id=206303
+        <rdar://problem/58612520>
+
+        Reviewed by Darin Adler.
+
+        Rework the test to not be reliant on real world timing.
+
+        * inspector/runtime/promise-native-getter.html:
+        * inspector/runtime/promise-native-getter-expected.txt:
+        * platform/mac/TestExpectations:
+
 2020-01-20  Wenson Hsieh  <[email protected]>
 
         Add a test to verify that the callout bar appears after selecting a word

Modified: trunk/LayoutTests/inspector/runtime/promise-native-getter-expected.txt (254833 => 254834)


--- trunk/LayoutTests/inspector/runtime/promise-native-getter-expected.txt	2020-01-20 20:24:54 UTC (rev 254833)
+++ trunk/LayoutTests/inspector/runtime/promise-native-getter-expected.txt	2020-01-20 20:51:24 UTC (rev 254834)
@@ -1,5 +1,6 @@
+CONSOLE MESSAGE: line 25: [object Promise]
 CONSOLE MESSAGE: line 8: unhandledrejection - "test"
 CONSOLE MESSAGE: Unhandled Promise Rejection: test
-CONSOLE MESSAGE: line 20: caught - "test"
-CONSOLE MESSAGE: line 12: rejectionhandled - "test"
+CONSOLE MESSAGE: line 14: caught - "test"
+CONSOLE MESSAGE: line 20: rejectionhandled - "test"
 Tests that the injected script only `.then()`s promises if they are returned by native getters.

Modified: trunk/LayoutTests/inspector/runtime/promise-native-getter.html (254833 => 254834)


--- trunk/LayoutTests/inspector/runtime/promise-native-getter.html	2020-01-20 20:24:54 UTC (rev 254833)
+++ trunk/LayoutTests/inspector/runtime/promise-native-getter.html	2020-01-20 20:51:24 UTC (rev 254834)
@@ -6,6 +6,14 @@
 function createUnhandledPromise() {
     window.addEventListener("unhandledrejection", (event) => {
         console.log("unhandledrejection - " + JSON.stringify(event.reason));
+
+        console.assert(event.promise === rejectedPromiseTest, "unhandledrejection promise should be rejectedPromiseTest.");
+
+        setTimeout(() => {
+            window.rejectedPromiseTest.catch((value) => {
+                console.log("caught - " + JSON.stringify(value));
+            });
+        });
     });
 
     window.addEventListener("rejectionhandled", (event) => {
@@ -13,13 +21,8 @@
         TestPage.dispatchEventToFrontend("rejectionhandled");
     });
 
-    let promise = Promise.reject("test");
-
-    setTimeout(() => {
-        promise.catch((value) => {
-            console.log("caught - " + JSON.stringify(value));
-        });
-    }, 5);
+    window.rejectedPromiseTest = Promise.reject("test");
+    console.log(window.rejectedPromiseTest); // Ensure that the injected script sees the `Promise`.
 }
 
 function test()

Modified: trunk/LayoutTests/platform/mac/TestExpectations (254833 => 254834)


--- trunk/LayoutTests/platform/mac/TestExpectations	2020-01-20 20:24:54 UTC (rev 254833)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2020-01-20 20:51:24 UTC (rev 254834)
@@ -1935,5 +1935,3 @@
 webkit.org/b/77568 [ Sierra HighSierra Mojave ] fast/text/locale-shaping-complex.html [ ImageOnlyFailure ]
 
 webkit.org/b/206291 storage/websql/statement-error-callback.html [ Pass Timeout ]
-
-webkit.org/b/206303 [ Debug ] inspector/runtime/promise-native-getter.html [ Pass Timeout ]
\ No newline at end of file
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to