Commit d8228dbd authored by xiang.long@intel.com's avatar xiang.long@intel.com

Fix serviceworker default registration scope.

A follow up fix for spec update: https://github.com/slightlyoff/ServiceWorker/issues/312.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176534 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 183c1ccf
...@@ -13,7 +13,7 @@ function scope_test(name, scope) { ...@@ -13,7 +13,7 @@ function scope_test(name, scope) {
if (scope) { if (scope) {
expectedScope = new URL(scope, document.location).toString(); expectedScope = new URL(scope, document.location).toString();
} else { } else {
expectedScope = new URL('*', document.location).toString(); expectedScope = new URL('/*', document.location).toString();
} }
service_worker_unregister_and_register( service_worker_unregister_and_register(
......
...@@ -13,7 +13,7 @@ function scope_test(name, url, scope) { ...@@ -13,7 +13,7 @@ function scope_test(name, url, scope) {
if (scope) if (scope)
expectedScope = normalizeURL(scope); expectedScope = normalizeURL(scope);
else else
expectedScope = normalizeURL('*'); expectedScope = normalizeURL('/*');
var expectedURL = normalizeURL(url); var expectedURL = normalizeURL(url);
service_worker_unregister_and_register(t, url, scope, onRegister); service_worker_unregister_and_register(t, url, scope, onRegister);
......
...@@ -11,7 +11,7 @@ namespace WebCore { ...@@ -11,7 +11,7 @@ namespace WebCore {
struct RegistrationOptionList { struct RegistrationOptionList {
explicit RegistrationOptionList(const Dictionary& options) explicit RegistrationOptionList(const Dictionary& options)
: scope("*") : scope("/*")
{ {
// FIXME: Should be ScalarValueString. http://crbug.com/379009 // FIXME: Should be ScalarValueString. http://crbug.com/379009
options.get("scope", scope); options.get("scope", scope);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment