Check in files I forgot to last time.
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 May 2008 05:18:36 +0000 (05:18 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 May 2008 05:18:36 +0000 (05:18 +0000)
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34008 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/fast/frames/cross-site-this-expected.txt [new file with mode: 0644]
LayoutTests/fast/frames/cross-site-this.html [new file with mode: 0644]
LayoutTests/fast/frames/resources/cross-site-this-helper.html [new file with mode: 0644]

diff --git a/LayoutTests/fast/frames/cross-site-this-expected.txt b/LayoutTests/fast/frames/cross-site-this-expected.txt
new file mode 100644 (file)
index 0000000..31ae40c
--- /dev/null
@@ -0,0 +1,3 @@
+This test checks whether cross-site calling uses the proper object as the global "this" value. The text below should say PASS:
+PASS
+
diff --git a/LayoutTests/fast/frames/cross-site-this.html b/LayoutTests/fast/frames/cross-site-this.html
new file mode 100644 (file)
index 0000000..2777b3f
--- /dev/null
@@ -0,0 +1,28 @@
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+var test = "PASS";
+function foo() {
+     bar(); // resolve -> implicit this
+}
+
+function bar() {
+     dump(this.test); // this is now wrong
+}
+
+function dump(str)
+{
+    document.getElementById("output").innerText = str;
+}
+
+
+</script>
+
+<div>This test checks whether cross-site calling uses the proper
+object as the global "this" value. The text below should say
+PASS:</div>
+
+<div id="output"> </div>
+
+<iframe src="resources/cross-site-this-helper.html"></iframe>
diff --git a/LayoutTests/fast/frames/resources/cross-site-this-helper.html b/LayoutTests/fast/frames/resources/cross-site-this-helper.html
new file mode 100644 (file)
index 0000000..21da94e
--- /dev/null
@@ -0,0 +1,5 @@
+<script>
+var test = "FAIL";
+parent.foo();
+</script>
+