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

Unified Diff: chrome/test/data/webui/promise_resolver.js

Issue 1758013002: WebUI: Allow rejecting a promise that is returned from cr.sendWithPromise(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-rename Created 4 years, 10 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: chrome/test/data/webui/promise_resolver.js
diff --git a/chrome/test/data/webui/promise_resolver.js b/chrome/test/data/webui/promise_resolver.js
deleted file mode 100644
index 0c0e22683e41ac096289a0a98d201bb9296450c5..0000000000000000000000000000000000000000
--- a/chrome/test/data/webui/promise_resolver.js
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-/**
- * @fileoverview PromiseResolver is a helper class that allows creating a
- * Promise that will be fulfilled (resolved or rejected) some time later.
- *
- * Example:
- * var resolver = new PromiseResolver();
- * resolver.promise.then(function(result) {
- * console.log('resolved with', result);
- * });
- * ...
- * ...
- * resolver.resolve({hello: 'world'});
- */
-
-/**
- * @constructor
- */
-function PromiseResolver() {
- /** @type {!Function} */
- this.resolve;
-
- /** @type {!Function} */
- this.reject;
-
- /** @type {!Promise} */
- this.promise = new Promise(function(resolve, reject) {
- this.resolve = resolve;
- this.reject = reject;
- }.bind(this));
-}
« no previous file with comments | « chrome/browser/ui/webui/settings/site_settings_handler.cc ('k') | chrome/test/data/webui/settings/cr_settings_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698