mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #15264 - servo:content-type, r=nox
Always set the Document::contentType attribute in ScriptThread::load(). <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15264) <!-- Reviewable:end -->
This commit is contained in:
commit
cc2011c050
9 changed files with 7 additions and 43 deletions
|
@ -1,5 +0,0 @@
|
|||
[contenttype_bmp.html]
|
||||
type: testharness
|
||||
[BMP document.contentType === 'image/bmp']
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[contenttype_css.html]
|
||||
type: testharness
|
||||
[CSS document.contentType === 'text/css']
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[contenttype_gif.html]
|
||||
type: testharness
|
||||
[GIF document.contentType === 'image/gif']
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[contenttype_jpg.html]
|
||||
type: testharness
|
||||
[JPG document.contentType === 'image/jpeg']
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[contenttype_png.html]
|
||||
type: testharness
|
||||
[PNG document.contentType === 'image/png']
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[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");
|
||||
|
@ -24,7 +25,6 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<iframe id="testframe" onload="t.step(frameLoaded)"
|
||||
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oMFgQGMyFwHucAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAADElEQVQI12P4//8/AAX+Av7czFnnAAAAAElFTkSuQmCC"></iframe>
|
||||
<iframe id="testframe" onload="t.step(frameLoaded)" src="/images/blue.png"></iframe>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -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");
|
||||
|
@ -24,7 +25,6 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<iframe id="testframe" onload="t.step(frameLoaded)"
|
||||
src="data:video/webm,"></iframe>
|
||||
<iframe id="testframe" onload="t.step(frameLoaded)" src="/media/white.webm"></iframe>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue