Closed Bug 872271 Opened 11 years ago Closed 11 years ago

[webvtt] verify media element src attributes return urls

Categories

(Core :: Audio/Video, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: rillian, Unassigned)

References

(Blocks 1 open bug)

Details

In a review comment on bug 833385, bz asked if we had reflection testing for the <track> dom api, and why it hadn't caught that I was returning a string for track.src without normalizing it as an URL.

We should make sure we test this for <track> and the other media elements.
For example:

var t = document.createElement('track');
t.src = 'foo/bar/../baz.vtt';

incorrect behaviour:
t.src == 'foo/bar/../baz.vtt';

correct behaviour:
t.src == 'https://example.com/foo/baz.vtt';
Ralph, the source property wasn't included on the tests because by the time we were creating them, it was agreed that this would be "validated by the user" meaning whatever it means.

I'll include it on the upcoming tests using reflect.js for the HTMLTrackElement, and possibly on the other classes as well.
This will be landing in bug 833386 using reflect.js testing:

reflectURL({
  element: document.createElement("track"),
  attribute: "src",
  otherValues: ["foo", "bar", "\u0000", "null", ""]
});
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.