| 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>
|
|
|