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

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

Issue 306004: Revert 29457, because this is making ExtensionBrowserTest.PageAction crash on... (Closed) Base URL: svn://chrome-svn/chrome/trunk/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
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});
9 clicks++; 8 clicks++;
10 // We only have 1 icon, but cycle through 3 icons to test the 9 // We only have 1 icon, but cycle through 3 icons to test the
11 // out-of-bounds index bug. 10 // out-of-bounds index bug.
12 if (clicks > 2) 11 if (clicks > 2)
13 clicks = 0; 12 clicks = 0;
14 }); 13 });
15 var i = 0; 14 var i = 0;
16 15
17 window.setInterval(function() { 16 window.setInterval(function() {
18 // Don't animate while in "click" mode. 17 // Don't animate while in "click" mode.
(...skipping 14 matching lines...) Expand all
33 context.fillRect((startx + 10) % 20, (starty + 10) % 20, 8, 8); 32 context.fillRect((startx + 10) % 20, (starty + 10) % 20, 8, 8);
34 return context.getImageData(0, 0, 20, 20); 33 return context.getImageData(0, 0, 20, 20);
35 } 34 }
36 </script> 35 </script>
37 </head> 36 </head>
38 <body> 37 <body>
39 <canvas id="canvas" width="20" height="20"></canvas> 38 <canvas id="canvas" width="20" height="20"></canvas>
40 </body> 39 </body>
41 </html> 40 </html>
42 41
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