Bug 1276831 - part2 : modify test. r=rillian
authorAlastor Wu <alwu@mozilla.com>
Wed, 15 Jun 2016 16:51:23 +0100
changeset 301881 3302f0b398b1da31dd91cbfe351be2ae8d6678e0
parent 301880 a4630640ca42eaa28dd24e17b7f52a537c986717
child 301882 0bc569066f9d861634f69264ffa19e4d833878f6
push id78491
push useralwu@mozilla.com
push dateWed, 15 Jun 2016 15:56:23 +0000
treeherdermozilla-inbound@2846dfd72c54 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian
bugs1276831
milestone50.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 1276831 - part2 : modify test. r=rillian MozReview-Commit-ID: L7NF8Wu7dSF
dom/media/test/test_texttrackcue.html
--- a/dom/media/test/test_texttrackcue.html
+++ b/dom/media/test/test_texttrackcue.html
@@ -87,34 +87,37 @@ SpecialPowers.pushPrefEnv({"set": [["med
         video.removeEventListener("pause", pauseOnExit, false);
         video.play();
       });
 
       var exceptionHappened;
       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 {
             cue[prop] = val;
           } catch(e) {
             exceptionHappened = true;
             is(e.name, "IndexSizeError", "Should have thrown IndexSizeError.");
           }
           ok(exceptionHappened, "Exception should have happened.");
         });
       }
 
       checkPercentageValue("size", 100.0);
       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;
       ok(!cue.snapToLines, "Cue's snapToLines should not be set.");
 
       function checkEnumValue(prop, initialVal, acceptedValues) {
         ok(prop in cue, prop + " should be a property on VTTCue.");
         is(cue[prop], initialVal, "Cue's " + prop + " should be " + initialVal);