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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium.request-end-to-end.html

Issue 2889153004: Upstream service worker "request" tests to WPT (Closed)
Patch Set: Add "use strict" directive Created 3 years, 7 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/chromium.request-end-to-end.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/request-end-to-end.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium.request-end-to-end.html
similarity index 73%
rename from third_party/WebKit/LayoutTests/http/tests/serviceworker/request-end-to-end.html
rename to third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium.request-end-to-end.html
index 9b7c91645316a523a98e9f0ff0af6c65e2775fd1..04fa30b5422003fb42a8f8677cce2b55096e0a91 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/request-end-to-end.html
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium.request-end-to-end.html
@@ -1,9 +1,16 @@
<!DOCTYPE html>
+<!-- This test is prefixed with `chromium.` because the equivalent version
+ available in Web Platform Tests contains additional assertions which Chromium
+ currently fails. This test should be persisted only to preserve test coverage
+ until such time as the upstream version can be made to pass. See
+ https://crbug.com/595993 -->
<title>Service Worker: FetchEvent.request passed to onfetch</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="resources/test-helpers.js"></script>
<script>
+'use strict';
+
promise_test(t => {
var url = 'resources/request-end-to-end-worker.js';
var scope = 'resources/blank.html';
@@ -27,6 +34,11 @@ promise_test(t => {
'TypeError.')
assert_equals(result.credentials, 'include', 'request.credentials');
assert_equals(result.redirect, 'manual', 'request.redirect');
+ // TODO(falken): Chromium should fail this assertion but currently
+ // passes it. The equivalent WPT test instead asserts:
+ // assert_equals(result.headers['user-agent'], undefined);
+ // Once Chromium passes the WPT test assertion, this test file can be
+ // removed.
assert_equals(result.headers['user-agent'], navigator.userAgent,
'User-Agent header');
assert_equals(result.append_header_error, 'TypeError',

Powered by Google App Engine
This is Rietveld 408576698