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

Side by Side Diff: content/test/data/gpu/pixel_offscreenCanvas_webgl_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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 function makeWorker(script) 79 function makeWorker(script)
80 { 80 {
81 var blob = new Blob([script]); 81 var blob = new Blob([script]);
82 return new Worker(URL.createObjectURL(blob)); 82 return new Worker(URL.createObjectURL(blob));
83 } 83 }
84 84
85 function waitForFinish() 85 function waitForFinish()
86 { 86 {
87 if (g_swapsBeforeAck == 0) { 87 if (g_swapsBeforeAck == 0) {
88 domAutomationController.setAutomationId(1);
89 domAutomationController.send("SUCCESS"); 88 domAutomationController.send("SUCCESS");
90 } else { 89 } else {
91 g_swapsBeforeAck--; 90 g_swapsBeforeAck--;
92 document.getElementById('container').style.zIndex = g_swapsBeforeAck + 1; 91 document.getElementById('container').style.zIndex = g_swapsBeforeAck + 1;
93 window.requestAnimationFrame(waitForFinish); 92 window.requestAnimationFrame(waitForFinish);
94 } 93 }
95 } 94 }
96 95
97 function main() 96 function main()
98 { 97 {
99 var canvas2D = document.getElementById("c"); 98 var canvas2D = document.getElementById("c");
100 var offscreenCanvas = canvas2D.transferControlToOffscreen(); 99 var offscreenCanvas = canvas2D.transferControlToOffscreen();
101 var worker = makeWorker(document.getElementById("myWorker").textContent); 100 var worker = makeWorker(document.getElementById("myWorker").textContent);
102 worker.onmessage = function (e) { 101 worker.onmessage = function (e) {
103 waitForFinish(); 102 waitForFinish();
104 }; 103 };
105 worker.postMessage(offscreenCanvas, [offscreenCanvas]); 104 worker.postMessage(offscreenCanvas, [offscreenCanvas]);
106 } 105 }
107 </script> 106 </script>
108 </head> 107 </head>
109 <body onload="main()"> 108 <body onload="main()">
110 <div style="position:relative; width:200px; height:200px; background-color:white "> 109 <div style="position:relative; width:200px; height:200px; background-color:white ">
111 </div> 110 </div>
112 <div id="container" style="position:absolute; top:0px; left:0px"> 111 <div id="container" style="position:absolute; top:0px; left:0px">
113 <canvas id="c" width="200" height="200" class="nomargin"></canvas> 112 <canvas id="c" width="200" height="200" class="nomargin"></canvas>
114 </div> 113 </div>
115 </body> 114 </body>
116 </html> 115 </html>
OLDNEW
« no previous file with comments | « content/test/data/gpu/pixel_offscreenCanvas_webgl_commit_worker.html ('k') | content/test/data/gpu/pixel_scissor.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698