Chromium Code Reviews| 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 testRunner.dumpAsText(self.enablePixelTesting); | 3 testRunner.dumpAsText(self.enablePixelTesting); |
| 4 | 4 |
| 5 var description, debug, successfullyParsed, errorMessage; | 5 var description, debug, successfullyParsed, errorMessage; |
| 6 | 6 |
| 7 (function() { | 7 (function() { |
| 8 | 8 |
| 9 function getOrCreate(id, tagName) | 9 function getOrCreate(id, tagName) |
| 10 { | 10 { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 65 function insertStyleSheet() | 65 function insertStyleSheet() |
| 66 { | 66 { |
| 67 var styleElement = document.createElement("style"); | 67 var styleElement = document.createElement("style"); |
| 68 styleElement.textContent = css; | 68 styleElement.textContent = css; |
| 69 (document.head || document.documentElement).appendChild(styleElement); | 69 (document.head || document.documentElement).appendChild(styleElement); |
| 70 } | 70 } |
| 71 | 71 |
| 72 if (!isWorker()) | 72 if (!isWorker()) |
| 73 insertStyleSheet(); | 73 insertStyleSheet(); |
| 74 | 74 |
| 75 self.onerror = function(message) | 75 if (!self.isOnErrorTest) { |
|
do-not-use
2013/07/24 15:11:29
nit: Should we update LayoutTests/fast/js/resource
do-not-use
2013/07/24 15:11:29
Should we update LayoutTests/fast/js/resources/js-
Mike West
2013/07/24 15:21:57
We should, good idea. I'll add that.
| |
| 76 { | 76 self.onerror = function(message) |
| 77 errorMessage = message; | 77 { |
| 78 }; | 78 errorMessage = message; |
| 79 }; | |
| 80 } | |
| 79 | 81 |
| 80 })(); | 82 })(); |
| 81 | 83 |
| 82 function isWorker() | 84 function isWorker() |
| 83 { | 85 { |
| 84 // It's conceivable that someone would stub out 'document' in a worker so | 86 // It's conceivable that someone would stub out 'document' in a worker so |
| 85 // also check for childNodes, an arbitrary DOM-related object that is | 87 // also check for childNodes, an arbitrary DOM-related object that is |
| 86 // meaningless in a WorkerContext. | 88 // meaningless in a WorkerContext. |
| 87 return (typeof document === 'undefined' || typeof document.childNodes === 'u ndefined') && !!self.importScripts; | 89 return (typeof document === 'undefined' || typeof document.childNodes === 'u ndefined') && !!self.importScripts; |
| 88 } | 90 } |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 555 testPassed = function(msg) { | 557 testPassed = function(msg) { |
| 556 workerPort.postMessage('PASS:' + msg); | 558 workerPort.postMessage('PASS:' + msg); |
| 557 } | 559 } |
| 558 finishJSTest = function() { | 560 finishJSTest = function() { |
| 559 workerPort.postMessage('DONE:'); | 561 workerPort.postMessage('DONE:'); |
| 560 } | 562 } |
| 561 debug = function(msg) { | 563 debug = function(msg) { |
| 562 workerPort.postMessage(msg); | 564 workerPort.postMessage(msg); |
| 563 } | 565 } |
| 564 } | 566 } |
| OLD | NEW |