Make cookie tests debuggable by merging scripts into HTML
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Jun 2012 23:09:07 +0000 (23:09 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Jun 2012 23:09:07 +0000 (23:09 +0000)
        https://bugs.webkit.org/show_bug.cgi?id=88143

        Reviewed by Anders Carlsson.

        * http/tests/cookies/double-quoted-value-with-semi-colon.html:
        * http/tests/cookies/multiple-cookies.html:
        * http/tests/cookies/script-tests: Removed.
        * http/tests/cookies/script-tests/TEMPLATE.html: Removed.
        * http/tests/cookies/script-tests/double-quoted-value-with-semi-colon.js: Removed.
        * http/tests/cookies/script-tests/multiple-cookies.js: Removed.
        * http/tests/cookies/script-tests/simple-cookies-expired.js: Removed.
        * http/tests/cookies/script-tests/simple-cookies-max-age.js: Removed.
        * http/tests/cookies/script-tests/single-quoted-value.js: Removed.
        * http/tests/cookies/simple-cookies-expired.html:
        * http/tests/cookies/simple-cookies-max-age.html:
        * http/tests/cookies/single-quoted-value.html:

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

12 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/cookies/double-quoted-value-with-semi-colon.html
LayoutTests/http/tests/cookies/multiple-cookies.html
LayoutTests/http/tests/cookies/script-tests/TEMPLATE.html [deleted file]
LayoutTests/http/tests/cookies/script-tests/double-quoted-value-with-semi-colon.js [deleted file]
LayoutTests/http/tests/cookies/script-tests/multiple-cookies.js [deleted file]
LayoutTests/http/tests/cookies/script-tests/simple-cookies-expired.js [deleted file]
LayoutTests/http/tests/cookies/script-tests/simple-cookies-max-age.js [deleted file]
LayoutTests/http/tests/cookies/script-tests/single-quoted-value.js [deleted file]
LayoutTests/http/tests/cookies/simple-cookies-expired.html
LayoutTests/http/tests/cookies/simple-cookies-max-age.html
LayoutTests/http/tests/cookies/single-quoted-value.html

index 16228fc..9176c91 100644 (file)
@@ -1,3 +1,23 @@
+2012-06-01  Alexey Proskuryakov  <ap@apple.com>
+
+        Make cookie tests debuggable by merging scripts into HTML
+        https://bugs.webkit.org/show_bug.cgi?id=88143
+
+        Reviewed by Anders Carlsson.
+
+        * http/tests/cookies/double-quoted-value-with-semi-colon.html:
+        * http/tests/cookies/multiple-cookies.html:
+        * http/tests/cookies/script-tests: Removed.
+        * http/tests/cookies/script-tests/TEMPLATE.html: Removed.
+        * http/tests/cookies/script-tests/double-quoted-value-with-semi-colon.js: Removed.
+        * http/tests/cookies/script-tests/multiple-cookies.js: Removed.
+        * http/tests/cookies/script-tests/simple-cookies-expired.js: Removed.
+        * http/tests/cookies/script-tests/simple-cookies-max-age.js: Removed.
+        * http/tests/cookies/script-tests/single-quoted-value.js: Removed.
+        * http/tests/cookies/simple-cookies-expired.html:
+        * http/tests/cookies/simple-cookies-max-age.html:
+        * http/tests/cookies/single-quoted-value.html:
+
 2012-06-01  Jessie Berlin  <jberlin@apple.com>
 
         [Win] Windows 7 Release Testers report many compositing failures
index 0b06db7..5c8dbec 100644 (file)
@@ -7,7 +7,19 @@
 <body>
 <p id="description"></p>
 <div id="console"></div>
-<script src="script-tests/double-quoted-value-with-semi-colon.js"></script>
+<script>
+description(
+'Test for &lt;<a href="rdar://problem/5666078">rdar://problem/5666078</a>&gt; Cookie parsing terminates at the first semicolon, ignoring quotes (<a href="https://bugs.webkit.org/show_bug.cgi?id=16699">16699</a>)'
+);
+
+clearAllCookies();
+
+debug("Check that setting a cookie with a semi-colon in a duoble-quoted value works");
+cookiesShouldBe('disorder="477beccb;richard";Version=1;Path=/', 'disorder="477beccb;richard"');
+clearCookies();
+
+successfullyParsed = true;
+</script>
 <script src="resources/cookies-test-post.js"></script>
 </body>
 </html>
index e5b14f3..acb20ff 100644 (file)
@@ -7,7 +7,21 @@
 <body>
 <p id="description"></p>
 <div id="console"></div>
-<script src="script-tests/multiple-cookies.js"></script>
+<script>
+description(
+"This test checks that mulitple cookies are correctly set."
+);
+
+clearAllCookies();
+
+debug("Check setting several cookies without clearing.");
+cookiesShouldBe("test=foobar;", "test=foobar");
+cookiesShouldBe("test2=foobar;", "test=foobar; test2=foobar");
+cookiesShouldBe("test3=foobar;", "test=foobar; test2=foobar; test3=foobar");
+clearCookies();
+
+successfullyParsed = true;
+</script>
 <script src="resources/cookies-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/http/tests/cookies/script-tests/TEMPLATE.html b/LayoutTests/http/tests/cookies/script-tests/TEMPLATE.html
deleted file mode 100644 (file)
index 6483f50..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="resources/cookies-test-style.css">
-<script src="resources/cookies-test-pre.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="YOUR_JS_FILE_HERE"></script>
-<script src="resources/cookies-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/cookies/script-tests/double-quoted-value-with-semi-colon.js b/LayoutTests/http/tests/cookies/script-tests/double-quoted-value-with-semi-colon.js
deleted file mode 100644 (file)
index 9029875..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-description(
-'Test for &lt;<a href="rdar://problem/5666078">rdar://problem/5666078</a>&gt; Cookie parsing terminates at the first semicolon, ignoring quotes (<a href="https://bugs.webkit.org/show_bug.cgi?id=16699">16699</a>)'
-);
-
-clearAllCookies();
-
-debug("Check that setting a cookie with a semi-colon in a duoble-quoted value works");
-cookiesShouldBe('disorder="477beccb;richard";Version=1;Path=/', 'disorder="477beccb;richard"');
-clearCookies();
-
-successfullyParsed = true;
diff --git a/LayoutTests/http/tests/cookies/script-tests/multiple-cookies.js b/LayoutTests/http/tests/cookies/script-tests/multiple-cookies.js
deleted file mode 100644 (file)
index 618e224..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-description(
-"This test checks that mulitple cookies are correctly set."
-);
-
-clearAllCookies();
-
-debug("Check setting several cookies without clearing.");
-cookiesShouldBe("test=foobar;", "test=foobar");
-cookiesShouldBe("test2=foobar;", "test=foobar; test2=foobar");
-cookiesShouldBe("test3=foobar;", "test=foobar; test2=foobar; test3=foobar");
-clearCookies();
-
-successfullyParsed = true;
diff --git a/LayoutTests/http/tests/cookies/script-tests/simple-cookies-expired.js b/LayoutTests/http/tests/cookies/script-tests/simple-cookies-expired.js
deleted file mode 100644 (file)
index 61b70fb..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-description(
-"This test checks that cookies are correctly set using Expires."
-);
-
-clearAllCookies();
-
-debug("Check that setting a simple cookie works.");
-var date = new Date();
-date.setTime(date.getTime() + 60 * 1000);
-cookiesShouldBe("test=foobar; Expires=" + date.toGMTString(), "test=foobar");
-clearCookies();
-
-debug("Check setting a cookie that timed out.");
-date.setTime(date.getTime() - 2 * 60 * 1000);
-cookiesShouldBe("test2=foobar; Expires=" + date.toGMTString(), "");
-clearCookies();
-
-successfullyParsed = true;
diff --git a/LayoutTests/http/tests/cookies/script-tests/simple-cookies-max-age.js b/LayoutTests/http/tests/cookies/script-tests/simple-cookies-max-age.js
deleted file mode 100644 (file)
index 1d87b13..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-description(
-"This test checks that cookies are correctly set using Max-Age."
-);
-
-clearAllCookies();
-
-debug("Check that setting a simple cookie works.");
-cookiesShouldBe("test=foobar; Max-Age=90000000", "test=foobar");
-clearCookies();
-
-debug("Check setting a cookie that timed out.");
-cookiesShouldBe("test2=foobar; Max-Age=0", "");
-clearCookies();
-
-successfullyParsed = true;
diff --git a/LayoutTests/http/tests/cookies/script-tests/single-quoted-value.js b/LayoutTests/http/tests/cookies/script-tests/single-quoted-value.js
deleted file mode 100644 (file)
index 7d3cce0..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-description(
-'Test for &lt;<a href="https://bugs.webkit.org/show_bug.cgi?id=85775">https://bugs.webkit.org/show_bug.cgi?id=85775</a>&gt; [BlackBerry] Cookie parsing issue. If the cookie value provided was (") then the browser creates a session cookie instead.'
-);
-
-clearAllCookies();
-
-debug("Check that setting a cookie with a single-quoted value works.");
-cookiesShouldBe('singleQuoted="value;Version=1;Path=/', 'singleQuoted="value');
-clearCookies();
-
-successfullyParsed = true;
index 6015d0d..b119eaa 100644 (file)
@@ -7,7 +7,26 @@
 <body>
 <p id="description"></p>
 <div id="console"></div>
-<script src="script-tests/simple-cookies-expired.js"></script>
+<script>
+description(
+"This test checks that cookies are correctly set using Expires."
+);
+
+clearAllCookies();
+
+debug("Check that setting a simple cookie works.");
+var date = new Date();
+date.setTime(date.getTime() + 60 * 1000);
+cookiesShouldBe("test=foobar; Expires=" + date.toGMTString(), "test=foobar");
+clearCookies();
+
+debug("Check setting a cookie that timed out.");
+date.setTime(date.getTime() - 2 * 60 * 1000);
+cookiesShouldBe("test2=foobar; Expires=" + date.toGMTString(), "");
+clearCookies();
+
+successfullyParsed = true;
+</script>
 <script src="resources/cookies-test-post.js"></script>
 </body>
 </html>
index 23eee96..535982d 100644 (file)
@@ -7,7 +7,23 @@
 <body>
 <p id="description"></p>
 <div id="console"></div>
-<script src="script-tests/simple-cookies-max-age.js"></script>
+<script>
+description(
+"This test checks that cookies are correctly set using Max-Age."
+);
+
+clearAllCookies();
+
+debug("Check that setting a simple cookie works.");
+cookiesShouldBe("test=foobar; Max-Age=90000000", "test=foobar");
+clearCookies();
+
+debug("Check setting a cookie that timed out.");
+cookiesShouldBe("test2=foobar; Max-Age=0", "");
+clearCookies();
+
+successfullyParsed = true;
+</script>
 <script src="resources/cookies-test-post.js"></script>
 </body>
 </html>
index 7d99fcc..304fc6a 100644 (file)
@@ -7,7 +7,19 @@
 <body>
 <p id="description"></p>
 <div id="console"></div>
-<script src="script-tests/single-quoted-value.js"></script>
+<script>
+description(
+'Test for &lt;<a href="https://bugs.webkit.org/show_bug.cgi?id=85775">https://bugs.webkit.org/show_bug.cgi?id=85775</a>&gt; [BlackBerry] Cookie parsing issue. If the cookie value provided was (") then the browser creates a session cookie instead.'
+);
+
+clearAllCookies();
+
+debug("Check that setting a cookie with a single-quoted value works.");
+cookiesShouldBe('singleQuoted="value;Version=1;Path=/', 'singleQuoted="value');
+clearCookies();
+
+successfullyParsed = true;
+</script>
 <script src="resources/cookies-test-post.js"></script>
 </body>
 </html>