Chromium Code Reviews| 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..f32f5fb5cac4d0ab2ad8fa4dcea7cfa6f409c6eb 100644 |
| --- a/chrome/test/data/webui/test_api.js |
| +++ b/chrome/test/data/webui/test_api.js |
| @@ -220,6 +220,23 @@ var testing = {}; |
| }, |
| /** |
| + * Make all transitions and animations take 0ms. |
| + * Any animations will still happen and webkit-animation-end should be |
| + * listened to. |
| + */ |
| + disableAnimationsAndTransitions: function() { |
|
Dan Beam
2015/04/27 18:29:58
make this static
hcarmona
2015/04/29 19:12:32
Done.
|
| + var noAnimationStyle = document.createElement('style'); |
| + 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); |
| + }, |
| + |
| + /** |
| * Create a new class to handle |messageNames|, assign it to |
| * |this.mockHandler|, register its messages and return it. |
| * @return {Mock} Mock handler class assigned to |this.mockHandler|. |