diff options
Diffstat (limited to 'test/wpt/tests/service-workers/service-worker/navigation-redirect-to-http.https.html')
-rw-r--r-- | test/wpt/tests/service-workers/service-worker/navigation-redirect-to-http.https.html | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/wpt/tests/service-workers/service-worker/navigation-redirect-to-http.https.html b/test/wpt/tests/service-workers/service-worker/navigation-redirect-to-http.https.html new file mode 100644 index 0000000..d4d2788 --- /dev/null +++ b/test/wpt/tests/service-workers/service-worker/navigation-redirect-to-http.https.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<title>Service Worker: Service Worker can receive HTTP opaqueredirect response.</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="resources/test-helpers.sub.js"></script> +<meta charset="utf-8"> +<body></body> +<script> +async_test(function(t) { + var frame_src = get_host_info()['HTTPS_ORIGIN'] + base_path() + + 'resources/navigation-redirect-to-http-iframe.html'; + function on_message(e) { + assert_equals(e.data.results, 'OK'); + t.done(); + } + + window.addEventListener('message', t.step_func(on_message), false); + + with_iframe(frame_src) + .then(function(frame) { + t.add_cleanup(function() { frame.remove(); }); + }); + }, 'Verify Service Worker can receive HTTP opaqueredirect response.'); +</script> |