Bug 1182856 - Part 6: Revise tests for display:none in test_transitions.html. r=heycam
authorBoris Chiou <boris.chiou@gmail.com>
Mon, 11 Apr 2016 00:25:00 +0200
changeset 330670 fdc53ebd6d2e4904bfaa252bd25e94f874607205
parent 330669 d456cd95c7bd5e0dc3bfacec7ef2e3b028dec152
child 330671 a627b8fce0073fda398b78c3590566cea5485ca9
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1182856
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1182856 - Part 6: Revise tests for display:none in test_transitions.html. r=heycam
layout/style/test/test_transitions.html
--- a/layout/style/test/test_transitions.html
+++ b/layout/style/test/test_transitions.html
@@ -733,28 +733,25 @@ function check_number_tests()
 check_number_tests(0);
 add_future_call(2, check_number_tests);
 add_future_call(4, check_number_tests);
 add_future_call(6, check_number_tests);
 add_future_call(8, check_number_tests);
 
 function check_display_tests(time)
 {
-    var tf = timingFunctions["ease-in-out"];
     for (var i in display_tests) {
         var p = display_tests[i];
 
-        check_transition_value(tf, 0, 8, 0, 100,
-                               getComputedStyle(p, "").textIndent,
-                               "display test for test with " +
-                                 p.childNodes[0].data,
-        // TODO: Making transitions work on 'display:none' elements is
-        // still not implemented.
-                               function(range) { return p != to_none_test &&
-                                                 range[1] < 100 });
+        // There is no transition if the old or new style is display:none, so
+        // the computed value is always the end value.
+        var computedValue = getComputedStyle(p, "").textIndent;
+        is(computedValue, "100px",
+           "display test for test with " + p.childNodes[0].data +
+           ": computed value " + computedValue + " should be 100px.");
     }
 }
 
 check_display_tests(0);
 add_future_call(2, function() { check_display_tests(2); });
 add_future_call(4, function() { check_display_tests(4); });
 add_future_call(6, function() { check_display_tests(6); });
 add_future_call(8, function() { check_display_tests(8); });