Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Side by Side Diff: LayoutTests/http/tests/serviceworker/serviceworkerobject-scripturl.html

Issue 468753003: SW tests update (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 467133002 and fix test Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>ServiceWorker object: scriptURL property</title> 2 <title>ServiceWorker object: scriptURL property</title>
3 <script src="../resources/testharness.js"></script> 3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 4 <script src="../resources/testharnessreport.js"></script>
5 <script src="resources/test-helpers.js"></script> 5 <script src="resources/test-helpers.js"></script>
6 <script> 6 <script>
7 7
8 function url_test(name, url) { 8 function url_test(name, url) {
9 var scope = ''; 9 var scope = '';
10 async_test(function(t) { 10 async_test(function(t) {
11 var expectedURL = normalizeURL(url); 11 var expectedURL = normalizeURL(url);
12 service_worker_unregister_and_register(t, url, scope) 12 service_worker_unregister_and_register(t, url, scope)
13 .then(function(registration) {
14 return wait_for_update(t, registration);
15 })
13 .then(t.step_func(function(worker) { 16 .then(t.step_func(function(worker) {
14 assert_equals(worker.scriptURL, expectedURL, 17 assert_equals(worker.scriptURL, expectedURL,
15 'Returned ServiceWorker object should have scriptURL'); 18 'Returned ServiceWorker object should have scriptURL');
16 service_worker_unregister_and_done(t, scope); 19 service_worker_unregister_and_done(t, scope);
17 })); 20 }));
18 t.done(); 21 t.done();
19 }, 'Verify the scriptURL property: ' + name); 22 }, 'Verify the scriptURL property: ' + name);
20 } 23 }
21 24
22 url_test('relative', 'resources/worker-no-op.js'); 25 url_test('relative', 'resources/worker-no-op.js');
23 url_test('with fragment', 'resources/worker-no-op.js#ref'); 26 url_test('with fragment', 'resources/worker-no-op.js#ref');
24 url_test('absolute', 27 url_test('absolute',
25 'http://127.0.0.1:8000/serviceworker/resources/worker-no-op.js'); 28 'http://127.0.0.1:8000/serviceworker/resources/worker-no-op.js');
26 29
27 </script> 30 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698