Index: third_party/WebKit/LayoutTests/external/wpt/webvtt/api/VTTCue/align.html |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webvtt/webvtt-api-for-browsers/vttcue-interface/align.html b/third_party/WebKit/LayoutTests/external/wpt/webvtt/api/VTTCue/align.html |
similarity index 73% |
rename from third_party/WebKit/LayoutTests/external/wpt/webvtt/webvtt-api-for-browsers/vttcue-interface/align.html |
rename to third_party/WebKit/LayoutTests/external/wpt/webvtt/api/VTTCue/align.html |
index dcae64fcabadfdc540a7808d2ec21e9a2e3de673..df626189b13a3aeb1575d27a9a336b30504f1f7d 100644 |
--- a/third_party/WebKit/LayoutTests/external/wpt/webvtt/webvtt-api-for-browsers/vttcue-interface/align.html |
+++ b/third_party/WebKit/LayoutTests/external/wpt/webvtt/api/VTTCue/align.html |
@@ -1,5 +1,6 @@ |
<!doctype html> |
<title>VTTCue.align</title> |
+<link rel="help" href="https://w3c.github.io/webvtt/#dom-vttcue-align"> |
<script src=/resources/testharness.js></script> |
<script src=/resources/testharnessreport.js></script> |
<div id=log></div> |
@@ -7,22 +8,32 @@ |
test(function(){ |
var video = document.createElement('video'); |
document.body.appendChild(video); |
- var c1 = new VTTCue(0, 1, 'text1'); |
- assert_equals(c1.align, 'center'); |
+ |
+ var cue = new VTTCue(0, 1, 'text'); |
+ assert_equals(cue.align, 'center'); |
+ |
var track = document.createElement('track'); |
var t = track.track; |
- t.addCue(c1); |
- assert_equals(c1.align, 'center'); |
+ t.addCue(cue); |
+ |
+ assert_equals(cue.align, 'center'); |
+ |
video.appendChild(track); |
- assert_equals(c1.align, 'center'); |
+ assert_equals(cue.align, 'center'); |
+ |
t.mode = 'showing'; |
- assert_equals(c1.align, 'center'); |
- c1.align = 'start'; |
- assert_equals(c1.align, 'start'); |
- c1.align = 'end'; |
- assert_equals(c1.align, 'end'); |
- c1.align = 'start\u0000'; |
- assert_equals(c1.align, 'end'); |
+ assert_equals(cue.align, 'center'); |
+ |
+ cue.align = 'start'; |
+ assert_equals(cue.align, 'start'); |
+ |
+ cue.align = 'end'; |
+ assert_equals(cue.align, 'end'); |
+ |
+ ['start\u0000', 'centre', 'middle'].forEach(function(invalid) { |
+ cue.align = invalid; |
+ assert_equals(cue.align, 'end'); |
+ }); |
}, document.title+', script-created cue'); |
var t_parsed = async_test(document.title+', parsed cue'); |