Add a test that calling window.open with an empty URL does not trigger an assertion or
authorjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Jan 2011 01:13:16 +0000 (01:13 +0000)
committerjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Jan 2011 01:13:16 +0000 (01:13 +0000)
cause a crash.
https://bugs.webkit.org/show_bug.cgi?id=52654

Reviewed by Adam Roben.

* fast/dom/Window/open-window-empty-url-expected.txt: Added.
* fast/dom/Window/open-window-empty-url.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/open-window-empty-url-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Window/open-window-empty-url.html [new file with mode: 0644]

index 6765db2..694c70f 100644 (file)
@@ -1,3 +1,14 @@
+2011-01-18  Jessie Berlin  <jberlin@apple.com>
+
+        Reviewed by Adam Roben.
+
+        Add a test that calling window.open with an empty URL does not trigger an assertion or
+        cause a crash.
+        https://bugs.webkit.org/show_bug.cgi?id=52654
+
+        * fast/dom/Window/open-window-empty-url-expected.txt: Added.
+        * fast/dom/Window/open-window-empty-url.html: Added.
+
 2011-01-18  Robert Hogan  <robert@webkit.org>
 
         Reviewed by Simon Hausmann.
diff --git a/LayoutTests/fast/dom/Window/open-window-empty-url-expected.txt b/LayoutTests/fast/dom/Window/open-window-empty-url-expected.txt
new file mode 100644 (file)
index 0000000..7089779
--- /dev/null
@@ -0,0 +1,3 @@
+Test that calling window.open(""); does not trigger any assertions or cause any crashes.
+
+PASS: Calling window.open() with an empty URL did not trigger any assertions or cause any crashes.
diff --git a/LayoutTests/fast/dom/Window/open-window-empty-url.html b/LayoutTests/fast/dom/Window/open-window-empty-url.html
new file mode 100644 (file)
index 0000000..80c762f
--- /dev/null
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Open Window with an empty URL</title>
+</head>
+<body>
+    <p id="description">Test that calling window.open(""); does not trigger any assertions or cause any crashes.</p>
+    <div id="results"></div>
+    <script type="text/javascript">
+        if (window.layoutTestController) {
+            layoutTestController.dumpAsText();
+            layoutTestController.setCanOpenWindows();
+        }
+        var newWindow = window.open("");
+        newWindow.close();
+        document.getElementById("results").innerText = "PASS: Calling window.open() with an empty URL did not trigger any assertions or cause any crashes.";
+    </script>
+</body>
+</html>
+