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

Side by Side Diff: LayoutTests/animations/resources/animation-test-helpers.js

Issue 24438004: Rename testRunner.dumpAsText(true) to testRunner.dumpAsTextWithPixelResults() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: more tests Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 /* This is the helper function to run animation tests: 1 /* This is the helper function to run animation tests:
2 2
3 Test page requirements: 3 Test page requirements:
4 - The body must contain an empty div with id "result" 4 - The body must contain an empty div with id "result"
5 - Call this function directly from the <script> inside the test page 5 - Call this function directly from the <script> inside the test page
6 6
7 Function parameters: 7 Function parameters:
8 expected [required]: an array of arrays defining a set of CSS properties tha t must have given values at specific times (see below) 8 expected [required]: an array of arrays defining a set of CSS properties tha t must have given values at specific times (see below)
9 callbacks [optional]: a function to be executed immediately after animation starts; 9 callbacks [optional]: a function to be executed immediately after animation starts;
10 or, an object in the form {time: function} containing functions to be 10 or, an object in the form {time: function} containing functions to be
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 if (isTransitionsTest) 649 if (isTransitionsTest)
650 checks[timeMs].push(checkExpectedTransitionValue.bind(null, expected , i)); 650 checks[timeMs].push(checkExpectedTransitionValue.bind(null, expected , i));
651 else 651 else
652 checks[timeMs].push(checkExpectedValue.bind(null, expected, i)); 652 checks[timeMs].push(checkExpectedValue.bind(null, expected, i));
653 } 653 }
654 654
655 var doPixelTest = Boolean(doPixelTest); 655 var doPixelTest = Boolean(doPixelTest);
656 useResultElement = doPixelTest; 656 useResultElement = doPixelTest;
657 657
658 if (window.testRunner) { 658 if (window.testRunner) {
659 testRunner.dumpAsText(doPixelTest); 659 if (doPixelTest) {
660 testRunner.dumpAsTextWithPixelResults();
661 } else {
662 testRunner.dumpAsText();
663 }
660 testRunner.waitUntilDone(); 664 testRunner.waitUntilDone();
661 } 665 }
662 666
663 var started = false; 667 var started = false;
664 var target = isTransitionsTest ? window : document; 668 var target = isTransitionsTest ? window : document;
665 var event = isTransitionsTest ? 'load' : 'webkitAnimationStart'; 669 var event = isTransitionsTest ? 'load' : 'webkitAnimationStart';
666 target.addEventListener(event, function() { 670 target.addEventListener(event, function() {
667 if (!started) { 671 if (!started) {
668 log('First ' + event + ' event fired'); 672 log('First ' + event + ' event fired');
669 started = true; 673 started = true;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 [1] If the CSS property name is "-webkit-transform", expected value must be an array of 1 or more numbers corresponding to the matrix elements, 706 [1] If the CSS property name is "-webkit-transform", expected value must be an array of 1 or more numbers corresponding to the matrix elements,
703 or a string which will be compared directly (useful if the expected value is "none") 707 or a string which will be compared directly (useful if the expected value is "none")
704 If the CSS property name is "-webkit-transform.N", expected value must be a number corresponding to the Nth element of the matrix 708 If the CSS property name is "-webkit-transform.N", expected value must be a number corresponding to the Nth element of the matrix
705 709
706 */ 710 */
707 function runTransitionTest(expected, trigger, callbacks, doPixelTest) { 711 function runTransitionTest(expected, trigger, callbacks, doPixelTest) {
708 expected = expected.map(function(expectation) { expectation.unshift(null); r eturn expectation; }); 712 expected = expected.map(function(expectation) { expectation.unshift(null); r eturn expectation; });
709 isTransitionsTest = true; 713 isTransitionsTest = true;
710 runAnimationTest(expected, callbacks, trigger, false, doPixelTest); 714 runAnimationTest(expected, callbacks, trigger, false, doPixelTest);
711 } 715 }
OLDNEW
« no previous file with comments | « LayoutTests/animations/animation-offscreen-to-onscreen.html ('k') | LayoutTests/compositing/3d-corners.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698