Correctly resolve empty script URLs in Worker constructors.

When creating workers via thei constructors, the spec permits empty
strings to be given to the URL resolution step,

  http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#dedicated-workers-and-the-worker-interface
  (or http://dev.w3.org/html5/workers/#dedicated-workers-and-the-worker-interface .)
  [ The shared worker case just below has the same resolution step. ]

Resolving such an URL should result in the base URL being
returned. Align with this, and drop restriction on the string having
to be non-empty. This mirrors how Gecko, Trident and Presto behaves.

It also aligns with how importScripts() behaves when resolving its
arguments.

R=
BUG=301575

Review URL: https://codereview.chromium.org/84423002

git-svn-id: svn://svn.chromium.org/blink/trunk@162624 bbb929c8-8fbe-4397-9dbb-9b2b20218538
5 files changed
tree: a3d5811c82584651a92fec316c5efc9417eee21b
  1. third_party/