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

Side by Side Diff: LayoutTests/fast/canvas/webgl/resources/webgl-test.js

Issue 54473004: Make js-test-post a noop. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add mac NeedsRebaselines Created 7 years, 1 month 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 //---------------------------------------------------------------------- 1 //----------------------------------------------------------------------
2 // Differences with respect to Khronos version of webgl-test.js 2 // Differences with respect to Khronos version of webgl-test.js
3 if (window.testRunner) 3 if (window.testRunner)
4 testRunner.overridePreference("WebKitWebGLEnabled", "1"); 4 testRunner.overridePreference("WebKitWebGLEnabled", "1");
5 5
6 function assertMsg(assertion, msg) { 6 function assertMsg(assertion, msg) {
7 if (assertion) { 7 if (assertion) {
8 testPassed(msg); 8 testPassed(msg);
9 } else { 9 } else {
10 testFailed(msg); 10 testFailed(msg);
11 } 11 }
12 } 12 }
13 13
14 function initNonKhronosFramework(waitUntilDone) { 14 function initNonKhronosFramework(waitUntilDone) {
15 if (window.testRunner) { 15 if (window.testRunner) {
16 testRunner.overridePreference("WebKitWebGLEnabled", "1"); 16 testRunner.overridePreference("WebKitWebGLEnabled", "1");
17 testRunner.dumpAsText(); 17 testRunner.dumpAsText();
18 if (waitUntilDone) { 18 if (waitUntilDone) {
19 window.jsTestIsAsync = true;
19 testRunner.waitUntilDone(); 20 testRunner.waitUntilDone();
20 } 21 }
21 } 22 }
22 } 23 }
23 24
24 function nonKhronosFrameworkNotifyDone() { 25 function nonKhronosFrameworkNotifyDone() {
25 if (window.testRunner) { 26 if (window.testRunner) {
26 testRunner.notifyDone(); 27 testRunner.notifyDone();
27 } 28 }
28 } 29 }
29 30
30 function finishTest() { 31 function finishTest() {
31 var epilogue = document.createElement("script") 32 finishJSTest();
32 epilogue.onload = function() {
33 if (window.nonKhronosFrameworkNotifyDone) {
34 window.nonKhronosFrameworkNotifyDone();
35 }
36 };
37 epilogue.src = "../../js/resources/js-test-post.js";
38 document.body.appendChild(epilogue);
39 } 33 }
40 34
41 // 35 //
42 //---------------------------------------------------------------------- 36 //----------------------------------------------------------------------
43 37
44 function webglTestLog(msg) { 38 function webglTestLog(msg) {
45 if (window.console && window.console.log) { 39 if (window.console && window.console.log) {
46 window.console.log(msg); 40 window.console.log(msg);
47 } 41 }
48 if (document.getElementById("console")) { 42 if (document.getElementById("console")) {
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 else { 788 else {
795 var newTime = new Date().getTime(); 789 var newTime = new Date().getTime();
796 var t = newTime - this.renderTime; 790 var t = newTime - this.renderTime;
797 var framerate = 1000/t; 791 var framerate = 1000/t;
798 this.framerates.push(framerate); 792 this.framerates.push(framerate);
799 while (this.framerates.length > this.numFramerates) 793 while (this.framerates.length > this.numFramerates)
800 this.framerates.shift(); 794 this.framerates.shift();
801 this.renderTime = newTime; 795 this.renderTime = newTime;
802 } 796 }
803 } 797 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698