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

Side by Side Diff: LayoutTests/resources/js-test.js

Issue 405893003: Predeclare globals required by the test framework to avoid walking the prototype chain. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // svg/dynamic-updates tests set enablePixelTesting=true, as we want to dump tex t + pixel results 1 // svg/dynamic-updates tests set enablePixelTesting=true, as we want to dump tex t + pixel results
2 if (self.testRunner) { 2 if (self.testRunner) {
3 if (self.enablePixelTesting) 3 if (self.enablePixelTesting)
4 testRunner.dumpAsTextWithPixelResults(); 4 testRunner.dumpAsTextWithPixelResults();
5 else 5 else
6 testRunner.dumpAsText(); 6 testRunner.dumpAsText();
7 } 7 }
8 8
9 var isJsTest = true; 9 var isJsTest = true;
10 10
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 } 719 }
720 720
721 function isSuccessfullyParsed() 721 function isSuccessfullyParsed()
722 { 722 {
723 // FIXME: Remove this and only report unexpected syntax errors. 723 // FIXME: Remove this and only report unexpected syntax errors.
724 successfullyParsed = !unexpectedErrorMessage; 724 successfullyParsed = !unexpectedErrorMessage;
725 shouldBeTrue("successfullyParsed"); 725 shouldBeTrue("successfullyParsed");
726 debug('<br /><span class="pass">TEST COMPLETE</span>'); 726 debug('<br /><span class="pass">TEST COMPLETE</span>');
727 } 727 }
728 728
729 var wasPostTestScriptParsed, wasFinishJSTestCalled, jsTestIsAsync;
730
729 // It's possible for an async test to call finishJSTest() before js-test-post.js 731 // It's possible for an async test to call finishJSTest() before js-test-post.js
730 // has been parsed. 732 // has been parsed.
731 function finishJSTest() 733 function finishJSTest()
732 { 734 {
733 wasFinishJSTestCalled = true; 735 wasFinishJSTestCalled = true;
734 if (!self.wasPostTestScriptParsed) 736 if (!self.wasPostTestScriptParsed)
735 return; 737 return;
736 isSuccessfullyParsed(); 738 isSuccessfullyParsed();
737 if (self.jsTestIsAsync && self.testRunner) 739 if (self.jsTestIsAsync && self.testRunner)
738 testRunner.notifyDone(); 740 testRunner.notifyDone();
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 testPassed = function(msg) { 813 testPassed = function(msg) {
812 workerPort.postMessage('PASS:' + msg); 814 workerPort.postMessage('PASS:' + msg);
813 }; 815 };
814 finishJSTest = function() { 816 finishJSTest = function() {
815 workerPort.postMessage('DONE:'); 817 workerPort.postMessage('DONE:');
816 }; 818 };
817 debug = function(msg) { 819 debug = function(msg) {
818 workerPort.postMessage(msg); 820 workerPort.postMessage(msg);
819 }; 821 };
820 } 822 }
OLDNEW
« 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