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

Side by Side Diff: third_party/WebKit/LayoutTests/printing/resources/webgl-repeated-printing-common.js

Issue 2013213002: Add debug output to see what happens during win10 printing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/printing/webgl-repeated-printing-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var gl; 1 var gl;
2 2
3 function main() 3 function main()
4 { 4 {
5 if (!window.testRunner) { 5 if (!window.testRunner) {
6 testFailed("Requires window.testRunner"); 6 testFailed("Requires window.testRunner");
7 } else { 7 } else {
8 testRunner.waitUntilDone(); 8 testRunner.waitUntilDone();
9 testRunner.setPrinting(); 9 testRunner.setPrinting();
10 testRunner.dumpAsText(); 10 testRunner.dumpAsText();
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 pixel = [ 59 pixel = [
60 data[4 * (width * y + x) + 0], 60 data[4 * (width * y + x) + 0],
61 data[4 * (width * y + x) + 1], 61 data[4 * (width * y + x) + 1],
62 data[4 * (width * y + x) + 2], 62 data[4 * (width * y + x) + 2],
63 data[4 * (width * y + x) + 3] 63 data[4 * (width * y + x) + 3]
64 ]; 64 ];
65 } 65 }
66 66
67 function completionCallback(width, height, snapshot) { 67 function completionCallback(width, height, snapshot) {
68 var test = testsAndExpectations[testIndex]; 68 var test = testsAndExpectations[testIndex];
69 debug('Snapshot width: ' + width + ' height: ' + height);
69 debug('Test ' + testIndex + ': canvas should be ' + test['description']); 70 debug('Test ' + testIndex + ': canvas should be ' + test['description']);
70 try { 71 try {
71 var expectation = test['expected']; 72 var expectation = test['expected'];
72 fetchPixelAt(50, 50, width, height, snapshot); 73 fetchPixelAt(50, 50, width, height, snapshot);
73 shouldBeCloseTo('pixel[0]', expectation[0], tolerance); 74 shouldBeCloseTo('pixel[0]', expectation[0], tolerance);
74 shouldBeCloseTo('pixel[1]', expectation[1], tolerance); 75 shouldBeCloseTo('pixel[1]', expectation[1], tolerance);
75 shouldBeCloseTo('pixel[2]', expectation[2], tolerance); 76 shouldBeCloseTo('pixel[2]', expectation[2], tolerance);
76 } catch (e) { 77 } catch (e) {
77 debug('error in completionCallback'); 78 debug('error in completionCallback');
78 debug(e); 79 debug(e);
79 testRunner.notifyDone(); 80 testRunner.notifyDone();
80 return; 81 return;
81 } 82 }
82 83
83 ++testIndex; 84 ++testIndex;
84 window.requestAnimationFrame(nextTest); 85 window.requestAnimationFrame(nextTest);
85 } 86 }
86 87
87 function draw(r, g, b, a) 88 function draw(r, g, b, a)
88 { 89 {
89 gl.clearColor(r, g, b, a); 90 gl.clearColor(r, g, b, a);
90 gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); 91 gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
91 } 92 }
92 93
93 main(); 94 main();
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/printing/webgl-repeated-printing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698