Index: chrome/test/data/webui/test_api.js |
diff --git a/chrome/test/data/webui/test_api.js b/chrome/test/data/webui/test_api.js |
index be8664310a231be58f9744c91e67ac0f509155e3..f528322c2614612cd6827f1ba890a6cb1b870e0b 100644 |
--- a/chrome/test/data/webui/test_api.js |
+++ b/chrome/test/data/webui/test_api.js |
@@ -44,6 +44,23 @@ var testing = {}; |
*/ |
function Test() {}; |
+ /** |
+ * Make all transitions and animations take 0ms. |
+ * Any animations will still happen and webkit-animation-end should be |
+ * listened to. |
Dan Beam
2015/04/30 23:01:54
please note here that no transition end events wil
hcarmona
2015/04/30 23:16:59
Done.
|
+ */ |
+ Test.disableAnimationsAndTransitions = function() { |
+ var noAnimationStyle = document.createElement('style'); |
Dan Beam
2015/04/30 23:01:54
noAnimationStyle.id = 'no-animation';
hcarmona
2015/04/30 23:16:59
Done.
|
+ noAnimationStyle.textContent = |
+ '* {' + |
+ ' -webkit-transition-duration: 0ms !important;' + |
+ ' -webkit-transition-delay: 0ms !important;' + |
+ ' -webkit-animation-duration: 0ms !important;' + |
+ ' -webkit-animation-delay: 0ms !important;' + |
+ '}'; |
+ document.querySelector('head').appendChild(noAnimationStyle); |
+ }; |
+ |
Test.prototype = { |
/** |
* The name of the test. |