WebKit Bugzilla
Attachment 347828 Details for
Bug 188856
: Restructure and rename http/tests/websocket/construct-in-detached-frame-resource-load-statistics.html to address flakiness
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-188856-20180822122842.patch (text/plain), 10.31 KB, created by
John Wilander
on 2018-08-22 12:28:43 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
John Wilander
Created:
2018-08-22 12:28:43 PDT
Size:
10.31 KB
patch
obsolete
>Subversion Revision: 235180 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 4fda7e94317d16ad2697559f6f8f1b5f41c37b00..d50f70fbcf08dab89c1c528641e524144a98a016 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,20 @@ >+2018-08-22 John Wilander <wilander@apple.com> >+ >+ Make ResourceLoadObserver::logWebSocketLoading() handle websockets in detached frames >+ https://bugs.webkit.org/show_bug.cgi?id=188856 >+ >+ Unreviewed test gardening. >+ >+ * TestExpectations: >+ Skipped test since it's only valid on WK2 platforms. >+ * http/tests/websocket/connection-refusal-in-frame-resource-load-statistics-expected.txt: Added. >+ * http/tests/websocket/connection-refusal-in-frame-resource-load-statistics.html: Renamed from LayoutTests/http/tests/websocket/construct-in-detached-frame-resource-load-statistics.html. >+ * http/tests/websocket/construct-in-detached-frame-resource-load-statistics-expected.txt: Removed. >+ * http/tests/websocket/resources/construct-in-detached-frame-resource-load-statistics.html: Removed. >+ * http/tests/websocket/resources/localhost-websocket-connect.html: Added. >+ * platform/wk2/TestExpectations: >+ Marked test as [ Pass ]. >+ > 2018-08-22 Per Arne Vollan <pvollan@apple.com> > > [Win] Some video tests under http/tests/security are crashing on EWS. >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index d8b16aff218a53f16c06a2e10242318e7c2d7d55..2b94980fb7c90936528ca3493c481a5ac1a7335d 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -115,7 +115,7 @@ http/tests/appcache/decide-navigation-policy-after-delay.html [ Skip ] > http/tests/misc/will-send-request-with-client-provided-http-body.html [ Skip ] > http/tests/loading/resourceLoadStatistics/ [ Skip ] > http/tests/resourceLoadStatistics/ [ Skip ] >-http/tests/websocket/construct-in-detached-frame-resource-load-statistics.html [ Skip ] >+http/tests/websocket/connection-refusal-in-frame-resource-load-statistics.html [ Skip ] > http/tests/storageAccess/ [ Skip ] > http/tests/navigation/process-swap-window-open.html [ Skip ] > http/tests/navigation/useragent-reload.php [ Skip ] >diff --git a/LayoutTests/http/tests/websocket/connection-refusal-in-frame-resource-load-statistics-expected.txt b/LayoutTests/http/tests/websocket/connection-refusal-in-frame-resource-load-statistics-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..4be267aaff85277313a54cbe7faf08ec688a86c5 >--- /dev/null >+++ b/LayoutTests/http/tests/websocket/connection-refusal-in-frame-resource-load-statistics-expected.txt >@@ -0,0 +1,12 @@ >+CONSOLE MESSAGE: WebSocket network error: The operation couldnât be completed. Connection refused >+CONSOLE MESSAGE: WebSocket network error: The operation couldnât be completed. Connection refused >+Construct a cross-site WebSocket in a frame with server-side refusal. The test passes if Resource Load Statistics logs it properly. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS localhost registered as subresource under 127.0.0.1. >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/http/tests/websocket/connection-refusal-in-frame-resource-load-statistics.html b/LayoutTests/http/tests/websocket/connection-refusal-in-frame-resource-load-statistics.html >new file mode 100644 >index 0000000000000000000000000000000000000000..b3a8aa6e00bdd5c0ee223b42d473e7666c186300 >--- /dev/null >+++ b/LayoutTests/http/tests/websocket/connection-refusal-in-frame-resource-load-statistics.html >@@ -0,0 +1,36 @@ >+<!DOCTYPE html> >+<head> >+ <script src="../resources/js-test-pre.js"></script> >+ <script src="/resourceLoadStatistics/resources/util.js"></script> >+</head> >+<body onload="runTest()"> >+<script> >+ description('Construct a cross-site WebSocket in a frame with server-side refusal. The test passes if Resource Load Statistics logs it properly.'); >+ >+ window.jsTestIsAsync = true; >+ >+ function completeTest() { >+ if (testRunner.isStatisticsRegisteredAsSubresourceUnder("http://localhost", "http://127.0.0.1")) >+ testPassed("localhost registered as subresource under 127.0.0.1."); >+ else >+ testFailed("localhost not registered as subresource under 127.0.0.1."); >+ setEnableFeature(false, finishJSTest); >+ } >+ >+ function runTest() { >+ setEnableFeature(true, function() { >+ if (testRunner.isStatisticsRegisteredAsSubresourceUnder("http://localhost", "http://127.0.0.1")) >+ testFailed("localhost already registered as subresource under 127.0.0.1."); >+ >+ testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); >+ testRunner.installStatisticsDidScanDataRecordsCallback(completeTest); >+ >+ let iframeElement = document.createElement("iframe"); >+ iframeElement.src = "resources/localhost-websocket-connect.html"; >+ iframeElement.id = "testIframe"; >+ document.body.appendChild(iframeElement); >+ }); >+ } >+</script> >+<script src="../resources/js-test-post.js"></script> >+</body> >diff --git a/LayoutTests/http/tests/websocket/construct-in-detached-frame-resource-load-statistics-expected.txt b/LayoutTests/http/tests/websocket/construct-in-detached-frame-resource-load-statistics-expected.txt >deleted file mode 100644 >index 848cf2171ce96382ca68ba048043dba16644a09a..0000000000000000000000000000000000000000 >--- a/LayoutTests/http/tests/websocket/construct-in-detached-frame-resource-load-statistics-expected.txt >+++ /dev/null >@@ -1,5 +0,0 @@ >-PASS localhost registered as subresource under 127.0.0.1. >-PASS successfullyParsed is true >- >-TEST COMPLETE >- >diff --git a/LayoutTests/http/tests/websocket/construct-in-detached-frame-resource-load-statistics.html b/LayoutTests/http/tests/websocket/construct-in-detached-frame-resource-load-statistics.html >deleted file mode 100644 >index 1f094304e1a8f12399f80fc418f617b0b7677074..0000000000000000000000000000000000000000 >--- a/LayoutTests/http/tests/websocket/construct-in-detached-frame-resource-load-statistics.html >+++ /dev/null >@@ -1,55 +0,0 @@ >-<!DOCTYPE html> >-<head> >- <script src="../resources/js-test-pre.js"></script> >- <script src="/resourceLoadStatistics/resources/util.js"></script> >-</head> >-<body onload="runTest()"> >-<script> >- description('Construct a WebSocket in a detached frame. The test passes if Resource Load Statistics logs it properly.'); >- >- window.jsTestIsAsync = true; >- >- function detachIframe() { >- var testIframe = document.getElementById('testIframe'); >- testIframe.parentNode.remove(testIframe); >- } >- >- function completeTest() { >- if (testRunner.isStatisticsRegisteredAsSubresourceUnder("http://localhost", "http://127.0.0.1")) >- testPassed("localhost registered as subresource under 127.0.0.1."); >- else >- testFailed("localhost not registered as subresource under 127.0.0.1."); >- setEnableFeature(false, finishJSTest); >- } >- >- let dataRecordsScanned = false; >- function didScanDataRecords() { >- dataRecordsScanned = true; >- if (createdWebSocket) >- completeTest(); >- } >- >- let createdWebSocket = false; >- function didCreateWebSocket() { >- createdWebSocket = true; >- if (dataRecordsScanned) >- completeTest(); >- } >- >- function runTest() { >- setEnableFeature(true, function() { >- if (testRunner.isStatisticsRegisteredAsSubresourceUnder("http://localhost", "http://127.0.0.1")) >- testFailed("localhost already registered as subresource under 127.0.0.1."); >- >- testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); >- testRunner.installStatisticsDidScanDataRecordsCallback(didScanDataRecords); >- >- let iframeElement = document.createElement("iframe"); >- iframeElement.src = "resources/construct-in-detached-frame-resource-load-statistics.html"; >- iframeElement.id = "testIframe"; >- document.body.appendChild(iframeElement); >- }); >- } >-</script> >-<script src="../resources/js-test-post.js"></script> >-</body> >diff --git a/LayoutTests/http/tests/websocket/resources/construct-in-detached-frame-resource-load-statistics.html b/LayoutTests/http/tests/websocket/resources/construct-in-detached-frame-resource-load-statistics.html >deleted file mode 100644 >index ab7518b8447693d65441fb4dcb88559182a628c8..0000000000000000000000000000000000000000 >--- a/LayoutTests/http/tests/websocket/resources/construct-in-detached-frame-resource-load-statistics.html >+++ /dev/null >@@ -1,13 +0,0 @@ >-<!DOCTYPE html> >-<script> >- var parentWindow = parent; >- var webSocketClass = WebSocket; >- >- parentWindow.detachIframe(); >- try { >- new webSocketClass('ws://localhost/'); >- } catch (e) { >- parentWindow.console.log(e.message); >- } >- parentWindow.didCreateWebSocket(); >-</script> >diff --git a/LayoutTests/http/tests/websocket/resources/localhost-websocket-connect.html b/LayoutTests/http/tests/websocket/resources/localhost-websocket-connect.html >new file mode 100644 >index 0000000000000000000000000000000000000000..04170e467ed4268726bd941f789b0d2c8aabbc91 >--- /dev/null >+++ b/LayoutTests/http/tests/websocket/resources/localhost-websocket-connect.html >@@ -0,0 +1,4 @@ >+<!DOCTYPE html> >+<script> >+ new WebSocket('ws://localhost/'); >+</script> >diff --git a/LayoutTests/platform/wk2/TestExpectations b/LayoutTests/platform/wk2/TestExpectations >index 925fbd217cc13d3ed85868f432c08411f85d491d..e1a5679d5b81142fe90514f96c16509819e6b05f 100644 >--- a/LayoutTests/platform/wk2/TestExpectations >+++ b/LayoutTests/platform/wk2/TestExpectations >@@ -721,7 +721,7 @@ http/tests/resourceLoadStatistics/grandfathering.html [ Pass ] > webkit.org/b/180703 http/tests/resourceLoadStatistics/telemetry-generation.html [ Pass Failure ] > http/tests/resourceLoadStatistics/prune-statistics.html [ Pass ] > http/tests/resourceLoadStatistics [ Pass ] >-http/tests/websocket/construct-in-detached-frame-resource-load-statistics.html [ Pass ] >+http/tests/websocket/connection-refusal-in-frame-resource-load-statistics.html [ Pass ] > # These are only supported behind a compile time flag in macOS High Sierra + iOS 11, and above. > http/tests/resourceLoadStatistics/cookie-deletion.html [ Skip ] > http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction.html [ Skip ]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188856
:
347819
|
347822
|
347828
|
347854