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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/service-worker-allowed.html

Issue 1926813004: Replace assert_promise_rejects with upstream promise_rejects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove all testharness-helpers.js references Created 4 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/service-worker-allowed.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/service-worker-allowed.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/service-worker-allowed.html
index 1ab415256ed115ae40451091895f5ac141382a2e..f72d485d40f996c6c3e635eb8ee6b4577b090560 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/service-worker-allowed.html
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/service-worker-allowed.html
@@ -4,7 +4,6 @@
-->
<title>Service Worker: Service-Worker-Allowed header</title>
<script src="../../resources/testharness.js"></script>
-<script src="../../resources/testharness-helpers.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/get-host-info.js"></script>
<script src="../resources/test-helpers.js"></script>
@@ -51,9 +50,9 @@ promise_test(function(t) {
var script = 'resources/service-worker-allowed-worker.php' +
'?ServiceWorkerAllowed=/allowed-path';
var scope = '/disallowed-path';
- return assert_promise_rejects(
- navigator.serviceWorker.register(script, {scope: scope}),
+ return promise_rejects(t,
'SecurityError',
+ navigator.serviceWorker.register(script, {scope: scope}),
'Registering outside Service-Worker-Allowed path should fail');
}, 'Registering outside Service-Worker-Allowed path');
@@ -61,9 +60,9 @@ promise_test(function(t) {
var script = 'resources/service-worker-allowed-worker.php' +
'?ServiceWorkerAllowed=../allowed-path-with-parent';
var scope = '/allowed-path-with-parent';
- return assert_promise_rejects(
- navigator.serviceWorker.register(script, {scope: scope}),
+ return promise_rejects(t,
'SecurityError',
+ navigator.serviceWorker.register(script, {scope: scope}),
'Registering outside Service-Worker-Allowed path with parent ' +
'reference should fail');
}, 'Registering outside Service-Worker-Allowed path with parent reference');
@@ -75,9 +74,9 @@ promise_test(function(t) {
'?ServiceWorkerAllowed=' +
host_info.HTTP_REMOTE_ORIGIN + '/cross-origin/';
var scope = '/cross-origin/';
- return assert_promise_rejects(
- navigator.serviceWorker.register(script, {scope: scope}),
+ return promise_rejects(t,
'SecurityError',
+ navigator.serviceWorker.register(script, {scope: scope}),
'Registering cross-origin Service-Worker-Allowed should fail');
}, 'Registering cross-origin Service-Worker-Allowed');

Powered by Google App Engine
This is Rietveld 408576698