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

Side by Side Diff: chrome/test/data/extensions/api_test/system_indicator/basics/test.js

Issue 11361189: Initial skeleton for System Indicator API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Final style fixes Created 8 years 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
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 chrome.test.runTests([
6 function setIconAndShow() {
7 var canvas = document.createElement('canvas');
8 canvas.width = 20;
9 canvas.height = 20;
10
11 var canvas_context = canvas.getContext('2d');
12 canvas_context.clearRect(0, 0, 20, 20);
13 canvas_context.fillStyle = '#00FF00';
14 canvas_context.fillRect(5, 5, 15, 15);
15 var data = canvas_context.getImageData(0, 0, 19, 19);
16 chrome.systemIndicator.setIcon(
17 { imageData: data },
18 chrome.test.callbackPass(function() {
19 chrome.systemIndicator.enable();
20 chrome.systemIndicator.disable();
21 }));
22 }
23 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698