Title: [119296] trunk/LayoutTests
Revision
119296
Author
[email protected]
Date
2012-06-01 16:09:07 -0700 (Fri, 01 Jun 2012)

Log Message

        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:

Modified Paths

Removed Paths

  • trunk/LayoutTests/http/tests/cookies/script-tests/

Diff

Modified: trunk/LayoutTests/ChangeLog (119295 => 119296)


--- trunk/LayoutTests/ChangeLog	2012-06-01 22:59:07 UTC (rev 119295)
+++ trunk/LayoutTests/ChangeLog	2012-06-01 23:09:07 UTC (rev 119296)
@@ -1,3 +1,23 @@
+2012-06-01  Alexey Proskuryakov  <[email protected]>
+
+        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  <[email protected]>
 
         [Win] Windows 7 Release Testers report many compositing failures

Modified: trunk/LayoutTests/http/tests/cookies/double-quoted-value-with-semi-colon.html (119295 => 119296)


--- trunk/LayoutTests/http/tests/cookies/double-quoted-value-with-semi-colon.html	2012-06-01 22:59:07 UTC (rev 119295)
+++ trunk/LayoutTests/http/tests/cookies/double-quoted-value-with-semi-colon.html	2012-06-01 23:09:07 UTC (rev 119296)
@@ -7,7 +7,19 @@
 <body>
 <p id="description"></p>
 <div id="console"></div>
-<script src=""
+<script>
+description(
+'Test for &lt;<a href="" Cookie parsing terminates at the first semicolon, ignoring quotes (<a href=""
+);
+
+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=""
 </body>
 </html>

Modified: trunk/LayoutTests/http/tests/cookies/multiple-cookies.html (119295 => 119296)


--- trunk/LayoutTests/http/tests/cookies/multiple-cookies.html	2012-06-01 22:59:07 UTC (rev 119295)
+++ trunk/LayoutTests/http/tests/cookies/multiple-cookies.html	2012-06-01 23:09:07 UTC (rev 119296)
@@ -7,7 +7,21 @@
 <body>
 <p id="description"></p>
 <div id="console"></div>
-<script src=""
+<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=""
 </body>
 </html>

Modified: trunk/LayoutTests/http/tests/cookies/simple-cookies-expired.html (119295 => 119296)


--- trunk/LayoutTests/http/tests/cookies/simple-cookies-expired.html	2012-06-01 22:59:07 UTC (rev 119295)
+++ trunk/LayoutTests/http/tests/cookies/simple-cookies-expired.html	2012-06-01 23:09:07 UTC (rev 119296)
@@ -7,7 +7,26 @@
 <body>
 <p id="description"></p>
 <div id="console"></div>
-<script src=""
+<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=""
 </body>
 </html>

Modified: trunk/LayoutTests/http/tests/cookies/simple-cookies-max-age.html (119295 => 119296)


--- trunk/LayoutTests/http/tests/cookies/simple-cookies-max-age.html	2012-06-01 22:59:07 UTC (rev 119295)
+++ trunk/LayoutTests/http/tests/cookies/simple-cookies-max-age.html	2012-06-01 23:09:07 UTC (rev 119296)
@@ -7,7 +7,23 @@
 <body>
 <p id="description"></p>
 <div id="console"></div>
-<script src=""
+<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=""
 </body>
 </html>

Modified: trunk/LayoutTests/http/tests/cookies/single-quoted-value.html (119295 => 119296)


--- trunk/LayoutTests/http/tests/cookies/single-quoted-value.html	2012-06-01 22:59:07 UTC (rev 119295)
+++ trunk/LayoutTests/http/tests/cookies/single-quoted-value.html	2012-06-01 23:09:07 UTC (rev 119296)
@@ -7,7 +7,19 @@
 <body>
 <p id="description"></p>
 <div id="console"></div>
-<script src=""
+<script>
+description(
+'Test for &lt;<a href="" [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=""
 </body>
 </html>
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to