Auto merge of #10840 - ConnorGBrewster:window_alert, r=jdm

Implement alert dialogs

fix #10812

Implements alert dialogs using tinyfiledialogs

r? @jdm

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10840)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-05-04 09:10:40 -07:00
commit b4f573db1a
10 changed files with 122 additions and 19 deletions

View file

@ -16,4 +16,16 @@
}));
document.body.appendChild(iframe);
});
async_test(function(t) {
var iframe = document.createElement("iframe");
iframe.mozbrowser = "true";
iframe.src = "mozbrowsershowmodalprompt_event_nested_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);
}, "mozbrowsershowmodalprompt event from nested iframes triggering an alert");
</script>

View file

@ -0,0 +1,5 @@
<html>
<body>
<iframe src="mozbrowsershowmodalprompt_event_iframe.html" />
</body>
</html>