Extend testing added in r226842
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 14 Jan 2018 07:16:21 +0000 (07:16 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 14 Jan 2018 07:16:21 +0000 (07:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=181634

Reviewed by Darin Adler.

I have verified that the behavior is consistent with Chrome and Firefox.

* fast/dom/Window/window-opener-shadowing-expected.txt:
* fast/dom/Window/window-opener-shadowing.html:

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

LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/window-opener-shadowing-expected.txt
LayoutTests/fast/dom/Window/window-opener-shadowing.html

index 9ba7584..f00fbfe 100644 (file)
@@ -1,3 +1,15 @@
+2018-01-13  Chris Dumez  <cdumez@apple.com>
+
+        Extend testing added in r226842
+        https://bugs.webkit.org/show_bug.cgi?id=181634
+
+        Reviewed by Darin Adler.
+
+        I have verified that the behavior is consistent with Chrome and Firefox.
+
+        * fast/dom/Window/window-opener-shadowing-expected.txt:
+        * fast/dom/Window/window-opener-shadowing.html:
+
 2018-01-13  Minsheng Liu  <lambda@liu.ms>
 
         MathML Lengths should take zoom level into account
index 4b20e41..729bbaa 100644 (file)
@@ -10,12 +10,21 @@ PASS desc.set is an instance of Function
 PASS desc.enumerable is true
 PASS desc.configurable is true
 PASS window.opener = 'foo' did not throw exception.
+PASS window.opener is "foo"
 desc = Object.getOwnPropertyDescriptor(window, 'opener')
 PASS desc.value is "foo"
 PASS desc.writable is true
 PASS desc.enumerable is true
 PASS desc.configurable is true
 PASS openerGetter.call(window) is null
+PASS window.opener = null did not throw exception.
+PASS window.opener is null
+PASS openerGetter.call(window) is null
+desc = Object.getOwnPropertyDescriptor(window, 'opener')
+PASS desc.value is null
+PASS desc.writable is true
+PASS desc.enumerable is true
+PASS desc.configurable is true
 PASS delete window.opener did not throw exception.
 PASS window.opener is undefined.
 PASS openerGetter.call(window) is null
index 3bd47ed..76d1b68 100644 (file)
@@ -15,8 +15,9 @@ shouldBeTrue("desc.configurable");
 openerGetter = desc.get;
 
 shouldNotThrow("window.opener = 'foo'");
-evalAndLog("desc = Object.getOwnPropertyDescriptor(window, 'opener')");
+shouldBeEqualToString("window.opener", "foo");
 
+evalAndLog("desc = Object.getOwnPropertyDescriptor(window, 'opener')");
 shouldBeEqualToString("desc.value", "foo");
 shouldBeTrue("desc.writable");
 shouldBeTrue("desc.enumerable");
@@ -24,6 +25,16 @@ shouldBeTrue("desc.configurable");
 
 shouldBeNull("openerGetter.call(window)");
 
+shouldNotThrow("window.opener = null");
+shouldBeNull("window.opener");
+shouldBeNull("openerGetter.call(window)");
+
+evalAndLog("desc = Object.getOwnPropertyDescriptor(window, 'opener')");
+shouldBe("desc.value", "null");
+shouldBeTrue("desc.writable");
+shouldBeTrue("desc.enumerable");
+shouldBeTrue("desc.configurable");
+
 shouldNotThrow("delete window.opener");
 shouldBeUndefined("window.opener");