| 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 isJsTest = true; | 9 var isJsTest = true; |
| 10 | 10 |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 } | 684 } |
| 685 | 685 |
| 686 // With Oilpan tests that rely on garbage collection need to go through | 686 // With Oilpan tests that rely on garbage collection need to go through |
| 687 // the event loop in order to get precise garbage collections. Oilpan | 687 // the event loop in order to get precise garbage collections. Oilpan |
| 688 // uses conservative stack scanning when not at the event loop and that | 688 // uses conservative stack scanning when not at the event loop and that |
| 689 // can artificially keep objects alive. Therefore, tests that need to check | 689 // can artificially keep objects alive. Therefore, tests that need to check |
| 690 // that something is dead need to use this asynchronous collectGarbage | 690 // that something is dead need to use this asynchronous collectGarbage |
| 691 // function. | 691 // function. |
| 692 function asyncGC(callback) { | 692 function asyncGC(callback) { |
| 693 GCController.collectAll(); | 693 GCController.collectAll(); |
| 694 setTimeout(callback, 0); | 694 // FIXME: we need a better way of waiting for chromium events to happen |
| 695 setTimeout(callback, 1); |
| 695 } | 696 } |
| 696 | 697 |
| 697 function gc() { | 698 function gc() { |
| 698 if (typeof GCController !== "undefined") | 699 if (typeof GCController !== "undefined") |
| 699 GCController.collectAll(); | 700 GCController.collectAll(); |
| 700 else { | 701 else { |
| 701 var gcRec = function (n) { | 702 var gcRec = function (n) { |
| 702 if (n < 1) | 703 if (n < 1) |
| 703 return {}; | 704 return {}; |
| 704 var temp = {i: "ab" + i + (i / 100000)}; | 705 var temp = {i: "ab" + i + (i / 100000)}; |
| 705 temp += "foo"; | 706 temp += "foo"; |
| 706 gcRec(n-1); | 707 gcRec(n-1); |
| 707 }; | 708 }; |
| 708 for (var i = 0; i < 1000; i++) | 709 for (var i = 0; i < 1000; i++) |
| 709 gcRec(10); | 710 gcRec(10); |
| 710 } | 711 } |
| 711 } | 712 } |
| 712 | 713 |
| 713 function asyncMinorGC(callback) { | 714 function asyncMinorGC(callback) { |
| 714 if (typeof GCController !== "undefined") | 715 if (typeof GCController !== "undefined") |
| 715 GCController.minorCollect(); | 716 GCController.minorCollect(); |
| 716 else | 717 else |
| 717 testFailed("Minor GC is available only when you enable the --expose-gc o
ption in V8."); | 718 testFailed("Minor GC is available only when you enable the --expose-gc o
ption in V8."); |
| 718 setTimeout(callback, 0); | 719 // FIXME: we need a better way of waiting for chromium events to happen |
| 720 setTimeout(callback, 1); |
| 719 } | 721 } |
| 720 | 722 |
| 721 function isSuccessfullyParsed() | 723 function isSuccessfullyParsed() |
| 722 { | 724 { |
| 723 // FIXME: Remove this and only report unexpected syntax errors. | 725 // FIXME: Remove this and only report unexpected syntax errors. |
| 724 successfullyParsed = !unexpectedErrorMessage; | 726 successfullyParsed = !unexpectedErrorMessage; |
| 725 shouldBeTrue("successfullyParsed"); | 727 shouldBeTrue("successfullyParsed"); |
| 726 debug('<br /><span class="pass">TEST COMPLETE</span>'); | 728 debug('<br /><span class="pass">TEST COMPLETE</span>'); |
| 727 } | 729 } |
| 728 | 730 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 testPassed = function(msg) { | 815 testPassed = function(msg) { |
| 814 workerPort.postMessage('PASS:' + msg); | 816 workerPort.postMessage('PASS:' + msg); |
| 815 }; | 817 }; |
| 816 finishJSTest = function() { | 818 finishJSTest = function() { |
| 817 workerPort.postMessage('DONE:'); | 819 workerPort.postMessage('DONE:'); |
| 818 }; | 820 }; |
| 819 debug = function(msg) { | 821 debug = function(msg) { |
| 820 workerPort.postMessage(msg); | 822 workerPort.postMessage(msg); |
| 821 }; | 823 }; |
| 822 } | 824 } |
| OLD | NEW |