Added layout test for just-fixed JavaScriptCore bug.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Oct 2004 21:39:51 +0000 (21:39 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Oct 2004 21:39:51 +0000 (21:39 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7796 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/fast/js/resources/child.html [new file with mode: 0644]
LayoutTests/fast/js/window-object-cross-frame-calls-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/window-object-cross-frame-calls.html [new file with mode: 0644]

diff --git a/LayoutTests/fast/js/resources/child.html b/LayoutTests/fast/js/resources/child.html
new file mode 100644 (file)
index 0000000..46a1bbc
--- /dev/null
@@ -0,0 +1,8 @@
+<html>
+ <head>
+  <script>
+   window.which = "child";
+   parent.bar();
+  </script>
+ </head>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/js/window-object-cross-frame-calls-expected.txt b/LayoutTests/fast/js/window-object-cross-frame-calls-expected.txt
new file mode 100644 (file)
index 0000000..5a82cd5
--- /dev/null
@@ -0,0 +1,19 @@
+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 {P} at (0,0) size 784x18
+        RenderText {TEXT} at (0,0) size 566x18
+          text run at (0,0) width 566: "The following line should say \"parent\", meaning that the proper window object was used."
+      RenderBlock {P} at (0,34) size 784x18
+        RenderText {TEXT} at (0,0) size 39x18
+          text run at (0,0) width 39: "parent"
+      RenderBlock (anonymous) at (0,68) size 784x150
+        RenderPartObject {IFRAME} at (0,0) size 300x150
+          layer at (0,0) size 285x150
+            RenderCanvas at (0,0) size 285x150
+          layer at (0,0) size 285x150
+            RenderBlock {HTML} at (0,0) size 285x150
+        RenderText {TEXT} at (0,0) size 0x0
+        RenderText {TEXT} at (0,0) size 0x0
diff --git a/LayoutTests/fast/js/window-object-cross-frame-calls.html b/LayoutTests/fast/js/window-object-cross-frame-calls.html
new file mode 100644 (file)
index 0000000..52f3ab3
--- /dev/null
@@ -0,0 +1,12 @@
+<html>
+ <head>
+  <script>
+   function bar() { which = "parent"; document.getElementById("result").innerHTML = which; }
+  </script>
+ </head>
+ <body>
+  <p>The following line should say "parent", meaning that the proper window object was used.</p>
+  <p id="result"></p>
+  <iframe src="resources/child.html"></iframe>
+ </body>
+</html>