Title: [155208] trunk/LayoutTests
- Revision
- 155208
- Author
- [email protected]
- Date
- 2013-09-06 13:04:19 -0700 (Fri, 06 Sep 2013)
Log Message
Revalidation header blacklisting should be case-insensitive.
https://bugs.webkit.org/show_bug.cgi?id=120832
Reviewed by Alexey Proskuryakov.
Adds a new test to verify that a CSS file served initially as type
'text/css' maintains that type even if a revalidation response sends
'text/plain' along with a 304 response.
* http/tests/cache/content-type-ignored-during-revalidation-expected.txt: Added.
* http/tests/cache/content-type-ignored-during-revalidation.html: Added.
* http/tests/cache/resources/stylesheet304-bad-content-type.php: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (155207 => 155208)
--- trunk/LayoutTests/ChangeLog 2013-09-06 20:00:49 UTC (rev 155207)
+++ trunk/LayoutTests/ChangeLog 2013-09-06 20:04:19 UTC (rev 155208)
@@ -1,3 +1,18 @@
+2013-09-06 Mike West <[email protected]>
+
+ Revalidation header blacklisting should be case-insensitive.
+ https://bugs.webkit.org/show_bug.cgi?id=120832
+
+ Reviewed by Alexey Proskuryakov.
+
+ Adds a new test to verify that a CSS file served initially as type
+ 'text/css' maintains that type even if a revalidation response sends
+ 'text/plain' along with a 304 response.
+
+ * http/tests/cache/content-type-ignored-during-revalidation-expected.txt: Added.
+ * http/tests/cache/content-type-ignored-during-revalidation.html: Added.
+ * http/tests/cache/resources/stylesheet304-bad-content-type.php: Added.
+
2013-09-06 Filip Pizlo <[email protected]>
fast/js/dfg-* tests should wait for the concurrent JIT
Added: trunk/LayoutTests/http/tests/cache/content-type-ignored-during-revalidation-expected.txt (0 => 155208)
--- trunk/LayoutTests/http/tests/cache/content-type-ignored-during-revalidation-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/cache/content-type-ignored-during-revalidation-expected.txt 2013-09-06 20:04:19 UTC (rev 155208)
@@ -0,0 +1,10 @@
+Certain headers (such as 'content-type') ought to be ignored when resources like stylesheets are revalidated via a 304 response.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS window.getComputedStyle(document.getElementById('test')).backgroundColor is "rgb(0, 255, 0)"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+This div should have a green background.
Property changes on: trunk/LayoutTests/http/tests/cache/content-type-ignored-during-revalidation-expected.txt
___________________________________________________________________
Added: svn:mime-type
Added: svn:eol-style
Added: trunk/LayoutTests/http/tests/cache/content-type-ignored-during-revalidation.html (0 => 155208)
--- trunk/LayoutTests/http/tests/cache/content-type-ignored-during-revalidation.html (rev 0)
+++ trunk/LayoutTests/http/tests/cache/content-type-ignored-during-revalidation.html 2013-09-06 20:04:19 UTC (rev 155208)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <link rel="stylesheet" href=""
+</head>
+<body>
+ <div id="test">This div should have a green background.</div>
+
+ <script src=""
+ <script>
+ window.jsTestIsAsync = true;
+
+ description("Certain headers (such as 'content-type') ought to be ignored when resources like stylesheets are revalidated via a 304 response.");
+
+ window._onload_ = function () {
+ if (window.sessionStorage.reloaded) {
+ window.sessionStorage.removeItem("reloaded");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test')).backgroundColor", "rgb(0, 255, 0)");
+ finishJSTest();
+ } else {
+ window.sessionStorage.reloaded = 1;
+ window.location.reload();
+ }
+ };
+ </script>
+ <script src=""
+</body>
+</html>
Property changes on: trunk/LayoutTests/http/tests/cache/content-type-ignored-during-revalidation.html
___________________________________________________________________
Added: svn:mime-type
Added: trunk/LayoutTests/http/tests/cache/resources/stylesheet304-bad-content-type.php (0 => 155208)
--- trunk/LayoutTests/http/tests/cache/resources/stylesheet304-bad-content-type.php (rev 0)
+++ trunk/LayoutTests/http/tests/cache/resources/stylesheet304-bad-content-type.php 2013-09-06 20:04:19 UTC (rev 155208)
@@ -0,0 +1,21 @@
+<?php
+require_once '../../resources/portabilityLayer.php';
+
+clearstatcache();
+
+if ($_SERVER["HTTP_IF_MODIFIED_SINCE"]) {
+ header("HTTP/1.0 304 Not Modified");
+ header("Content-Type: text/plain");
+ exit();
+}
+$_one_year_ = 12 * 31 * 24 * 60 * 60;
+$last_modified = gmdate(DATE_RFC1123, time() - $one_year);
+$expires = gmdate(DATE_RFC1123, time() + $one_year);
+
+header('Cache-Control: public, max-age=' . $one_year);
+header('Expires: ' . $expires);
+header('Content-Type: text/css');
+header('Etag: 123456789');
+header('Last-Modified: ' . $last_modified);
+?>
+#test { background-color: rgb(0, 255, 0); }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes