OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <meta charset=utf-8> | 2 <meta charset=utf-8> |
3 <title>Service Worker: WindowClient.navigate</title> | 3 <title>Service Worker: WindowClient.navigate</title> |
4 <script src=/resources/testharness.js></script> | 4 <script src=/resources/testharness.js></script> |
5 <script src=/resources/testharnessreport.js></script> | 5 <script src=/resources/testharnessreport.js></script> |
6 <script src="resources/get-host-info.sub.js"></script> | 6 <script src="/common/get-host-info.sub.js"></script> |
7 <script src="resources/test-helpers.sub.js"></script> | 7 <script src="resources/test-helpers.sub.js"></script> |
8 <script> | 8 <script> |
9 function wait_for_message(msg) { | 9 function wait_for_message(msg) { |
10 return new Promise(function(resolve, reject) { | 10 return new Promise(function(resolve, reject) { |
11 var get_message_data = function get_message_data(e) { | 11 var get_message_data = function get_message_data(e) { |
12 window.removeEventListener("message", get_message_data); | 12 window.removeEventListener("message", get_message_data); |
13 resolve(e.data); | 13 resolve(e.data); |
14 } | 14 } |
15 window.addEventListener("message", get_message_data, false); | 15 window.addEventListener("message", get_message_data, false); |
16 }); | 16 }); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 assert_equals( | 108 assert_equals( |
109 frame.contentWindow.location.href, | 109 frame.contentWindow.location.href, |
110 new URL("resources/client-navigate-frame.html", | 110 new URL("resources/client-navigate-frame.html", |
111 location).toString()); | 111 location).toString()); |
112 frame.contentWindow.document.body.style = "background-color: green" | 112 frame.contentWindow.document.body.style = "background-color: green" |
113 }) | 113 }) |
114 .catch(unreached_rejection(t)) | 114 .catch(unreached_rejection(t)) |
115 .then(___ => service_worker_unregister(t, scope)); | 115 .then(___ => service_worker_unregister(t, scope)); |
116 }, "Frame location should not update on failed navigation"); | 116 }, "Frame location should not update on failed navigation"); |
117 </script> | 117 </script> |
OLD | NEW |