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

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

Issue 418733002: Prevent duplicate navigation to debug URLs from Telemetry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | content/test/gpu/gpu_tests/context_lost.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script type="text/javascript">
4 function onLoad() {
5 window.domAutomationController.reset = function() {
6 window.domAutomationController._loaded = false;
7 window.domAutomationController._succeeded = false;
8 window.domAutomationController._finished = false;
9 window.requestAnimationFrame(draw);
10 };
11 window.domAutomationController.send("LOADED");
12 }
13
14 function draw() {
15 // Render some WebGL into a fresh canvas to ensure the GPU process
16 // was created.
17 var canvas = document.createElement("canvas");
18 canvas.width = 32;
19 canvas.height = 32;
20 gl = canvas.getContext("webgl");
21 if (!gl) {
22 console.log("Failed to fetch WebGL context");
23 window.domAutomationController.send("FAILED");
24 return;
25 }
26
27 gl.clearColor(1, 0, 0, 1);
28 gl.clear(gl.COLOR_BUFFER_BIT);
29 var pixels = new Uint8Array(4);
30 gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
31 var tolerance = 1;
32 if (Math.abs(pixels[0] - 255) > tolerance ||
33 Math.abs(pixels[1] - 0) > tolerance ||
34 Math.abs(pixels[2] - 0) > tolerance ||
35 Math.abs(pixels[3] - 255) > tolerance) {
36 console.log("Expected (255, 0, 0, 255), got (" +
37 pixels[0] + ", " +
38 pixels[1] + ", " +
39 pixels[2] + ", " +
40 pixels[3] + ")");
41 window.domAutomationController.send("FAILED");
42 return;
43 }
44
45 window.domAutomationController.send("SUCCESS");
46 }
47 </script>
48 </head>
49 <body onload="onLoad()">
50 GPU process crash test running.
51 </body>
52 </html>
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | content/test/gpu/gpu_tests/context_lost.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698