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

Side by Side Diff: chrome/test/data/extensions/api_test/browser_action/default_persistence/background.js

Issue 186013003: Persist browseraction properties across restarts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 6 years, 9 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
OLDNEW
(Empty)
1 // Copyright 2014 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 // Set a background color for the badge at OnInstalled().
6 chrome.runtime.onInstalled.addListener(function() {
7 chrome.browserAction.setBadgeBackgroundColor({color: [0, 0, 255, 255]});
8 });
9
10 // Every startup, change the badge text, but not the background color (which
11 // should persist at the blue we set originally).
12 chrome.runtime.onStartup.addListener(function() {
13 chrome.browserAction.setBadgeText({text: 'Hello'});
14 });
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/extensions/api_test/browser_action/default_persistence/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698