Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(584)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/cache/resources/random-cached-image.cgi

Issue 2874073003: Add layout tests for ImageLoader::UpdateFromElement(kUpdateForcedReload) (Closed)
Patch Set: Comment Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/cache/resources/random-cached-image.cgi
diff --git a/third_party/WebKit/LayoutTests/http/tests/cache/resources/random-cached-image.cgi b/third_party/WebKit/LayoutTests/http/tests/cache/resources/random-cached-image.cgi
new file mode 100755
index 0000000000000000000000000000000000000000..4caff34abb074a91d35148b362701ae3e496e623
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/cache/resources/random-cached-image.cgi
@@ -0,0 +1,20 @@
+#!/usr/bin/perl -wT
+# Returns a cacheable SVG image with random size and color.
+
+print "Content-type: image/svg+xml\n";
+print "Cache-control: max-age=60000\n";
+print "ETag: \"98765\"\n";
+print "\n";
+
+my $width = int(rand(1000)) + 100;
+my $height = int(rand(1000)) + 100;
+my $r = int(rand(256));
+my $g = int(rand(256));
+my $b = int(rand(256));
+
+print '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
+print '<svg width="' . $width . '" height="' . $height . '"';
+print ' xmlns="http://www.w3.org/2000/svg"';
+print ' xmlns:xlink="http://www.w3.org/1999/xlink">';
+print '<rect x="0" y="0" width="100%" height="100%" fill="rgb(' . $r . ', ' . $g . ', ' . $b . ')"></rect>';
+print '</svg>';

Powered by Google App Engine
This is Rietveld 408576698