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

Side by Side Diff: LayoutTests/http/tests/websocket/workers/resources/receive-blob.js

Issue 101143002: Remove hybi sub directory for WebSocket layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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
OLDNEW
1 function createArrayBufferContainingHelloWorld() 1 function createArrayBufferContainingHelloWorld()
2 { 2 {
3 var hello = "Hello, world!"; 3 var hello = "Hello, world!";
4 var array = new Uint8Array(hello.length); 4 var array = new Uint8Array(hello.length);
5 for (var i = 0; i < hello.length; ++i) 5 for (var i = 0; i < hello.length; ++i)
6 array[i] = hello.charCodeAt(i); 6 array[i] = hello.charCodeAt(i);
7 return array.buffer; 7 return array.buffer;
8 } 8 }
9 9
10 function createEmptyArrayBuffer() 10 function createEmptyArrayBuffer()
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 postMessage("FAIL: actualArray.length should be " + expectedArray.length + " but was " + actualArray.length); 80 postMessage("FAIL: actualArray.length should be " + expectedArray.length + " but was " + actualArray.length);
81 // Print only the first mismatched byte in order not to flood console. 81 // Print only the first mismatched byte in order not to flood console.
82 for (var i = 0; i < expectedArray.length; ++i) { 82 for (var i = 0; i < expectedArray.length; ++i) {
83 if (actualArray[i] != expectedArray[i]) { 83 if (actualArray[i] != expectedArray[i]) {
84 postMessage("FAIL: Value mismatch: actualArray[" + i + "] = " + actu alArray[i] + ", expectedArray[" + i + "] = " + expectedArray[i]); 84 postMessage("FAIL: Value mismatch: actualArray[" + i + "] = " + actu alArray[i] + ", expectedArray[" + i + "] = " + expectedArray[i]);
85 return; 85 return;
86 } 86 }
87 } 87 }
88 postMessage("PASS: Passed: Message #" + testIndex + "."); 88 postMessage("PASS: Passed: Message #" + testIndex + ".");
89 } 89 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698