Added mozbrowser test that location setting from script works.

This commit is contained in:
Alan Jeffrey 2016-05-26 17:36:59 -05:00
parent cd1396fa9a
commit 316ffdcefd
2 changed files with 17 additions and 0 deletions

View file

@ -55,5 +55,16 @@ async_test(function(t) {
});
async_test(function(t) {
var iframe = document.createElement("iframe");
iframe.mozbrowser = "true";
iframe.src = "mozbrowserlocationchange_event_iframe.html";
iframe.addEventListener("mozbrowserlocationchange", t.step_func(function(e) {
var url = e.detail.url || e.detail.uri || e.detail;
var filename = url.split("/").pop();
if (filename === "yes.html") { t.done(); }
}));
document.body.appendChild(iframe);
});
</script>
</body>

View file

@ -0,0 +1,6 @@
<html>
<body></body>
<script>
window.location.assign("yes.html");
</script>
</html>