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

Unified Diff: chrome/test/data/extensions/api_test/canvas_2d/background.html

Issue 9624013: Re-enable extension GPU features (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove old Canvas2D test 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/extensions/api_test/canvas_2d/manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/canvas_2d/background.html
diff --git a/chrome/test/data/extensions/api_test/canvas_2d/background.html b/chrome/test/data/extensions/api_test/canvas_2d/background.html
new file mode 100644
index 0000000000000000000000000000000000000000..be073baab456bbf75c89ec21bbffba3cbacf3ad2
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/canvas_2d/background.html
@@ -0,0 +1,33 @@
+<!--
+ * Copyright (c) 2012 The Chromium Authors. All rights reserved. Use of this
+ * source code is governed by a BSD-style license that can be found in the
+ * LICENSE file.
+-->
+<html>
+ <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">
+ 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);
+ chrome.test.notifyPass();
+ } else {
+ chrome.test.notifyFail("unable to getContext('2d')");
+ }
+ } else {
+ chrome.test.notifyFail("canvas.getContext null");
+ }
+ } else {
+ chrome.test.notifyFail("couldn't find element my-canvas");
+ }
+ </script>
+ </body>
+</html>
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/extensions/api_test/canvas_2d/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698