summaryrefslogtreecommitdiffstats
path: root/o3d/samples/beachdemo
diff options
context:
space:
mode:
authorgman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-08 01:26:46 +0000
committergman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-08 01:26:46 +0000
commit3c2216cd87438196389b5076095a5f1d627b1ca2 (patch)
treecbe1a1d4746b21503dd9e7213a81201ac14e6320 /o3d/samples/beachdemo
parentf0ef2da98a8bc281600d565ff7788f2bec129d9f (diff)
downloadchromium_src-3c2216cd87438196389b5076095a5f1d627b1ca2.zip
chromium_src-3c2216cd87438196389b5076095a5f1d627b1ca2.tar.gz
chromium_src-3c2216cd87438196389b5076095a5f1d627b1ca2.tar.bz2
Change our selenium tests to call
window.o3d_prepForSelenium if it exists and fix becahdemo to use this feature. Review URL: http://codereview.chromium.org/155191 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20113 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/samples/beachdemo')
-rw-r--r--o3d/samples/beachdemo/beachdemo.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/o3d/samples/beachdemo/beachdemo.js b/o3d/samples/beachdemo/beachdemo.js
index 4b99bd9..901cfd9 100644
--- a/o3d/samples/beachdemo/beachdemo.js
+++ b/o3d/samples/beachdemo/beachdemo.js
@@ -1834,9 +1834,21 @@ function onAllLoadingFinished() {
showHint();
+ window.o3d_prepForSelenium = prepForSelenium;
window.g_finished = true; // for selenium testing.
}
+// Put the demo in a consistent state.
+function prepForSelenium() {
+ // Turn off the perf monitor.
+ g_perfMon = null;
+
+ // Set the render targets to a fixed size.
+ g_renderTargetWidth = 256;
+ g_renderTargetHeight = 256;
+ setupRenderTargets();
+}
+
/**
* Creates the client area.
*/