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

Side by Side Diff: chrome/test/data/webui/test_api.js

Issue 2689163002: Remove webkit prefixes for CSS Animation in chrome/ styles (Closed)
Patch Set: rebase Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « chrome/test/data/webui/print_preview.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Library providing basic test framework functionality. 6 * @fileoverview Library providing basic test framework functionality.
7 */ 7 */
8 8
9 // See assert.js for where this is used. 9 // See assert.js for where this is used.
10 this.traceAssertionsForTesting = true; 10 this.traceAssertionsForTesting = true;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 * fixture's configuration and callback methods for the various phases of 43 * fixture's configuration and callback methods for the various phases of
44 * invoking a test. It is called "Test" rather than TestFixture to roughly 44 * invoking a test. It is called "Test" rather than TestFixture to roughly
45 * mimic the gtest's class names. 45 * mimic the gtest's class names.
46 * @constructor 46 * @constructor
47 */ 47 */
48 function Test() {}; 48 function Test() {};
49 49
50 /** 50 /**
51 * Make all transitions and animations take 0ms. NOTE: this will completely 51 * Make all transitions and animations take 0ms. NOTE: this will completely
52 * disable webkitTransitionEnd events. If your code relies on them firing, it 52 * disable webkitTransitionEnd events. If your code relies on them firing, it
53 * will break. webkitAnimationEnd events should still work. 53 * will break. animationend events should still work.
54 */ 54 */
55 Test.disableAnimationsAndTransitions = function() { 55 Test.disableAnimationsAndTransitions = function() {
56 var noAnimationStyle = document.createElement('style'); 56 var noAnimationStyle = document.createElement('style');
57 noAnimationStyle.id = 'no-animation'; 57 noAnimationStyle.id = 'no-animation';
58 noAnimationStyle.textContent = 58 noAnimationStyle.textContent =
59 '*, * /deep/ * {' + 59 '*, * /deep/ * {' +
60 ' -webkit-transition-duration: 0ms !important;' + 60 ' -webkit-transition-duration: 0ms !important;' +
61 ' -webkit-transition-delay: 0ms !important;' + 61 ' -webkit-transition-delay: 0ms !important;' +
62 ' -webkit-animation-duration: 0ms !important;' + 62 ' animation-duration: 0ms !important;' +
63 ' -webkit-animation-delay: 0ms !important;' + 63 ' animation-delay: 0ms !important;' +
64 '}'; 64 '}';
65 document.querySelector('head').appendChild(noAnimationStyle); 65 document.querySelector('head').appendChild(noAnimationStyle);
66 66
67 var realElementAnimate = Element.prototype.animate; 67 var realElementAnimate = Element.prototype.animate;
68 Element.prototype.animate = function(keyframes, opt_options) { 68 Element.prototype.animate = function(keyframes, opt_options) {
69 if (typeof opt_options == 'object') 69 if (typeof opt_options == 'object')
70 opt_options.duration = 0; 70 opt_options.duration = 0;
71 else 71 else
72 opt_options = 0; 72 opt_options = 0;
73 return realElementAnimate.call(this, keyframes, opt_options); 73 return realElementAnimate.call(this, keyframes, opt_options);
(...skipping 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after
1753 exports.runTest = runTest; 1753 exports.runTest = runTest;
1754 exports.runTestFunction = runTestFunction; 1754 exports.runTestFunction = runTestFunction;
1755 exports.DUMMY_URL = DUMMY_URL; 1755 exports.DUMMY_URL = DUMMY_URL;
1756 exports.TEST = TEST; 1756 exports.TEST = TEST;
1757 exports.TEST_F = TEST_F; 1757 exports.TEST_F = TEST_F;
1758 exports.RUNTIME_TEST_F = TEST_F; 1758 exports.RUNTIME_TEST_F = TEST_F;
1759 exports.GEN = GEN; 1759 exports.GEN = GEN;
1760 exports.GEN_INCLUDE = GEN_INCLUDE; 1760 exports.GEN_INCLUDE = GEN_INCLUDE;
1761 exports.WhenTestDone = WhenTestDone; 1761 exports.WhenTestDone = WhenTestDone;
1762 })(this); 1762 })(this);
OLDNEW
« no previous file with comments | « chrome/test/data/webui/print_preview.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698