Commit c44395a7 authored by yhirano@chromium.org's avatar yhirano@chromium.org

Fix a flaky websocket test.

This CL fixes bufferedAmount-after-send.html and removes it from the flaky
tests list.

BUG=520615

Review URL: https://codereview.chromium.org/1295723003

git-svn-id: svn://svn.chromium.org/blink/trunk@200812 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent f263f17b
......@@ -91,7 +91,6 @@ crbug.com/520611 [ Debug ] fast/filesystem/workers/file-writer-events-shared-wor
crbug.com/520612 [ Linux ] fullscreen/anonymous-block-merge-crash.html [ Pass Timeout ]
crbug.com/520613 http/tests/cache/freshness-header.html [ Failure Pass ]
crbug.com/520614 http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_buffer_size_restriction.html [ Failure Pass ]
crbug.com/520615 http/tests/websocket/bufferedAmount-after-send.html [ Failure Pass ]
crbug.com/520617 [ Mac ] webaudio/audiochannelmerger-disconnect.html [ Failure Pass ]
crbug.com/520619 webexposed/global-interface-listing.html [ Pass Timeout ]
crbug.com/520194 http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overridesexpires.html [ Failure Pass ]
......
......@@ -8,7 +8,6 @@ PASS ws.bufferedAmount is 5
PASS ws.bufferedAmount is 37
PASS ws.bufferedAmount is 42
PASS ws.bufferedAmount is 45
PASS ws.bufferedAmount is 0
onclose
PASS ws.bufferedAmount is 0
PASS successfullyParsed is true
......
......@@ -22,10 +22,11 @@ ws.onopen = function()
shouldBe('ws.bufferedAmount', '42');
ws.send('bye');
shouldBe('ws.bufferedAmount', '45');
// FIXME: This is a bit flaky but I don't know how to fix it.
setTimeout(function() {
shouldBe('ws.bufferedAmount', '0');
var id = setInterval(function() {
if (ws.bufferedAmount === 0) {
clearInterval(id);
ws.close();
}
}, 50);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment