Index: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/registration-iframe.https.html |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/registration-iframe.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/registration-iframe.https.html |
index 7918f40ababf059f05a02d3d66c9b2694e88d154..3f15d24b9118280d845629a8f0e553541106c952 100644 |
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/registration-iframe.https.html |
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/registration-iframe.https.html |
@@ -9,11 +9,11 @@ |
// Set script url and scope url relative to the iframe's document's url. Assert |
// the implementation parses the urls against the iframe's document's url. |
async_test(function(t) { |
- var url = 'resources/blank.html'; |
- var scope = 'registration-for-iframe-from-parent-frame'; |
- var expected_scope = normalizeURL('resources/' + scope); |
- var script = 'empty-worker.js'; |
- var expected_script = normalizeURL('resources/' + script); |
+ const url = 'resources/blank.html'; |
+ const iframe_scope = 'registration-for-iframe-from-parent-frame'; |
falken
2017/03/07 05:00:19
let's make it so the three tests don't all use the
jungkees
2017/03/07 07:02:03
Understood your point. Addressed.
|
+ const scope = normalizeURL('resources/' + iframe_scope); |
+ const iframe_script = 'empty-worker.js'; |
+ const script = normalizeURL('resources/' + iframe_script); |
var frame; |
var registration; |
@@ -22,18 +22,18 @@ async_test(function(t) { |
.then(function(f) { |
frame = f; |
return frame.contentWindow.navigator.serviceWorker.register( |
- script, |
- { scope: scope }); |
+ iframe_script, |
+ { scope: iframe_scope }); |
}) |
.then(function(r) { |
registration = r; |
return wait_for_state(t, r.installing, 'activated'); |
}) |
.then(function() { |
- assert_equals(registration.scope, expected_scope, |
+ assert_equals(registration.scope, scope, |
'registration\'s scope must be parsed against the ' + |
'"relevant global object"'); |
- assert_equals(registration.active.scriptURL, expected_script, |
+ assert_equals(registration.active.scriptURL, script, |
'worker\'s scriptURL must be parsed against the ' + |
'"relevant global object"'); |
frame.remove(); |
@@ -46,9 +46,10 @@ async_test(function(t) { |
// Set script url and scope url relative to the parent frame's document's url. |
// Assert the implementation throws a TypeError exception. |
async_test(function(t) { |
- var url = 'resources/blank.html'; |
- var scope = 'resources/registration-for-iframe-from-parent-frame'; |
- var script = 'resources/empty-worker.js'; |
+ const url = 'resources/blank.html'; |
+ const iframe_scope = 'resources/registration-for-iframe-from-parent-frame'; |
+ const scope = normalizeURL('resources/' + iframe_scope); |
+ const script = 'resources/empty-worker.js'; |
var frame; |
var registration; |
@@ -58,7 +59,7 @@ async_test(function(t) { |
frame = f; |
return frame.contentWindow.navigator.serviceWorker.register( |
script, |
- { scope: scope }); |
+ { scope: iframe_scope }); |
}) |
.then( |
function() { |
@@ -78,9 +79,10 @@ async_test(function(t) { |
// Set the scope url to a non-subdirectory of the script url. Assert the |
// implementation throws a SecurityError exception. |
async_test(function(t) { |
- var url = 'resources/blank.html'; |
- var scope = '../registration-for-iframe-from-parent-frame'; |
- var script = 'empty-worker.js'; |
+ const url = 'resources/blank.html'; |
+ const scope = 'registration-for-iframe-from-parent-frame'; |
+ const iframe_scope = '../' + scope; |
+ const script = 'empty-worker.js'; |
var frame; |
var registration; |
@@ -90,7 +92,7 @@ async_test(function(t) { |
frame = f; |
return frame.contentWindow.navigator.serviceWorker.register( |
script, |
- { scope: scope }); |
+ { scope: iframe_scope }); |
}) |
.then( |
function() { |