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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/windowclient-navigate.html

Issue 1481523006: ServiceWorker: Should throw TypeError instead of Unknown/SecurityError. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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>Service Worker: WindowClient.navigate() tests</title> 2 <title>Service Worker: WindowClient.navigate() tests</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/get-host-info.js"></script> 5 <script src="../resources/get-host-info.js"></script>
6 <script src="resources/test-helpers.js"></script> 6 <script src="resources/test-helpers.js"></script>
7 <script> 7 <script>
8 8
9 var scope = 'resources/blank.html?windowclient-navigate'; 9 var scope = 'resources/blank.html?windowclient-navigate';
10 var client_frame; 10 var client_frame;
11 var worker; 11 var worker;
12 var test; 12 var test;
13 13
14 var current_index = 0; 14 var current_index = 0;
15 var test_list = [ 15 var test_list = [
16 { url : 'blank.html' }, 16 { url : 'blank.html' },
17 { url : 'blank.html', init : 'uncontrolled/blank.html' }, 17 { url : 'blank.html', init : 'uncontrolled/blank.html' },
18 { url : get_host_info()['HTTP_REMOTE_ORIGIN'] + 18 { url : get_host_info()['HTTP_REMOTE_ORIGIN'] +
19 '/serviceworker/resources/blank.html' }, 19 '/serviceworker/resources/blank.html' },
20 { url : 'http://[example].com' }, 20 { url : 'http://[example].com' },
21 { url : 'view-source://example.com' }, 21 { url : 'view-source://example.com' },
22 { url : 'file:///' }, 22 { url : 'file:///' },
23 { url : 'about:blank' }, 23 { url : 'about:blank' },
24 { url : 'about:crash' } 24 { url : 'about:crash' }
25 ]; 25 ];
26 26
27 var expected = [ 27 var expected = [
28 location.origin + '/serviceworker/resources/blank.html', 28 location.origin + '/serviceworker/resources/blank.html',
29 // TODO(zino): Should TypeError instead of UnknownError. 29 'TypeError',
30 // Please see: http://crbug.com/540503
31 'UnknownError',
32 null, 30 null,
33 'TypeError', 31 'TypeError',
34 // TODO(zino): Should TypeError instead of UnknownError. 32 'TypeError',
35 // Please see: http://crbug.com/540503 33 'TypeError',
36 'UnknownError',
37 'SecurityError',
38 'TypeError', 34 'TypeError',
39 'TypeError' 35 'TypeError'
40 ]; 36 ];
41 37
42 var actual = []; 38 var actual = [];
43 39
44 async_test(function(t) { 40 async_test(function(t) {
45 test = t; 41 test = t;
46 return service_worker_unregister_and_register( 42 return service_worker_unregister_and_register(
47 test, 'resources/windowclient-navigate-worker.js', scope) 43 test, 'resources/windowclient-navigate-worker.js', scope)
(...skipping 22 matching lines...) Expand all
70 client_frame && client_frame.remove(); 66 client_frame && client_frame.remove();
71 var init_url = test_list[current_index].init || scope; 67 var init_url = test_list[current_index].init || scope;
72 with_iframe(init_url).then(function(f) { 68 with_iframe(init_url).then(function(f) {
73 client_frame = f; 69 client_frame = f;
74 port.postMessage(test_list[current_index++].url); 70 port.postMessage(test_list[current_index++].url);
75 }); 71 });
76 } 72 }
77 } 73 }
78 74
79 </script> 75 </script>
OLDNEW
« no previous file with comments | « content/renderer/service_worker/service_worker_context_client.cc ('k') | third_party/WebKit/Source/modules/modules.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698