location.origin is undefined in a web worker
https://bugs.webkit.org/show_bug.cgi?id=151614

Reviewed by Darin Adler.

Source/WebCore:

Expose location.origin to web workers, as per:
https://html.spec.whatwg.org/multipage/workers.html#workerlocation

This behavior is consistent with the behavior of Firefox and Chrome.

Test: fast/workers/worker-location.html

* workers/WorkerLocation.cpp:
(WebCore::WorkerLocation::origin):
* workers/WorkerLocation.h:
* workers/WorkerLocation.idl:

LayoutTests:

Update existing layout test to confirm the existence of location.origin when in a
WorkerGlobalScope.

* fast/workers/resources/worker-location.js:
* fast/workers/worker-location-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@192810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
7 files changed