Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <script src="../resources/testharness.js"></script> | |
| 3 <script src="../resources/testharnessreport.js"></script> | |
| 4 <script src="resources/test-helpers.js"></script> | |
| 5 <body> | |
| 6 <script> | |
| 7 var worker = 'resources/fetch-event-client-attribute-test-worker.js'; | |
| 8 | |
| 9 function test() { | |
|
jsbell
2015/05/05 17:45:42
Please do not override the `test` function provide
Paritosh Kumar
2015/05/06 11:42:36
Ohh sorry for noise, this was useless method.
| |
| 10 window.onmessage = function(e) {assert_equals(e.data.actual, e.data.expected) } | |
| 11 } | |
| 12 | |
| 13 async_test(function(t) { | |
|
jsbell
2015/05/05 17:45:42
You should be able to use service_worker_test() to
Paritosh Kumar
2015/05/06 11:42:36
Using primise_test, as do not have an appropriate
| |
| 14 var scope = 'resources/simple.html'; | |
| 15 service_worker_unregister_and_register(t, worker, scope) | |
| 16 .then(function(reg) { | |
| 17 return wait_for_state(t, reg.installing, 'activated'); | |
| 18 }) | |
| 19 .then(function() { return with_iframe(scope); }) | |
| 20 .then(function(frame) { | |
| 21 | |
| 22 assert_equals(frame.contentDocument.body.textContent, "top-level", "fr ameType should be Top-Level"); | |
| 23 frame.remove(); | |
| 24 return service_worker_unregister_and_done(t, scope); | |
| 25 }) | |
| 26 .catch(unreached_rejection(t)); | |
| 27 }, 'Service Worker responds to fetch event with client frameType'); | |
| 28 | |
| 29 </script> | |
| 30 </body> | |
| OLD | NEW |