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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-toDataURL-race-imageEncoder-png.html

Issue 2189733003: Remove virtual test suits virtual/threaded/fast/canvas-toBlob (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 <script src = "../../../../resources/js-test.js"></script> 1 <script src = "../../resources/js-test.js"></script>
2 <script src = "../../../../fast/canvas/script-tests/canvas-toBlob-toDataURL-race .js"></script> 2 <script src = "../../fast/canvas/script-tests/canvas-toBlob-toDataURL-race.js">< /script>
3 <script type = 'text/javascript'> 3 <script type = 'text/javascript'>
4 description("Verifies if synchronous PNG image encoding (toDataURL) conflicts wi th asynchronous image encoding (toBlob)"); 4 description("Verifies if synchronous PNG image encoding (toDataURL) conflicts wi th asynchronous image encoding (toBlob)");
5 5
6 //Fire a bunch of toBlob operations of canvas to keep the async thread busy 6 //Fire a bunch of toBlob operations of canvas to keep the async thread busy
7 var j = 0; // due to async nature of toBlob we need a separate counter 7 var j = 0; // due to async nature of toBlob we need a separate counter
8 for (var i = 0; i < numToBlobCalls; i++) 8 for (var i = 0; i < numToBlobCalls; i++)
9 { 9 {
10 canvas.toBlob(function(blob) { 10 canvas.toBlob(function(blob) {
11 url = URL.createObjectURL(blob); 11 url = URL.createObjectURL(blob);
12 testImages[j++].src = url; 12 testImages[j++].src = url;
13 }); 13 });
14 } 14 }
15 15
16 //Then file a bunch of toDataURL operation on main thread, so both threads now c ompete for image encoding 16 //Then file a bunch of toDataURL operation on main thread, so both threads now c ompete for image encoding
17 for (var i = numToBlobCalls; i < (numToDataURLCalls + numToBlobCalls); i++) 17 for (var i = numToBlobCalls; i < (numToDataURLCalls + numToBlobCalls); i++)
18 { 18 {
19 testImages[i].src = canvas.toDataURL(); 19 testImages[i].src = canvas.toDataURL();
20 } 20 }
21 </script> 21 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698