Adding layout test for contentWindow for iframe
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Aug 2004 22:03:51 +0000 (22:03 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Aug 2004 22:03:51 +0000 (22:03 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7392 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/fast/frames/contentWindow_iFrame-expected.txt [new file with mode: 0644]
LayoutTests/fast/frames/contentWindow_iFrame.html [new file with mode: 0644]

diff --git a/LayoutTests/fast/frames/contentWindow_iFrame-expected.txt b/LayoutTests/fast/frames/contentWindow_iFrame-expected.txt
new file mode 100644 (file)
index 0000000..5189ce3
--- /dev/null
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {DIV} at (0,0) size 784x204
+        RenderText {TEXT} at (0,186) size 124x18
+          text run at (0,186) width 124: "Here is the iFrame: "
+        RenderPartObject {IFRAME} at (124,0) size 200x200
+          layer at (0,0) size 183x196
+            RenderCanvas at (0,0) size 183x196
+        RenderText {TEXT} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,204) size 784x18
+        RenderText {TEXT} at (0,0) size 74x18
+          text run at (0,0) width 74: "about:blank"
diff --git a/LayoutTests/fast/frames/contentWindow_iFrame.html b/LayoutTests/fast/frames/contentWindow_iFrame.html
new file mode 100644 (file)
index 0000000..66ad01d
--- /dev/null
@@ -0,0 +1,31 @@
+<html>
+
+<head>
+
+       <title>Testing contentWindow on an iFrame</title>
+
+       <script>
+               function putText()
+               {
+                       var w = document.getElementById("my_iframe").contentWindow;
+                       var d = document.getElementById("my_div");
+                       d.innerText = w.location;
+               }
+       </script>
+
+</head>
+
+<body onload="putText()">
+
+       <div>
+       Here is the iFrame:
+       <iframe id="my_iframe" src="about:blank" width=200 height=200 frameborder=1></iframe>
+       </div>
+
+       <div id="my_div">
+       div text will be replaced
+       </div>
+
+</body>
+
+</html>