Bug 1276830 - part3 : modify tests.
MozReview-Commit-ID: 9imko6c1Z4R
--- a/dom/media/test/test_texttrackcue.html
+++ b/dom/media/test/test_texttrackcue.html
@@ -123,43 +123,23 @@ SpecialPowers.pushPrefEnv({"set": [["med
if (typeof val === "string") {
cue[prop] = val.toUpperCase();
is(cue[prop], val, "Cue's " + prop + " should be " + val);
}
});
}
checkEnumValue("align", "middle", [ "start", "left", "middle", "right", "end" ]);
+ checkEnumValue("lineAlign", "start", [ "start", "center", "end" ]);
checkEnumValue("vertical", "", [ "", "lr", "rl" ]);
- // Check that cue line align works properly
- is(cue.lineAlign, "start", "Cue's default line alignment should be start.");
-
- exceptionHappened = false;
- try {
- cue.lineAlign = "left";
- } catch(e) {
- exceptionHappened = true;
- is(e.name, "SyntaxError", "Should have thrown SyntaxError.");
- }
- ok(exceptionHappened, "Exception should have happened.");
-
- exceptionHappened = false;
- try {
- cue.lineAlign = "right";
- } catch(e) {
- exceptionHappened = true;
- is(e.name, "SyntaxError", "Should have thrown SyntaxError.");
- }
- ok(exceptionHappened, "Exception should have happened.");
-
- cue.lineAlign = "middle";
- is(cue.lineAlign, "middle", "Cue's line align should be middle.");
+ cue.lineAlign = "center";
+ is(cue.lineAlign, "center", "Cue's line align should be center.");
cue.lineAlign = "START";
- is(cue.lineAlign, "middle", "Cue's line align should be middle.");
+ is(cue.lineAlign, "center", "Cue's line align should be center.");
cue.lineAlign = "end";
is(cue.lineAlign, "end", "Cue's line align should be end.");
// Check that cue position align works properly
is(cue.positionAlign, "center", "Cue's default position alignment should be center.");
cue.positionAlign = "line-left";
is(cue.positionAlign, "line-left", "Cue's position align should be line-left.");