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

Unified Diff: remoting/webapp/base.js

Issue 273753002: Implement 3 PIN browser tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Last iteration Created 6 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
« no previous file with comments | « remoting/remoting_webapp_files.gypi ('k') | remoting/webapp/browser_test/browser_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/base.js
diff --git a/remoting/webapp/base.js b/remoting/webapp/base.js
index f010d73442483fff07e1cbb998856e9dfc1ac89f..88c3faa3182c65bc60bd0d744f27e73bf01c4380 100644
--- a/remoting/webapp/base.js
+++ b/remoting/webapp/base.js
@@ -12,7 +12,7 @@
'use strict';
var base = {};
-base.debug = function () {};
+base.debug = function() {};
/**
* Whether to break in debugger and alert when an assertion fails.
@@ -104,7 +104,7 @@ base.doNothing = function() {};
* @param {!Object} dict
* @return {Array}
*/
-base.values = function (dict) {
+base.values = function(dict) {
return Object.keys(dict).map(
/** @param {string} key */
function(key) {
@@ -112,6 +112,20 @@ base.values = function (dict) {
});
};
+base.Promise = function() {};
+
+/**
+ * @param {number} delay
+ * @return {Promise} a Promise that will be fulfilled after |delay| ms.
+ */
+base.Promise.sleep = function(delay) {
+ return new Promise(
+ /** @param {function():void} fulfill */
+ function(fulfill) {
+ window.setTimeout(fulfill, delay);
+ });
+};
+
/**
* A mixin for classes with events.
*
« no previous file with comments | « remoting/remoting_webapp_files.gypi ('k') | remoting/webapp/browser_test/browser_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698