Title: [216150] trunk/LayoutTests
- Revision
- 216150
- Author
- commit-qu...@webkit.org
- Date
- 2017-05-03 15:30:38 -0700 (Wed, 03 May 2017)
Log Message
LayoutTest http/tests/inspector/network/fetch-network-data.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=166038
<rdar://problem/29488489>
Patch by Joseph Pecoraro <pecor...@apple.com> on 2017-05-03
Reviewed by Matt Baker.
* platform/mac/TestExpectations:
* http/tests/inspector/network/fetch-network-data.html:
* http/tests/inspector/network/xhr-request-data-encoded-correctly.html:
Use singleFireEventListener instead of awaitEvent so that the follow-up event handlers
can be added synchronously instead of in a microtask. When the microtask happened later
than other incoming events then the follow-up handlers would have been added too late.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (216149 => 216150)
--- trunk/LayoutTests/ChangeLog 2017-05-03 22:26:43 UTC (rev 216149)
+++ trunk/LayoutTests/ChangeLog 2017-05-03 22:30:38 UTC (rev 216150)
@@ -1,3 +1,18 @@
+2017-05-03 Joseph Pecoraro <pecor...@apple.com>
+
+ LayoutTest http/tests/inspector/network/fetch-network-data.html is a flaky timeout
+ https://bugs.webkit.org/show_bug.cgi?id=166038
+ <rdar://problem/29488489>
+
+ Reviewed by Matt Baker.
+
+ * platform/mac/TestExpectations:
+ * http/tests/inspector/network/fetch-network-data.html:
+ * http/tests/inspector/network/xhr-request-data-encoded-correctly.html:
+ Use singleFireEventListener instead of awaitEvent so that the follow-up event handlers
+ can be added synchronously instead of in a microtask. When the microtask happened later
+ than other incoming events then the follow-up handlers would have been added too late.
+
2017-05-03 Matt Lewis <jlew...@apple.com>
Mark imported/w3c/web-platform-tests/html/webappapis/timers/negative-settimeout.html as flaky.
Modified: trunk/LayoutTests/http/tests/inspector/network/fetch-network-data.html (216149 => 216150)
--- trunk/LayoutTests/http/tests/inspector/network/fetch-network-data.html 2017-05-03 22:26:43 UTC (rev 216149)
+++ trunk/LayoutTests/http/tests/inspector/network/fetch-network-data.html 2017-05-03 22:30:38 UTC (rev 216150)
@@ -12,7 +12,7 @@
suite.addTestCase({
name, test(resolve, reject) {
InspectorTest.evaluateInPage(_expression_);
- WebInspector.Frame.awaitEvent(WebInspector.Frame.Event.ResourceWasAdded).then((event) => {
+ WebInspector.Frame.singleFireEventListener(WebInspector.Frame.Event.ResourceWasAdded, (event) => {
let resource = event.data.resource;
InspectorTest.expectEqual(resource.type, WebInspector.Resource.Type.Fetch, "Resource should be Fetch type.");
if (loadedHandler) {
Modified: trunk/LayoutTests/http/tests/inspector/network/xhr-request-data-encoded-correctly.html (216149 => 216150)
--- trunk/LayoutTests/http/tests/inspector/network/xhr-request-data-encoded-correctly.html 2017-05-03 22:26:43 UTC (rev 216149)
+++ trunk/LayoutTests/http/tests/inspector/network/xhr-request-data-encoded-correctly.html 2017-05-03 22:30:38 UTC (rev 216150)
@@ -18,19 +18,18 @@
name: "XHRWithRequestDataIsEncodedCorrectly",
description: "XHR with request data is encoded correctly.",
test(resolve, reject) {
- WebInspector.Frame.awaitEvent(WebInspector.Frame.Event.ResourceWasAdded)
- .then((event) => {
+ InspectorTest.evaluateInPage(`createXHRResource()`);
+ WebInspector.Frame.singleFireEventListener(WebInspector.Frame.Event.ResourceWasAdded, (event) => {
let resource = event.data.resource;
InspectorTest.expectThat(resource instanceof WebInspector.Resource, "Resource should be created.");
InspectorTest.expectThat(resource.requestData === "utf8=👍", "Request data should have expected content.");
- return resource.awaitEvent(WebInspector.Resource.Event.LoadingDidFinish);
- })
- .then((event) => {
- InspectorTest.pass("Resource load should finish.");
- })
- .then(resolve, reject);
-
- InspectorTest.evaluateInPage("createXHRResource()");
+ resource.awaitEvent(WebInspector.Resource.Event.LoadingDidFinish)
+ .then((event) => { InspectorTest.pass("Resource load should finish.") })
+ .then(resolve, reject);
+ resource.awaitEvent(WebInspector.Resource.Event.LoadingDidFail)
+ .then(() => { InspectorTest.fail("Resource should not have failed to load.") })
+ .then(reject, reject);
+ });
}
});
@@ -39,6 +38,6 @@
</script>
</head>
<body _onload_="runTest()">
- <p>Tests XHR network resource payload is shown with correct encoding.</p>
+<p>Tests XHR network resource payload is shown with correct encoding.</p>
</body>
-</html>
\ No newline at end of file
+</html>
Modified: trunk/LayoutTests/platform/mac/TestExpectations (216149 => 216150)
--- trunk/LayoutTests/platform/mac/TestExpectations 2017-05-03 22:26:43 UTC (rev 216149)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2017-05-03 22:30:38 UTC (rev 216150)
@@ -1455,9 +1455,6 @@
webkit.org/b/164277 fast/preloader/image-srcset.html [ Pass Failure ]
-webkit.org/b/166038 http/tests/inspector/network/fetch-network-data.html [ Pass Timeout ]
-webkit.org/b/164033 http/tests/inspector/network/xhr-request-data-encoded-correctly.html [ Pass Timeout ]
-
webkit.org/b/165222 [ Debug ] imported/w3c/web-platform-tests/IndexedDB/idbindex-multientry.htm [ Pass Failure ]
webkit.org/b/165222 [ Debug ] imported/w3c/web-platform-tests/IndexedDB/idbindex-rename-abort.html [ Pass Failure ]
webkit.org/b/165222 [ Debug ] imported/w3c/web-platform-tests/IndexedDB/idbindex-rename-errors.html [ Pass Failure ]
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes