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

Unified Diff: polymer_1.2.3/bower_components/iron-test-helpers/test-helpers.js

Issue 1581713003: [third_party] add polymer 1.2.3 (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: 1.2.3 Created 4 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: polymer_1.2.3/bower_components/iron-test-helpers/test-helpers.js
diff --git a/polymer_1.0.4/bower_components/iron-test-helpers/test-helpers.js b/polymer_1.2.3/bower_components/iron-test-helpers/test-helpers.js
similarity index 76%
copy from polymer_1.0.4/bower_components/iron-test-helpers/test-helpers.js
copy to polymer_1.2.3/bower_components/iron-test-helpers/test-helpers.js
index 3465186b72f8aa219eb1c84c77e8cab2761e7a63..adaf692e9de6622344c083ad162ebb411eb6e11f 100644
--- a/polymer_1.0.4/bower_components/iron-test-helpers/test-helpers.js
+++ b/polymer_1.2.3/bower_components/iron-test-helpers/test-helpers.js
@@ -8,6 +8,7 @@
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
(function(global) {
+ 'use strict';
global.flushAsynchronousOperations = function() {
// force distribution
@@ -30,10 +31,29 @@
bubbles: true,
cancelable: true
});
- for (p in props) {
+ for (var p in props) {
event[p] = props[p];
}
node.dispatchEvent(event);
};
+ global.skipUnless = function(condition, test) {
+ var isAsyncTest = !!test.length;
+
+ return function(done) {
+ var testCalledDone = false;
+
+ if (!condition()) {
+ return done();
+ }
+
+ var result = test.call(this, done);
+
+ if (!isAsyncTest) {
+ done();
+ }
+
+ return result;
+ };
+ };
})(this);

Powered by Google App Engine
This is Rietveld 408576698