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); |