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

Unified Diff: chrome/test/data/extensions/canvas/background.html

Issue 9624013: Re-enable extension GPU features (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove AURA qualifier Created 8 years, 9 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: chrome/test/data/extensions/canvas/background.html
diff --git a/chrome/test/data/extensions/canvas/background.html b/chrome/test/data/extensions/canvas/background.html
new file mode 100644
index 0000000000000000000000000000000000000000..7a01f2b225ca3ec953854e481dcdbefcf20310e8
--- /dev/null
+++ b/chrome/test/data/extensions/canvas/background.html
@@ -0,0 +1,31 @@
+<html>
Aaron Boodman 2012/03/09 01:00:06 Add a license header.
Josh Horwich 2012/03/09 01:21:56 Will do
Josh Horwich 2012/03/09 02:26:25 Done.
+ <head>
+ <title>Background page using 2d canvas</title>
+ </head>
+ <body>
+ <div>Below should be a canvas rendered with canvas2D</div>
+ <canvas id="my-canvas" width="100" height="100"></canvas>
+ <script type="application/javascript">
+ var succeeded = false;
+ function test() {
+ if (succeeded) {
+ window.domAutomationController.send(true);
+ } else {
+ window.domAutomationController.send(false);
+ }
+ }
+
+ canvas = document.getElementById("my-canvas");
+ if (canvas) {
+ if (canvas.getContext) {
+ context = canvas.getContext("2d");
+ if (context) {
+ context.fillStyle = 'red';
+ context.fillRect(20, 20, 40, 40);
+ succeeded = true;
+ }
+ }
+ }
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698