Permalink
Browse files

add a simple test of the bug where nested iframes are affecting windo…

…w title
  • Loading branch information...
1 parent eb1b164 commit 42c5d3d5360ef4d62085ecc7681dc9cfe076ccd9 @lloyd lloyd committed Jun 10, 2011
Showing with 9 additions and 1 deletion.
  1. +8 −1 tests/window_title/index.html
  2. +1 −0 tests/window_title/inner.html
@@ -1,5 +1,6 @@
<html>
<body>
+<iframe id="theIFrame"></iframe>
</body>
<script>
console.log("no document title set. window title should now be application title... wait 5s");
@@ -8,6 +9,12 @@
document.title = "new title!";
document.body.appendChild(document.createElement('p'));
console.log("Title changed! now check the window title");
-}, 5000);
+
+ // now let's embed a document with a different title and ensure that
+ setTimeout(function() {
+ console.log("embedding new iframe, will it change your title? it shouldn't");
+ document.getElementById("theIFrame").src = "inner.html";
+ }, 2500);
+}, 2500);
</script>
</html>
@@ -0,0 +1 @@
+<title>THIS IS A BUG IF IT'S YOUR WINDOW TITLE!</title>

0 comments on commit 42c5d3d

Please sign in to comment.