- fixed <rdar://problem/4155049> javascript function named as "opener" doesn...
authorggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Jun 2005 18:44:58 +0000 (18:44 +0000)
committerggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Jun 2005 18:44:58 +0000 (18:44 +0000)
        Test cases only, fix is in JavaScriptCore

        Reviewed by cblu.

        Test cases added:

        * layout-tests/fast/js/global-opener-function-expected.txt: Added.
        * layout-tests/fast/js/global-opener-function.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9449 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/fast/js/global-opener-function-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/global-opener-function.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23

diff --git a/LayoutTests/fast/js/global-opener-function-expected.txt b/LayoutTests/fast/js/global-opener-function-expected.txt
new file mode 100644 (file)
index 0000000..8c44b31
--- /dev/null
@@ -0,0 +1,5 @@
+This test checks to ensure that you can declare a global function called "opener" to shadow window.opener.
+
+If the test passes, you will see 1 "success" message below. Otherwise, you will see 1 "failure" message.
+
+success: function opener() declared
diff --git a/LayoutTests/fast/js/global-opener-function.html b/LayoutTests/fast/js/global-opener-function.html
new file mode 100644 (file)
index 0000000..b455c40
--- /dev/null
@@ -0,0 +1,34 @@
+<html>
+<head>
+<script>
+function print(message) {
+        var paragraph = document.createElement("li");
+        paragraph.appendChild(document.createTextNode(message));
+        document.getElementById("console").appendChild(paragraph);
+}
+
+function opener() {
+}
+
+function test() {
+       if (window.layoutTestController) {
+               window.layoutTestController.dumpAsText();
+       }
+
+       var STATUS;
+       if (typeof(opener) == "function") {
+               STATUS = "success: function opener() declared";
+       } else {
+               STATUS = "failure: could not declare function opener()";
+       }
+       print(STATUS);
+}
+</script>
+</head>
+<body onload="test();">
+<p>This test checks to ensure that you can declare a global function called "opener" to shadow window.opener.</p>
+<p>If the test passes, you will see 1 "success" message below. Otherwise, you will see 1 "failure" message.</p>
+<hr>
+<ol id='console'/>
+</body>
+</html>
index 0fdb3ad1ce0dcbb458889499c1118b09ca707b62..e0676420d40bf55040bbe48d3edfea592a9c4e2a 100644 (file)
@@ -1,3 +1,16 @@
+2005-06-21  Geoffrey Garen  <ggaren@apple.com>
+
+        - fixed <rdar://problem/4155049> javascript function named as "opener" doesn't get called because of window.opener property
+
+        Test cases only, fix is in JavaScriptCore
+
+        Reviewed by cblu.
+
+        Test cases added: 
+
+        * layout-tests/fast/js/global-opener-function-expected.txt: Added.
+        * layout-tests/fast/js/global-opener-function.html: Added.
+
 2005-06-21  David Harrison  <harrison@apple.com>
 
         Reviewed by Justin.