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

Side by Side Diff: LayoutTests/http/tests/resources/js-test-pre.js

Issue 19514006: Explicitly test same/cross-origin importScripts() effect on worker.onerror. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/http/tests/workers/resources/worker-importScripts-error.js » ('j') | 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 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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/workers/resources/worker-importScripts-error.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698