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

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

Issue 10826157: Check for warnings when loading extensions in browser tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ExtensionTerminalPrivateApiTest.TerminalTest Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!-- 1 <!--
2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. Use of this 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. Use of this
3 * source code is governed by a BSD-style license that can be found in the 3 * source code is governed by a BSD-style license that can be found in the
4 * LICENSE file. 4 * LICENSE file.
5 --> 5 -->
6 <html> 6 <html>
7 <head> 7 <head>
8 <title>Background page using 2d canvas</title> 8 <title>Background page using 2d canvas</title>
9 </head> 9 </head>
10 <body> 10 <body>
11 <div>Below should be a canvas rendered with canvas2D</div> 11 <div>Below should be a canvas rendered with canvas2D</div>
12 <canvas id="my-canvas" width="100" height="100"></canvas> 12 <canvas id="my-canvas" width="100" height="100"></canvas>
13 <script type="application/javascript"> 13 <script src="background.js"></script>
14 canvas = document.getElementById("my-canvas");
15 if (canvas) {
16 if (canvas.getContext) {
17 context = canvas.getContext("2d");
18 if (context) {
19 context.fillStyle = 'red';
20 context.fillRect(20, 20, 40, 40);
21 chrome.test.notifyPass();
22 } else {
23 chrome.test.notifyFail("unable to getContext('2d')");
24 }
25 } else {
26 chrome.test.notifyFail("canvas.getContext null");
27 }
28 } else {
29 chrome.test.notifyFail("couldn't find element my-canvas");
30 }
31 </script>
32 </body> 14 </body>
33 </html> 15 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698