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

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

Issue 1915003002: Fix abort-on-changestate-headers-received.html so it passes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « third_party/WebKit/LayoutTests/TestExpectations ('k') | 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 // js-test now supports lazily printing test results which dumps all test 1 // js-test now supports lazily printing test results which dumps all test
2 // results once at the end of the test instead of building them up. To enable 2 // results once at the end of the test instead of building them up. To enable
3 // this option, call setPrintTestResultsLazily() before running any tests. 3 // this option, call setPrintTestResultsLazily() before running any tests.
4 var _lazyTestResults; // Set by setPrintTestResultsLazily(). 4 var _lazyTestResults; // Set by setPrintTestResultsLazily().
5 var _lazyDescription; // Set by description() after setPrintTestResultsLazily(). 5 var _lazyDescription; // Set by description() after setPrintTestResultsLazily().
6 6
7 // svg/dynamic-updates tests set enablePixelTesting=true, as we want to dump tex t + pixel results 7 // svg/dynamic-updates tests set enablePixelTesting=true, as we want to dump tex t + pixel results
8 if (self.testRunner) { 8 if (self.testRunner) {
9 if (self.enablePixelTesting) 9 if (self.enablePixelTesting)
10 testRunner.dumpAsTextWithPixelResults(); 10 testRunner.dumpAsTextWithPixelResults();
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 testFailed("expectError() not called before shouldHaveHadError()"); 758 testFailed("expectError() not called before shouldHaveHadError()");
759 } 759 }
760 760
761 // With Oilpan tests that rely on garbage collection need to go through 761 // With Oilpan tests that rely on garbage collection need to go through
762 // the event loop in order to get precise garbage collections. Oilpan 762 // the event loop in order to get precise garbage collections. Oilpan
763 // uses conservative stack scanning when not at the event loop and that 763 // uses conservative stack scanning when not at the event loop and that
764 // can artificially keep objects alive. Therefore, tests that need to check 764 // can artificially keep objects alive. Therefore, tests that need to check
765 // that something is dead need to use this asynchronous collectGarbage 765 // that something is dead need to use this asynchronous collectGarbage
766 // function. 766 // function.
767 function asyncGC(callback) { 767 function asyncGC(callback) {
768 var documentsBefore = window.internals.numberOfLiveDocuments();
768 GCController.collectAll(); 769 GCController.collectAll();
769 // FIXME: we need a better way of waiting for chromium events to happen 770 // FIXME: we need a better way of waiting for chromium events to happen
770 setTimeout(callback, 0); 771 setTimeout(function () {
772 var documentsAfter = window.internals.numberOfLiveDocuments();
773 if (documentsAfter < documentsBefore)
774 asyncGC(callback);
775 else
776 callback();
777 }, 0);
771 } 778 }
772 779
773 function gc() { 780 function gc() {
774 if (typeof GCController !== "undefined") 781 if (typeof GCController !== "undefined")
775 GCController.collectAll(); 782 GCController.collectAll();
776 else { 783 else {
777 var gcRec = function (n) { 784 var gcRec = function (n) {
778 if (n < 1) 785 if (n < 1)
779 return {}; 786 return {};
780 var temp = {i: "ab" + i + (i / 100000)}; 787 var temp = {i: "ab" + i + (i / 100000)};
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 testPassed = function(msg) { 920 testPassed = function(msg) {
914 workerPort.postMessage('PASS:' + msg); 921 workerPort.postMessage('PASS:' + msg);
915 }; 922 };
916 finishJSTest = function() { 923 finishJSTest = function() {
917 workerPort.postMessage('DONE:'); 924 workerPort.postMessage('DONE:');
918 }; 925 };
919 debug = function(msg) { 926 debug = function(msg) {
920 workerPort.postMessage(msg); 927 workerPort.postMessage(msg);
921 }; 928 };
922 } 929 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698