Chromium Code Reviews| Index: content/test/data/remove_frame_on_load.html |
| diff --git a/content/test/data/remove_frame_on_load.html b/content/test/data/remove_frame_on_load.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f75f9b1b28704f0ab31e45a82d11c4114a4c4571 |
| --- /dev/null |
| +++ b/content/test/data/remove_frame_on_load.html |
| @@ -0,0 +1,19 @@ |
| +<html> |
| + <head> |
| + <title>Remove frame on load of about:blank</title> |
| + <script> |
| + var f; |
| + window.addEventListener('load', function() { |
| + f = document.getElementById("f"); |
|
dcheng
2016/03/03 00:46:59
var f = document.querySelector('iframe'), then you
nasko
2016/03/03 16:59:17
Done.
|
| + f.onload = function() { |
| + if (f.contentWindow.location.href == 'about:blank') |
| + f.parentNode.removeChild(f); |
| + }; |
| + }); |
| + </script> |
| + </head> |
| + <body> |
| + <p>Navigate to about:blank page to cause frame to be removed.</p> |
| + <iframe id="f" src="/cross-site/b.com/title2.html"></iframe> |
| + </body> |
| +</html> |