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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/request-headers.html

Issue 2735443002: Refactor ServiceWorker tests for inclusion in WPT (Closed)
Patch Set: Upstream service worker nav. preload tests to WPT Created 3 years, 9 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/request-headers.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/request-headers.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/request-headers.html
deleted file mode 100644
index 8dfee496af901fd3d2afa33efa503e70670e7349..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/request-headers.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Navigation Preload request headers</title>
-<script src="../../resources/testharness.js"></script>
-<script src="../../resources/testharnessreport.js"></script>
-<script src="../resources/test-helpers.js"></script>
-<script>
-promise_test(t => {
- var script = 'resources/request-headers-worker.js';
- var scope = 'resources/request-headers-scope.php';
- return service_worker_unregister_and_register(t, script, scope)
- .then(registration => {
- add_completion_callback(_ => registration.unregister());
- var worker = registration.installing;
- return wait_for_state(t, worker, 'activated');
- })
- .then(_ => with_iframe(scope))
- .then(frame => {
- var headers = JSON.parse(frame.contentDocument.body.textContent);
- assert_equals(
- headers['HTTP_SERVICE_WORKER_NAVIGATION_PRELOAD'],
- 'hello',
- 'The header of Navigation Preload request must have correct ' +
- '"Service-Worker-Navigation-Preload" header.');
- assert_equals(
- headers['HTTP_UPGRADE_INSECURE_REQUESTS'],
- '1',
- 'The header of Navigation Preload request must have ' +
- '"Upgrade-Insecure-Requests" header.');
- });
- }, 'Navigation Preload request headers.');
-
-</script>

Powered by Google App Engine
This is Rietveld 408576698