mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Check the contentType attribute for media documents.
This commit is contained in:
parent
15a0547b07
commit
c853337d64
3 changed files with 7 additions and 0 deletions
|
@ -0,0 +1,5 @@
|
|||
[pageload-image.html]
|
||||
type: testharness
|
||||
[The document for a standalone media file should have one child in the body.]
|
||||
expected: FAIL
|
||||
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
function frameLoaded() {
|
||||
var testframe = document.getElementById('testframe');
|
||||
assert_equals(testframe.contentDocument.contentType, "image/png");
|
||||
var testframeChildren = testframe.contentDocument.body.childNodes;
|
||||
assert_equals(testframeChildren.length, 1, "Body of image document has 1 child");
|
||||
assert_equals(testframeChildren[0].nodeName, "IMG", "Only child of body must be an <img> element");
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
function frameLoaded() {
|
||||
var testframe = document.getElementById('testframe');
|
||||
assert_equals(testframe.contentDocument.contentType, "video/webm");
|
||||
var testframeChildren = testframe.contentDocument.body.childNodes;
|
||||
assert_equals(testframeChildren.length, 1, "Body of image document has 1 child");
|
||||
assert_equals(testframeChildren[0].nodeName, "VIDEO", "Only child of body must be an <video> element");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue