summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authormmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-21 15:45:35 +0000
committermmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-21 15:45:35 +0000
commitc4de5dfacd5f7fa135ee7069c9bfe7292c7d4c99 (patch)
treeb25c6f8642cca01fd9f5b16d699c34ecd78a4a0d /chrome/test
parent5458ef367834a5657cd36f5dac29c110329523d0 (diff)
downloadchromium_src-c4de5dfacd5f7fa135ee7069c9bfe7292c7d4c99.zip
chromium_src-c4de5dfacd5f7fa135ee7069c9bfe7292c7d4c99.tar.gz
chromium_src-c4de5dfacd5f7fa135ee7069c9bfe7292c7d4c99.tar.bz2
Adds a RenderWidgetHostView for prerendering RenderViewHosts.
This fixes prerendered RenderViews having 0 size until they're displayed. Also cancels prerendering if the source RenderViewHost is closed before prerendering starts. BUG=71221 TEST=PrerenderBrowserTest.PrerenderSize PrerenderManagerTest.SourceRenderViewClosed Review URL: http://codereview.chromium.org/6685012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82491 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/data/prerender/prerender_size.html25
1 files changed, 25 insertions, 0 deletions
diff --git a/chrome/test/data/prerender/prerender_size.html b/chrome/test/data/prerender/prerender_size.html
new file mode 100644
index 0000000..025bb03
--- /dev/null
+++ b/chrome/test/data/prerender/prerender_size.html
@@ -0,0 +1,25 @@
+<html>
+<!--
+Checks that a prerendered page gets the correct window size.
+-->
+<head>
+<title>Prerender Window Size Test</title>
+
+<script>
+var width = window.innerWidth;
+var height = window.innerHeight;
+
+// Make sure width and height are positive.
+function DidPrerenderPass() {
+ return width > 0 && height > 0;
+}
+
+// Make sure width and height are the same as when prerendering.
+function DidDisplayPass() {
+ return width == window.innerWidth && height == window.innerHeight;
+}
+</script>
+
+</head>
+<body></body>
+</html>