mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Add contentDocument support for HTMLIFrameElement. Fixes #3808.
This commit is contained in:
parent
8cb2b922ef
commit
af30484f2a
5 changed files with 61 additions and 1 deletions
27
tests/content/test_iframe_contentDocument.html
Normal file
27
tests/content/test_iframe_contentDocument.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf8" />
|
||||
<script src="harness.js"></script>
|
||||
<title>Iframe contentDocument test.</title>
|
||||
</head>
|
||||
<body>
|
||||
<iframe src="test_iframe_contentDocument_inner.html" id="iframe"></iframe>
|
||||
<script>
|
||||
waitForExplicitFinish();
|
||||
|
||||
var timeout = 100;
|
||||
var iframe = document.getElementById('iframe');
|
||||
function test_contentWindow() {
|
||||
if (!iframe.contentWindow) {
|
||||
// Iframe not loaded yet, try again.
|
||||
// No load event for iframe, insert bug number here.
|
||||
setTimeout(test_contentWindow, timeout);
|
||||
return;
|
||||
}
|
||||
is(iframe.contentDocument.getElementById('test').textContent, 'value');
|
||||
finish();
|
||||
}
|
||||
test_contentWindow();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
1
tests/content/test_iframe_contentDocument_inner.html
Normal file
1
tests/content/test_iframe_contentDocument_inner.html
Normal file
|
@ -0,0 +1 @@
|
|||
<html><body><div id="test">value</div></body></html>
|
Loading…
Add table
Add a link
Reference in a new issue