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

Unified Diff: bower_components/polymer-test-tools/htmltest.js

Issue 786953007: npm_modules: Fork bower_components into Polymer 0.4.0 and 0.5.0 versions (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 11 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: bower_components/polymer-test-tools/htmltest.js
diff --git a/bower_components/polymer-test-tools/htmltest.js b/bower_components/polymer-test-tools/htmltest.js
deleted file mode 100644
index a328552f4dc27fd285b74fdb2f2478127dbb07ec..0000000000000000000000000000000000000000
--- a/bower_components/polymer-test-tools/htmltest.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright 2013 The Polymer Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style
- * license that can be found in the LICENSE file.
- */
-
-// if standalone
-if (window.top === window) {
- // if standalone
- var failed = false;
- window.done = function() {
- window.onerror = null;
- if (!failed) {
- var d = document.createElement('pre');
- d.style.cssText = 'padding: 6px; background-color: lightgreen; position: absolute; bottom:0; right:10px;';
- d.textContent = 'Passed';
- document.body.appendChild(d);
- }
- };
- window.onerror = function(x) {
- failed = true;
- var d = document.createElement('pre');
- d.style.cssText = 'padding: 6px; background-color: #FFE0E0; position: absolute; bottom:0; right:10px;';
- d.textContent = 'FAILED: ' + x;
- document.body.appendChild(d);
- };
-} else
-// if part of a test suite
-{
- window.done = function() {
- window.onerror = null;
- parent.postMessage('ok', '*');
- };
-
- window.onerror = function(x) {
- parent.postMessage({error: x}, '*');
- };
-}
-
-window.asyncSeries = function(series, callback, forwardExceptions) {
- series = series.slice();
- var next = function(err) {
- if (err) {
- if (callback) {
- callback(err);
- }
- } else {
- var f = series.shift();
- if (f) {
- if (!forwardExceptions) {
- f(next);
- } else {
- try {
- f(next);
- } catch(e) {
- if (callback) {
- callback(e);
- }
- }
- }
- } else {
- if (callback) {
- callback();
- }
- }
- }
- };
- next();
-};
-
-window.waitFor = function(fn, next, intervalOrMutationEl, timeout, timeoutTime) {
- timeoutTime = timeoutTime || Date.now() + (timeout || 1000);
- intervalOrMutationEl = intervalOrMutationEl || 32;
- try {
- fn();
- } catch (e) {
- if (Date.now() > timeoutTime) {
- throw e;
- } else {
- if (isNaN(intervalOrMutationEl)) {
- intervalOrMutationEl.onMutation(intervalOrMutationEl, function() {
- waitFor(fn, next, intervalOrMutationEl, timeout, timeoutTime);
- });
- } else {
- setTimeout(function() {
- waitFor(fn, next, intervalOrMutationEl, timeout, timeoutTime);
- }, intervalOrMutationEl);
- }
- return;
- }
- }
- next();
-};
« no previous file with comments | « bower_components/polymer-test-tools/ci-support.js ('k') | bower_components/polymer-test-tools/karma-common.conf.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698