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

Side by Side Diff: LayoutTests/fast/canvas/webgl/script-tests/arraybuffer-transfer-of-control.js

Issue 138273013: Check for duplicate ArrayBuffer transferables. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update test to current Created 6 years, 11 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Window/script-tests/postmessage-clone.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 window.jsTestIsAsync = true; 1 window.jsTestIsAsync = true;
2 2
3 description('Test transfer of control semantics for ArrayBuffers.'); 3 description('Test transfer of control semantics for ArrayBuffers.');
4 window.testsComplete = 0; 4 window.testsComplete = 0;
5 5
6 var arraySize = 40; 6 var arraySize = 40;
7 var arrayOffset = 8; 7 var arrayOffset = 8;
8 var arrayEffectiveSize = arraySize - arrayOffset; 8 var arrayEffectiveSize = arraySize - arrayOffset;
9 9
10 var basicBufferTypes = 10 var basicBufferTypes =
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 if (view.buffer !== e.data[0].buffer) { 321 if (view.buffer !== e.data[0].buffer) {
322 testFailed(name + ": not every view pointed to the correct buffe r."); 322 testFailed(name + ": not every view pointed to the correct buffe r.");
323 return false; 323 return false;
324 } 324 }
325 } 325 }
326 return true; 326 return true;
327 } 327 }
328 }, { 328 }, {
329 name: "transfer list multiple", 329 name: "transfer list multiple",
330 send: function(name) { 330 send: function(name) {
331 var buffer0 = createBuffer(arraySize);
332 wrapFailSend(name, { buffer : buffer0 }, [buffer0, buffer0]);
331 var buffer = createBuffer(arraySize); 333 var buffer = createBuffer(arraySize);
332 wrapSend(name, { buffer : buffer }, [buffer,buffer]); 334 wrapSend(name, { buffer : buffer }, [buffer]);
333 assertBufferClosed(name, buffer); 335 assertBufferClosed(name, buffer);
334 wrapFailSend(name, [buffer], [buffer]); 336 wrapFailSend(name, [buffer], [buffer]);
335 wrapFailSend(name, [], [buffer]); 337 wrapFailSend(name, [], [buffer]);
336 var buffer2 = createBuffer(arraySize); 338 var buffer2 = createBuffer(arraySize);
337 wrapFailSend(name, [], [buffer2, buffer]); 339 wrapFailSend(name, [], [buffer2, buffer]);
338 checkBuffer(name, buffer2, arraySize); 340 checkBuffer(name, buffer2, arraySize);
339 wrapFailSend(name, [], [buffer, buffer2]); 341 wrapFailSend(name, [], [buffer, buffer2]);
340 checkBuffer(name, buffer2, arraySize); 342 checkBuffer(name, buffer2, arraySize);
341 wrapFailSend(name, [buffer2], [buffer2, buffer]); 343 wrapFailSend(name, [buffer2], [buffer2, buffer]);
342 checkBuffer(name, buffer2, arraySize); 344 checkBuffer(name, buffer2, arraySize);
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 } 458 }
457 doneTest(); 459 doneTest();
458 } 460 }
459 461
460 window.addEventListener('message', windowHandleMessage); 462 window.addEventListener('message', windowHandleMessage);
461 window.testsComplete = -1; 463 window.testsComplete = -1;
462 doneTest(); 464 doneTest();
463 465
464 successfullyParsed = true; 466 successfullyParsed = true;
465 467
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Window/script-tests/postmessage-clone.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698