mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Issue #8352: Dispatch mozbrowsershowmodalprompt event for alert().
This commit is contained in:
parent
2a3a7a73b5
commit
0d910bb934
7 changed files with 58 additions and 5 deletions
|
@ -5691,6 +5691,12 @@
|
|||
"url": "/_mozilla/mozilla/mozbrowser/mozbrowsericonchange_event.html"
|
||||
}
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsershowmodalprompt_event.html": [
|
||||
{
|
||||
"path": "mozilla/mozbrowser/mozbrowsershowmodalprompt_event.html",
|
||||
"url": "/_mozilla/mozilla/mozbrowser/mozbrowsershowmodalprompt_event.html"
|
||||
}
|
||||
],
|
||||
"mozilla/mozbrowser/reload.html": [
|
||||
{
|
||||
"path": "mozilla/mozbrowser/reload.html",
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Dispatch mozbrowsershowmodalprompt event for alert (issue #8352)</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<body></body>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = "true";
|
||||
iframe.src = "mozbrowsershowmodalprompt_event_iframe.html";
|
||||
iframe.addEventListener("mozbrowsershowmodalprompt", t.step_func(e => {
|
||||
assert_equals(e.detail.promptType, "alert");
|
||||
assert_equals(e.detail.message, "my alert message");
|
||||
t.done();
|
||||
}));
|
||||
document.body.appendChild(iframe);
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,6 @@
|
|||
<html>
|
||||
<body></body>
|
||||
<script>
|
||||
window.alert("my alert message");
|
||||
</script>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue