Tests: Avoid racing iframe bad XML load test
Create the iframe inside the test with its src already set. This avoids observing a parser-created iframe's initial load event when the test is only trying to check that malformed XML iframe navigation fires load.
This commit is contained in:
parent
f264db039a
commit
e9abdc4ed0
1 changed files with 4 additions and 3 deletions
|
|
@ -1,12 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<iframe id="i1"></iframe>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
asyncTest((done) => {
|
||||
i1.onload = function() {
|
||||
const iframe = document.createElement("iframe");
|
||||
iframe.onload = function() {
|
||||
println("OK");
|
||||
done();
|
||||
}
|
||||
i1.src = "data:application/xml;charset=utf-8;base64,vwo=";
|
||||
iframe.src = "data:application/xml;charset=utf-8;base64,vwo=";
|
||||
document.body.appendChild(iframe);
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue