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

Unified Diff: content/test/data/gpu/pixel_canvas_display_linear-rgb.html

Issue 2457113002: Fixing timeout in pixel_canvas_display_linear-rgb browser pixel test (Closed)
Patch Set: Adding comments to the pixel test. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/gpu/pixel_canvas_display_linear-rgb.html
diff --git a/content/test/data/gpu/pixel_canvas_display_linear-rgb.html b/content/test/data/gpu/pixel_canvas_display_linear-rgb.html
index b33ec64479fda2fbfb8ee53eb712a6f79d279389..d09b8bfb76ab74908613df29d6087f2ee0fdd938 100644
--- a/content/test/data/gpu/pixel_canvas_display_linear-rgb.html
+++ b/content/test/data/gpu/pixel_canvas_display_linear-rgb.html
@@ -1,8 +1,13 @@
-<!DOCTYPE html>
-<canvas id="cnv" width=140 height=140></canvas>
-
+<!DOCTYPE HTML>
+<html>
+<head>
+<style type="text/css">
Justin Novosad 2016/10/28 21:12:19 Why is this necessary?
zakerinasab 2016/11/02 15:45:33 Not necessary, can be removed.
+.nomargin {
+ margin: 0px auto;
+}
+</style>
<script>
-// This layout test checks if the 2D canvas is properly displayed
+// This browser pixel test checks if the 2D canvas is properly displayed
// when the color space is set to linear-rgb.
var g_swapsBeforeAck = 15;
@@ -15,7 +20,7 @@ function main()
function draw()
{
- var ctx = document.getElementById("cnv").getContext("2d", {colorSpace:'linear-rgb'});
+ var ctx = document.getElementById("c").getContext("2d", {colorSpace:'linear-rgb'});
ctx.fillStyle = 'red';
ctx.fillRect(20,20,50,50);
ctx.fillStyle = 'green';
@@ -37,8 +42,13 @@ function waitForFinish()
window.webkitRequestAnimationFrame(waitForFinish);
}
}
-
-main();
</script>
-
-
+</head>
+<body onload="main()">
Justin Novosad 2016/10/28 21:12:19 Is this what fixes the timeout? If so, care to ex
zakerinasab 2016/11/02 15:45:33 It is necessary as it waits for all the components
+<div style="position:relative; width:300px; height:300px; background-color:white">
Justin Novosad 2016/10/28 21:12:19 Why is this necessary?
zakerinasab 2016/11/02 15:45:33 No, can be removed.
+</div>
+<div id="container" style="position:absolute; top:0px; left:0px">
Justin Novosad 2016/10/28 21:12:19 Why is this necessary?
zakerinasab 2016/11/02 15:45:33 It seems the canvas must be inside a div for the b
+<canvas id="c" width="200" height="200" class="nomargin"></canvas>
+</div>
+</body>
+</html>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698