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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/cache-storage/resources/testharness-helpers.js

Issue 2547023002: Import wpt@3c8896ae408c8fd594979da7c99970029e7856a7 (Closed)
Patch Set: Modify TestExpectations or download new baselines for tests. Created 4 years 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/imported/wpt/service-workers/cache-storage/resources/testharness-helpers.js
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/service-workers/cache-storage/resources/testharness-helpers.js b/third_party/WebKit/LayoutTests/imported/wpt/service-workers/cache-storage/resources/testharness-helpers.js
deleted file mode 100644
index e4885727b321c704dcb434ee9ad7158312735294..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/wpt/service-workers/cache-storage/resources/testharness-helpers.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * testharness-helpers contains various useful extensions to testharness.js to
- * allow them to be used across multiple tests before they have been
- * upstreamed. This file is intended to be usable from both document and worker
- * environments, so code should for example not rely on the DOM.
- */
-
-// Returns a promise that fulfills after the provided |promise| is fulfilled.
-// The |test| succeeds only if |promise| rejects with an exception matching
-// |code|. Accepted values for |code| follow those accepted for assert_throws().
-// The optional |description| describes the test being performed.
-//
-// E.g.:
-// assert_promise_rejects(
-// new Promise(...), // something that should throw an exception.
-// 'NotFoundError',
-// 'Should throw NotFoundError.');
-//
-// assert_promise_rejects(
-// new Promise(...),
-// new TypeError(),
-// 'Should throw TypeError');
-function assert_promise_rejects(promise, code, description) {
- return promise.then(
- function() {
- throw 'assert_promise_rejects: ' + description + ' Promise did not reject.';
- },
- function(e) {
- if (code !== undefined) {
- assert_throws(code, function() { throw e; }, description);
- }
- });
-}

Powered by Google App Engine
This is Rietveld 408576698