mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Add a test for panicking when reloading an iframe twice.
This commit is contained in:
parent
047bb060c1
commit
c5fe8f7401
2 changed files with 29 additions and 0 deletions
|
@ -5916,6 +5916,12 @@
|
|||
"url": "/_mozilla/mozilla/mozbrowser/iframe_goback.html"
|
||||
}
|
||||
],
|
||||
"mozilla/mozbrowser/iframe_reload_twice.html": [
|
||||
{
|
||||
"path": "mozilla/mozbrowser/iframe_reload_twice.html",
|
||||
"url": "/_mozilla/mozilla/mozbrowser/iframe_reload_twice.html"
|
||||
}
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsericonchange_event.html": [
|
||||
{
|
||||
"path": "mozilla/mozbrowser/mozbrowsericonchange_event.html",
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Reloading an iframe twice doesn't panic</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<iframe></iframe>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
var iframe = document.querySelector('iframe');
|
||||
var loaded = false;
|
||||
iframe.onload = t.step_func(function() {
|
||||
if (!loaded) {
|
||||
loaded = true;
|
||||
iframe.reload();
|
||||
iframe.reload();
|
||||
} else {
|
||||
t.done();
|
||||
}
|
||||
});
|
||||
iframe.mozbrowser = true;
|
||||
iframe.src = "about:blank";
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue