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

Side by Side Diff: content/test/data/gpu/pixel_offscreenCanvas_2d_resize_on_worker.html

Issue 2503453003: Remove all calls to domAutomationController.setAutomationId.
Patch Set: Fix nacl_browsertest_util.cc Created 3 years, 5 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 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 2
3 <!-- READ BEFORE UPDATING: 3 <!-- READ BEFORE UPDATING:
4 If this test is updated make sure to increment the "revision" value of the 4 If this test is updated make sure to increment the "revision" value of the
5 associated test in content/test/gpu/gpu_tests/pixel_test_pages.py. This will ens ure 5 associated test in content/test/gpu/gpu_tests/pixel_test_pages.py. This will ens ure
6 that the baseline images are regenerated on the next run. 6 that the baseline images are regenerated on the next run.
7 --> 7 -->
8 8
9 <html> 9 <html>
10 <head> 10 <head>
(...skipping 28 matching lines...) Expand all
39 39
40 function makeWorker(script) 40 function makeWorker(script)
41 { 41 {
42 var blob = new Blob([script]); 42 var blob = new Blob([script]);
43 return new Worker(URL.createObjectURL(blob)); 43 return new Worker(URL.createObjectURL(blob));
44 } 44 }
45 45
46 function waitForFinish() 46 function waitForFinish()
47 { 47 {
48 if (g_swapsBeforeAck == 0) { 48 if (g_swapsBeforeAck == 0) {
49 domAutomationController.setAutomationId(1);
50 domAutomationController.send("SUCCESS"); 49 domAutomationController.send("SUCCESS");
51 } else { 50 } else {
52 g_swapsBeforeAck--; 51 g_swapsBeforeAck--;
53 document.getElementById('container').style.zIndex = g_swapsBeforeAck + 1; 52 document.getElementById('container').style.zIndex = g_swapsBeforeAck + 1;
54 window.requestAnimationFrame(waitForFinish); 53 window.requestAnimationFrame(waitForFinish);
55 } 54 }
56 } 55 }
57 56
58 function main() 57 function main()
59 { 58 {
60 var canvas2D = document.getElementById("c"); 59 var canvas2D = document.getElementById("c");
61 var offscreenCanvas = canvas2D.transferControlToOffscreen(); 60 var offscreenCanvas = canvas2D.transferControlToOffscreen();
62 var worker = makeWorker(document.getElementById("myWorker").textContent); 61 var worker = makeWorker(document.getElementById("myWorker").textContent);
63 worker.onmessage = function (e) { 62 worker.onmessage = function (e) {
64 waitForFinish(); 63 waitForFinish();
65 }; 64 };
66 worker.postMessage(offscreenCanvas, [offscreenCanvas]); 65 worker.postMessage(offscreenCanvas, [offscreenCanvas]);
67 } 66 }
68 </script> 67 </script>
69 </head> 68 </head>
70 <body onload="main()"> 69 <body onload="main()">
71 <div style="position:relative; width:200px; height:200px; background-color:white "> 70 <div style="position:relative; width:200px; height:200px; background-color:white ">
72 </div> 71 </div>
73 <div id="container" style="position:absolute; top:0px; left:0px"> 72 <div id="container" style="position:absolute; top:0px; left:0px">
74 <canvas id="c" width="200" height="200" class="nomargin"></canvas> 73 <canvas id="c" width="200" height="200" class="nomargin"></canvas>
75 </div> 74 </div>
76 </body> 75 </body>
77 </html> 76 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698