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

Side by Side Diff: chrome/test/data/extensions/samples/test_browser_action/background.html

Issue 306059: Merge 29556 - Revert "Revert 29457, because this is making ExtensionBrowserTe... (Closed) Base URL: svn://chrome-svn/chrome/branches/223/src/
Patch Set: Created 11 years, 2 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
Property Changes:
Modified: svn:mergeinfo
Merged /trunk/src/chrome/test/data/extensions/samples/test_browser_action/background.html:r29556
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 // Called when the user clicks on the browser action. 4 // Called when the user clicks on the browser action.
5 var clicks = 0; 5 var clicks = 0;
6 chrome.browserAction.onClicked.addListener(function() { 6 chrome.browserAction.onClicked.addListener(function() {
7 chrome.browserAction.setIcon({iconIndex:clicks}); 7 chrome.browserAction.setIcon({iconIndex:clicks});
8 chrome.browserAction.setBadgeText({text:""+i});
8 clicks++; 9 clicks++;
9 // We only have 1 icon, but cycle through 3 icons to test the 10 // We only have 1 icon, but cycle through 3 icons to test the
10 // out-of-bounds index bug. 11 // out-of-bounds index bug.
11 if (clicks > 2) 12 if (clicks > 2)
12 clicks = 0; 13 clicks = 0;
13 }); 14 });
14 var i = 0; 15 var i = 0;
15 16
16 window.setInterval(function() { 17 window.setInterval(function() {
17 // Don't animate while in "click" mode. 18 // Don't animate while in "click" mode.
(...skipping 14 matching lines...) Expand all
32 context.fillRect((startx + 10) % 20, (starty + 10) % 20, 8, 8); 33 context.fillRect((startx + 10) % 20, (starty + 10) % 20, 8, 8);
33 return context.getImageData(0, 0, 20, 20); 34 return context.getImageData(0, 0, 20, 20);
34 } 35 }
35 </script> 36 </script>
36 </head> 37 </head>
37 <body> 38 <body>
38 <canvas id="canvas" width="20" height="20"></canvas> 39 <canvas id="canvas" width="20" height="20"></canvas>
39 </body> 40 </body>
40 </html> 41 </html>
41 42
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_action.cc ('k') | chrome/test/data/extensions/samples/test_page_action/background.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698