summaryrefslogtreecommitdiffstats
path: root/test/wpt/tests/service-workers/service-worker/navigation-preload/navigationPreload.https.html
diff options
context:
space:
mode:
Diffstat (limited to 'test/wpt/tests/service-workers/service-worker/navigation-preload/navigationPreload.https.html')
-rw-r--r--test/wpt/tests/service-workers/service-worker/navigation-preload/navigationPreload.https.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/wpt/tests/service-workers/service-worker/navigation-preload/navigationPreload.https.html b/test/wpt/tests/service-workers/service-worker/navigation-preload/navigationPreload.https.html
new file mode 100644
index 0000000..392e5c1
--- /dev/null
+++ b/test/wpt/tests/service-workers/service-worker/navigation-preload/navigationPreload.https.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>ServiceWorker: navigator.serviceWorker.navigationPreload</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../resources/test-helpers.sub.js"></script>
+<script src="resources/helpers.js"></script>
+<script>
+promise_test(async t => {
+ const SCRIPT = '../resources/empty-worker.js';
+ const SCOPE = '../resources/navigationpreload';
+ const registration =
+ await service_worker_unregister_and_register(t, SCRIPT, SCOPE);
+ const navigationPreload = registration.navigationPreload;
+ assert_true(navigationPreload instanceof NavigationPreloadManager,
+ 'ServiceWorkerRegistration.navigationPreload');
+ await registration.unregister();
+}, "The navigationPreload attribute must return service worker " +
+ "registration's NavigationPreloadManager object.");
+</script>