diff options
author | Alan Jeffrey <ajeffrey@mozilla.com> | 2016-05-26 17:36:59 -0500 |
---|---|---|
committer | Alan Jeffrey <ajeffrey@mozilla.com> | 2016-06-01 09:04:03 -0500 |
commit | 316ffdcefd5c26bbeb12e3860ffb55a9695fb242 (patch) | |
tree | 0cd2ac54e168224dcf8f962f301c5e81f6d17f8a | |
parent | cd1396fa9ae72bebf13115ed0d752fb21ce0df19 (diff) | |
download | servo-316ffdcefd5c26bbeb12e3860ffb55a9695fb242.tar.gz servo-316ffdcefd5c26bbeb12e3860ffb55a9695fb242.zip |
Added mozbrowser test that location setting from script works.
-rw-r--r-- | tests/wpt/mozilla/tests/mozilla/mozbrowser/mozbrowserlocationchange_event.html | 11 | ||||
-rw-r--r-- | tests/wpt/mozilla/tests/mozilla/mozbrowser/mozbrowserlocationchange_event_iframe.html | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/wpt/mozilla/tests/mozilla/mozbrowser/mozbrowserlocationchange_event.html b/tests/wpt/mozilla/tests/mozilla/mozbrowser/mozbrowserlocationchange_event.html index 4198ed66397..dcf2f5dbc9f 100644 --- a/tests/wpt/mozilla/tests/mozilla/mozbrowser/mozbrowserlocationchange_event.html +++ b/tests/wpt/mozilla/tests/mozilla/mozbrowser/mozbrowserlocationchange_event.html @@ -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> diff --git a/tests/wpt/mozilla/tests/mozilla/mozbrowser/mozbrowserlocationchange_event_iframe.html b/tests/wpt/mozilla/tests/mozilla/mozbrowser/mozbrowserlocationchange_event_iframe.html new file mode 100644 index 00000000000..11c18e4cd45 --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/mozbrowser/mozbrowserlocationchange_event_iframe.html @@ -0,0 +1,6 @@ +<html> + <body></body> + <script> + window.location.assign("yes.html"); + </script> +</html> |