Commit 0aa06718 authored by Alastor Wu's avatar Alastor Wu
Browse files

Bug 1276831 - part2 : modify test. r=rillian

MozReview-Commit-ID: L7NF8Wu7dSF

--HG--
extra : rebase_source : 49f996ec3158ecb051f87c9a5829cfc2f807ec29
parent 360c0c9d
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ SpecialPowers.pushPrefEnv({"set": [["media.webvtt.regions.enabled", true]]},
      function checkPercentageValue(prop, initialVal) {
        ok(prop in cue, prop + " should be a property on VTTCue.");
        cue[prop] = initialVal;
        is(cue[prop], initialVal, "Cue's " + prop + " should now be " + initialVal);
        is(cue[prop], initialVal, "Cue's " + prop + " should initially be " + initialVal);
        [ 101, -1 ].forEach(function(val) {
          exceptionHappened = false;
          try {
@@ -109,7 +109,10 @@ SpecialPowers.pushPrefEnv({"set": [["media.webvtt.regions.enabled", true]]},
      cue.size = 50.5;
      is(cue.size, 50.5, "Cue's size should be 50.5.")

      checkPercentageValue("position", 50.0);
      // Check cue.position
      checkPercentageValue("position", "auto");
      cue.position = 50.5;
      is(cue.position, 50.5, "Cue's position value should now be 50.5.");

      ok(cue.snapToLines, "Cue's snapToLines should be set by set.");
      cue.snapToLines = false;