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

Side by Side Diff: LayoutTests/fast/events/touch/resources/compositor-touch-hit-rects.js

Issue 24438004: Rename testRunner.dumpAsText(true) to testRunner.dumpAsTextWithPixelResults() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: more tests Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 function listener() { 1 function listener() {
2 } 2 }
3 3
4 function log(msg) { 4 function log(msg) {
5 var span = document.createElement("span"); 5 var span = document.createElement("span");
6 document.getElementById("console").appendChild(span); 6 document.getElementById("console").appendChild(span);
7 span.innerHTML = msg + '<br />'; 7 span.innerHTML = msg + '<br />';
8 } 8 }
9 9
10 function nameForNode(node) { 10 function nameForNode(node) {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 log('FAIL: ' + (expectUpdate ? 'rects not updated' : 'rects updated unexpectedly')); 105 log('FAIL: ' + (expectUpdate ? 'rects not updated' : 'rects updated unexpectedly'));
106 } 106 }
107 } 107 }
108 108
109 // Set this to true in order to visualize the results in an image. 109 // Set this to true in order to visualize the results in an image.
110 // Elements that are expected to be included in hit rects have a red border. 110 // Elements that are expected to be included in hit rects have a red border.
111 // The actual hit rects are in a green tranlucent overlay. 111 // The actual hit rects are in a green tranlucent overlay.
112 var visualize = false; 112 var visualize = false;
113 113
114 if (window.testRunner) { 114 if (window.testRunner) {
115 window.testRunner.dumpAsText(visualize); 115 if (vistualize)
116 window.testRunner.dumpAsTextWithPixelResults();
117 else
118 window.testRunner.dumpAsText();
116 document.documentElement.setAttribute('dumpRenderTree', 'true'); 119 document.documentElement.setAttribute('dumpRenderTree', 'true');
117 } else { 120 } else {
118 // Note, this test can be run interactively in content-shell with 121 // Note, this test can be run interactively in content-shell with
119 // --expose-internals-for-testing. In that case we almost certainly 122 // --expose-internals-for-testing. In that case we almost certainly
120 // want to visualize the results. 123 // want to visualize the results.
121 visualize = true; 124 visualize = true;
122 } 125 }
123 126
124 if (window.internals) { 127 if (window.internals) {
125 window.internals.settings.setMockScrollbarsEnabled(true); 128 window.internals.settings.setMockScrollbarsEnabled(true);
126 window.internals.settings.setForceCompositingMode(true); 129 window.internals.settings.setForceCompositingMode(true);
127 } 130 }
128 131
129 window.onload = function() { 132 window.onload = function() {
130 // Run each general test case. 133 // Run each general test case.
131 var tests = document.querySelectorAll('.testcase'); 134 var tests = document.querySelectorAll('.testcase');
132 for ( var i = 0; i < tests.length; i++) 135 for ( var i = 0; i < tests.length; i++)
133 testElement(tests[i]); 136 testElement(tests[i]);
134 137
135 if (window.additionalTests) 138 if (window.additionalTests)
136 additionalTests(); 139 additionalTests();
137 140
138 if (!visualize && window.internals) { 141 if (!visualize && window.internals) {
139 var testContainer = document.getElementById("tests"); 142 var testContainer = document.getElementById("tests");
140 testContainer.parentNode.removeChild(testContainer); 143 testContainer.parentNode.removeChild(testContainer);
141 } 144 }
142 145
143 document.documentElement.setAttribute('done', 'true'); 146 document.documentElement.setAttribute('done', 'true');
144 }; 147 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698