Commit 8b1c7bf1 authored by Rob Buis's avatar Rob Buis Committed by Commit Bot

Adjust tests so that response returns text/css

Adjust tests so that response returns text/css in order
to not fail these tests once stylesheet loading gets more strict.

Bug: 752830

Change-Id: I51ada4de148c384842911f001761b97f71a9082a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2007112Reviewed-by: default avatarHiroshige Hayashizaki <hiroshige@chromium.org>
Commit-Queue: Rob Buis <rbuis@igalia.com>
Cr-Commit-Position: refs/heads/master@{#734202}
parent 54df2286
......@@ -4,6 +4,10 @@
header('ETag: foo');
header('Cache-control: max-age=0');
if ($_GET['type'] == 'css') {
header('Content-Type: text/css');
}
if ($_SERVER['HTTP_IF_NONE_MATCH'] == 'foo') {
// The body after revalidation.
echo "/* after revalidation */";
......
......@@ -4,6 +4,10 @@
header('ETag: foo');
header('Cache-control: max-age=0');
if ($_GET['type'] == 'css') {
header('Content-Type: text/css');
}
if ($_SERVER['HTTP_IF_NONE_MATCH'] == 'foo') {
// The body is intentionally empty.
exit;
......
......@@ -2,6 +2,10 @@
header('ETag: foo');
header('Cache-control: max-age=0');
if ($_GET['type'] == 'css') {
header('Content-Type: text/css');
}
if ($_SERVER['HTTP_IF_NONE_MATCH'] == 'foo') {
header('HTTP/1.1 304 Not Modified');
exit;
......
......@@ -14,12 +14,12 @@
link.onload = t_css.unreached_func('Second request should fail');
link.onerror = t_css.step_func_done();
link.href =
"../../cache/resources/etag-200-empty.php?empty-after-revalidate-css";
"../../cache/resources/etag-200-empty.php?type=css&empty-after-revalidate-css";
document.head.appendChild(link);
}
</script>
<link
href="../../cache/resources/etag-200-empty.php?empty-after-revalidate-css"
href="../../cache/resources/etag-200-empty.php?type=css&empty-after-revalidate-css"
rel="stylesheet"
integrity="sha256-YsI40D9FX0QghiYVdxQyySP2TOmARkLC5uPRO8RL2dE="
onload="t_css.step_timeout(revalidate_css, 0)"
......
......@@ -14,12 +14,12 @@
link.onload = t_css.unreached_func('Second request should fail');
link.onerror = t_css.step_func_done();
link.href =
"../../cache/resources/etag-200-different.php?empty-after-revalidate-css";
"../../cache/resources/etag-200-different.php?type=css&empty-after-revalidate-css";
document.head.appendChild(link);
}
</script>
<link
href="../../cache/resources/etag-200-different.php?empty-after-revalidate-css"
href="../../cache/resources/etag-200-different.php?type=css&empty-after-revalidate-css"
rel="stylesheet"
integrity="sha256-YsI40D9FX0QghiYVdxQyySP2TOmARkLC5uPRO8RL2dE="
onload="t_css.step_timeout(revalidate_css, 0)"
......
......@@ -14,12 +14,12 @@
link.onload = t_css.step_func_done();
link.onerror = t_css.unreached_func('Second request should pass');
link.href =
"../../cache/resources/etag.php?empty-after-revalidate-css";
"../../cache/resources/etag.php?type=css&empty-after-revalidate-css";
document.head.appendChild(link);
}
</script>
<link
href="../../cache/resources/etag.php?empty-after-revalidate-css"
href="../../cache/resources/etag.php?type=css&empty-after-revalidate-css"
rel="stylesheet"
integrity="sha256-tbudgBSg+bHWHiHnlteNzN8TUvI80ygS9IULh4rklEw="
onload="t_css.step_timeout(revalidate_css, 0)"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment