Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: trunk/LayoutTests/http/tests/websocket/bufferedAmount-after-send.html

Issue 338243006: Revert 176298 "[WebSocket] bufferedAmount should not decrease in..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | trunk/LayoutTests/http/tests/websocket/bufferedAmount-after-send-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="/js-test-resources/js-test.js"></script>
5 </head>
6 <body>
7 <script type="text/javascript">
8 description('WebSocket bufferedAmount after send');
9
10 window.jsTestIsAsync = true;
11
12 var ws = new WebSocket('ws://localhost:8880/echo');
13
14 ws.onopen = function()
15 {
16 debug('onopen');
17 ws.send('hello');
18 shouldBe('ws.bufferedAmount', '5');
19 ws.send(new ArrayBuffer(32));
20 shouldBe('ws.bufferedAmount', '37');
21 ws.send(new Blob(['abc', 'de']));
22 shouldBe('ws.bufferedAmount', '42');
23 ws.send('bye');
24 shouldBe('ws.bufferedAmount', '45');
25 // FIXME: This is a bit flaky but I don't know how to fix it.
26 setTimeout(function() {
27 shouldBe('ws.bufferedAmount', '0');
28 ws.close();
29 }, 50);
30 };
31
32 ws.onclose = function()
33 {
34 debug('onclose');
35 shouldBe('ws.bufferedAmount', '0');
36 finishJSTest();
37 };
38
39 </script>
40 </body>
41 </html>
OLDNEW
« no previous file with comments | « no previous file | trunk/LayoutTests/http/tests/websocket/bufferedAmount-after-send-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698