diff options
Diffstat (limited to 'chrome/test/data/gpu')
-rw-r--r-- | chrome/test/data/gpu/feature_canvas2d.html | 35 | ||||
-rw-r--r-- | chrome/test/data/gpu/feature_compositing.html | 21 | ||||
-rw-r--r-- | chrome/test/data/gpu/feature_webgl.html | 33 |
3 files changed, 89 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> diff --git a/chrome/test/data/gpu/feature_compositing.html b/chrome/test/data/gpu/feature_compositing.html new file mode 100644 index 0000000..2ffed5e --- /dev/null +++ b/chrome/test/data/gpu/feature_compositing.html @@ -0,0 +1,21 @@ +<!DOCTYPE HTML> +<html> +<head> +<meta charset="utf-8"> +<title>GPU Feature Testing: Accelerated Compositing</title> +<style> +body { + -webkit-transform: translateZ(0); +} +</style> +<script> +function runTest() { + domAutomationController.setAutomationId(1); + domAutomationController.send("FINISHED"); +} +</script> +</head> +<body onload="runTest()"> +This page should trigger accelerated-compositing, i.e., gpu process should launch, if accelerated-compositing is allowed. +</body> +</html> diff --git a/chrome/test/data/gpu/feature_webgl.html b/chrome/test/data/gpu/feature_webgl.html new file mode 100644 index 0000000..cd6566d --- /dev/null +++ b/chrome/test/data/gpu/feature_webgl.html @@ -0,0 +1,33 @@ +<!DOCTYPE HTML> +<html> +<head> +<meta charset="utf-8"> +<title>GPU Feature Testing: WebGL</title> +<script> +function init() { + var canvas = document.createElement("canvas"); + if (!canvas) + return null; + var context = null; + try { + context = canvas.getContext("webgl"); + } catch(e) {} + if (!context) { + try { + context = canvas.getContext("experimental-webgl"); + } catch(e) {} + } + return context; +} + +function runTest() { + var gl = init(); + domAutomationController.setAutomationId(1); + domAutomationController.send("FINISHED"); +} +</script> +</head> +<body onload="runTest()"> +WebGL should trigger GPU process launch if it is allowed. +</body> +</html> |