Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #8352: Dispatch mozbrowsershowmodalprompt event for alert().
- Loading branch information
Showing
7 changed files
with
58 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
tests/wpt/mozilla/tests/mozilla/mozbrowser/mozbrowsershowmodalprompt_event.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
6 changes: 6 additions & 0 deletions
6
tests/wpt/mozilla/tests/mozilla/mozbrowser/mozbrowsershowmodalprompt_event_iframe.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<html> | ||
<body></body> | ||
<script> | ||
window.alert("my alert message"); | ||
</script> | ||
</html> |