We need to proxy network requests (XHR, importScripts) to an active document.
Created attachment 34904 [details] proposed patch I moved lots of test code around so it could be shared between dedicated and shared workers. The code itself didn't really change other than indentation/location.
Comment on attachment 34904 [details] proposed patch This is pretty big for a single change. Maybe we could re-factor the layout tests first in a separate change?
(In reply to comment #2) > (From update of attachment 34904 [details]) > This is pretty big for a single change. Maybe we could re-factor the layout > tests first in a separate change? I could do this, but given that this entire patch consists of only 24 lines of code (two small functions) in a single file, is it really improving reviewability to break that out? The patch looks big, but 90% of the change is just moving test code from a .html file into a .js file so it can be shared, with no code changes.
Comment on attachment 34904 [details] proposed patch > diff --git a/LayoutTests/http/tests/workers/resources/worker-importScripts.js b/LayoutTests/http/tests/workers/resources/worker-importScripts.js > +if (self.postMessage) > + runTests(); > + else > + onconnect = handleConnect; Indented too far. > diff --git a/LayoutTests/http/tests/xmlhttprequest/workers/resources/close-test.js b/LayoutTests/http/tests/xmlhttprequest/workers/resources/close-test.js > + function done() I realize this is just a copy but it would be nice to fix the indent here.
Committed as r47467.