Expose Window constructor
authorarv@chromium.org <arv@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Feb 2012 02:47:12 +0000 (02:47 +0000)
committerarv@chromium.org <arv@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Feb 2012 02:47:12 +0000 (02:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=78722

Reviewed by Adam Barth.

Source/WebCore:

Test: fast/dom/Window/window-constructor-presence.html

* page/DOMWindow.idl:

LayoutTests:

* fast/dom/Window/window-constructor-presence-expected.txt: Added.
* fast/dom/Window/window-constructor-presence.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/window-constructor-presence-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Window/window-constructor-presence.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/DOMWindow.idl

index 60f5123..b0d59b3 100644 (file)
@@ -1,3 +1,13 @@
+2012-02-15  Erik Arvidsson  <arv@chromium.org>
+
+        Expose Window constructor
+        https://bugs.webkit.org/show_bug.cgi?id=78722
+
+        Reviewed by Adam Barth.
+
+        * fast/dom/Window/window-constructor-presence-expected.txt: Added.
+        * fast/dom/Window/window-constructor-presence.html: Added.
+
 2012-02-15  Kelly Norton  <knorton@google.com>
 
         fill-opacity does not render properly only on Chromium Mac.
diff --git a/LayoutTests/fast/dom/Window/window-constructor-presence-expected.txt b/LayoutTests/fast/dom/Window/window-constructor-presence-expected.txt
new file mode 100644 (file)
index 0000000..1d58e1b
--- /dev/null
@@ -0,0 +1,11 @@
+Tests that the Window constructor is present and that window is an instanceof of it.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS typeof Window is not "undefined"
+PASS window instanceof Window is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/Window/window-constructor-presence.html b/LayoutTests/fast/dom/Window/window-constructor-presence.html
new file mode 100644 (file)
index 0000000..8f18f40
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<body>
+<script src="../../js/resources/js-test-pre.js"></script>
+<script>
+
+description('Tests that the Window constructor is present and that window is an instanceof of it.');
+
+shouldNotBe('typeof Window', '"undefined"');
+shouldBeTrue('window instanceof Window');
+
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
index 3efa0fc..81b85cf 100644 (file)
@@ -1,3 +1,14 @@
+2012-02-15  Erik Arvidsson  <arv@chromium.org>
+
+        Expose Window constructor
+        https://bugs.webkit.org/show_bug.cgi?id=78722
+
+        Reviewed by Adam Barth.
+
+        Test: fast/dom/Window/window-constructor-presence.html
+
+        * page/DOMWindow.idl:
+
 2012-02-15  Kelly Norton  <knorton@google.com>
 
         fill-opacity does not render properly only on Chromium Mac.
index 331e62c..666d7d0 100644 (file)
@@ -401,6 +401,7 @@ module window {
         attribute [Conditional=SHADOW_DOM, V8EnabledAtRuntime=shadowDOM] ShadowRootConstructor WebKitShadowRoot;
 
         attribute HTMLDocumentConstructor HTMLDocument;
+        attribute DOMWindowConstructor Window;
 
         attribute HTMLElementConstructor HTMLElement;
         attribute HTMLAnchorElementConstructor HTMLAnchorElement;