diff options
author | zmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-09 23:16:12 +0000 |
---|---|---|
committer | zmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-09 23:16:12 +0000 |
commit | 663ef09409998887174b51b1e9c1c70f9b9eb93c (patch) | |
tree | 1cfadae7e42d3e5fe1d8e85c4c95b90c46c337ba /chrome/test/data/gpu/feature_canvas2d.html | |
parent | 8df769e694b0a19d0768ba70e5c90eed9fb70a71 (diff) | |
download | chromium_src-663ef09409998887174b51b1e9c1c70f9b9eb93c.zip chromium_src-663ef09409998887174b51b1e9c1c70f9b9eb93c.tar.gz chromium_src-663ef09409998887174b51b1e9c1c70f9b9eb93c.tar.bz2 |
Add tests to make sure gpu blacklist actually block gpu features.
The general idea is to use jbates's newly added tracing: if a feature is blacklisted, we check the tracing data to make sure gpu process hasn't launched.
BUG=101222
TEST=browser_tests
Review URL: http://codereview.chromium.org/8497034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109328 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data/gpu/feature_canvas2d.html')
-rw-r--r-- | chrome/test/data/gpu/feature_canvas2d.html | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/chrome/test/data/gpu/feature_canvas2d.html b/chrome/test/data/gpu/feature_canvas2d.html new file mode 100644 index 0000000..eb07a6a --- /dev/null +++ b/chrome/test/data/gpu/feature_canvas2d.html @@ -0,0 +1,35 @@ +<!DOCTYPE HTML> +<html> +<head> +<meta charset="utf-8"> +<title>GPU Feature Testing: Canvas2D</title> +<script> +function init() { + var canvas = document.createElement("canvas"); + if (!canvas) + return null; + // Make sure canvas is large enough to trigger gpu acceleration. + canvas.width = 500; + canvas.height = 500; + var context = null; + try { + context = canvas.getContext("2d"); + } catch(e) {} + return context; +} + +function runTest() { + var c2d = init(); + if (c2d) { + // Initialization was triggered lazily on the first draw. + c2d.fillRect(0, 0, 1, 1); + } + domAutomationController.setAutomationId(1); + domAutomationController.send("FINISHED"); +} +</script> +</head> +<body onload="runTest()"> +Canvas2D should trigger GPU process launch if accelerated-2d-canvas is allowed. +</body> +</html> |