OLD | NEW |
---|---|
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 description, debug, successfullyParsed; | 9 var description, debug, successfullyParsed; |
10 | 10 |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
642 testPassed("Got expected error: '" + message + "'"); | 642 testPassed("Got expected error: '" + message + "'"); |
643 else | 643 else |
644 testFailed("Unexpected error '" + message + "'"); | 644 testFailed("Unexpected error '" + message + "'"); |
645 expectedErrorMessage = undefined; | 645 expectedErrorMessage = undefined; |
646 return; | 646 return; |
647 } | 647 } |
648 | 648 |
649 testFailed("expectError() not called before shouldHaveHadError()"); | 649 testFailed("expectError() not called before shouldHaveHadError()"); |
650 } | 650 } |
651 | 651 |
652 // With Oilpan tests that rely on garbage collection need to go through | |
653 // the event loop in order to get precise garbage collections. Oilpan | |
654 // uses conservative stack scanning when not at the event loop and that | |
655 // can artificially keep objects alive. Therfore, test that need to check | |
wibling-chromium
2014/04/01 13:26:09
NIT: Therfore -> Therefore
test -> tests
Mads Ager (chromium)
2014/04/01 13:45:38
Done.
| |
656 // that something is dead need to use this asynchronous collectGarbage | |
657 // function. | |
658 function collectGarbage(callback) { | |
659 GCController.collect(); | |
wibling-chromium
2014/04/01 13:26:09
Consider adding a comment explaining why we do sev
Mads Ager (chromium)
2014/04/01 13:45:38
Yes, done.
| |
660 setTimeout(function() { | |
661 GCController.collect(); | |
662 setTimeout(function() { | |
663 GCController.collect(); | |
664 setTimeout(function() { | |
665 GCController.collect(); | |
666 setTimeout(callback, 0); | |
667 }, 0); | |
668 }, 0); | |
669 }, 0); | |
670 } | |
671 | |
652 function gc() { | 672 function gc() { |
653 if (typeof GCController !== "undefined") | 673 if (typeof GCController !== "undefined") |
654 GCController.collectAll(); | 674 GCController.collectAll(); |
655 else { | 675 else { |
656 var gcRec = function (n) { | 676 var gcRec = function (n) { |
657 if (n < 1) | 677 if (n < 1) |
658 return {}; | 678 return {}; |
659 var temp = {i: "ab" + i + (i / 100000)}; | 679 var temp = {i: "ab" + i + (i / 100000)}; |
660 temp += "foo"; | 680 temp += "foo"; |
661 gcRec(n-1); | 681 gcRec(n-1); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
765 testPassed = function(msg) { | 785 testPassed = function(msg) { |
766 workerPort.postMessage('PASS:' + msg); | 786 workerPort.postMessage('PASS:' + msg); |
767 }; | 787 }; |
768 finishJSTest = function() { | 788 finishJSTest = function() { |
769 workerPort.postMessage('DONE:'); | 789 workerPort.postMessage('DONE:'); |
770 }; | 790 }; |
771 debug = function(msg) { | 791 debug = function(msg) { |
772 workerPort.postMessage(msg); | 792 workerPort.postMessage(msg); |
773 }; | 793 }; |
774 } | 794 } |
OLD | NEW |