Bug 1383974 - Part 4: Modify test for tooltip for animation-timing-function. r?pbro draft
authorDaisuke Akatsuka <dakatsuka@mozilla.com>
Mon, 25 Sep 2017 08:44:06 +0900
changeset 669600 b0c5eb63b2ef533eee0514f7cfd5322b97edba65
parent 669599 a658cf02dc27d05f8fb044fb6dde32954dfa4326
child 732996 387bcb348dabaf497f102381e8a1e8c2f6616611
push id81372
push userbmo:dakatsuka@mozilla.com
push dateMon, 25 Sep 2017 00:37:37 +0000
reviewerspbro
bugs1383974
milestone58.0a1
Bug 1383974 - Part 4: Modify test for tooltip for animation-timing-function. r?pbro MozReview-Commit-ID: BYr5dLw61DZ
devtools/client/animationinspector/test/browser_animation_timeline_shows_time_info.js
--- a/devtools/client/animationinspector/test/browser_animation_timeline_shows_time_info.js
+++ b/devtools/client/animationinspector/test/browser_animation_timeline_shows_time_info.js
@@ -38,16 +38,26 @@ add_task(function* () {
       ok(!title.match(/Repeats: /), "The tooltip doesn't show the iterations");
     }
     if (state.easing && state.easing !== "linear") {
       ok(title.match(/Overall easing: /), "The tooltip shows the easing");
     } else {
       ok(!title.match(/Overall easing: /),
          "The tooltip doesn't show the easing if it is 'linear'");
     }
+    if (state.animationTimingFunction && state.animationTimingFunction !== "ease") {
+      is(state.type, "cssanimation",
+         "The animation type should be CSS Animations if has animation-timing-function");
+      ok(title.match(/Animation timing function: /),
+         "The tooltip shows animation-timing-function");
+    } else {
+      ok(!title.match(/Animation timing function: /),
+         "The tooltip doesn't show the animation-timing-function if it is 'ease'"
+         + " or not CSS Animations");
+    }
     if (state.fill) {
       ok(title.match(/Fill: /), "The tooltip shows the fill");
     }
     if (state.direction) {
       if (state.direction === "normal") {
         ok(!title.match(/Direction: /),
           "The tooltip doesn't show the direction if it is 'normal'");
       } else {