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

Unified Diff: chrome/test/data/third_party/spaceport/js/util/chainAsync.js

Issue 10134041: Add test data for spaceport benchmark. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/third_party/spaceport/js/util/chainAsync.js
diff --git a/chrome/test/data/third_party/spaceport/js/util/chainAsync.js b/chrome/test/data/third_party/spaceport/js/util/chainAsync.js
new file mode 100644
index 0000000000000000000000000000000000000000..50a180a37718c621524cc8cc8eb0cca6460034d7
--- /dev/null
+++ b/chrome/test/data/third_party/spaceport/js/util/chainAsync.js
@@ -0,0 +1,18 @@
+define([ ], function () {
+ return function chainAsync(functions) {
+ functions = functions.slice();
+
+ function next() {
+ if (functions.length === 0) {
+ return;
+ }
+
+ var fn = functions.shift();
+ fn(function () {
+ setTimeout(next, 0);
+ });
+ }
+
+ setTimeout(next, 0);
+ };
+});
« no previous file with comments | « chrome/test/data/third_party/spaceport/js/util/cacheBust.js ('k') | chrome/test/data/third_party/spaceport/js/util/create.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698