| Index: chrome/test/data/extensions/api_test/browser_action/default_persistence/background.js
|
| diff --git a/chrome/test/data/extensions/api_test/browser_action/default_persistence/background.js b/chrome/test/data/extensions/api_test/browser_action/default_persistence/background.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..537e108ffbfa0f1d4d16d833ae7b490963bd6283
|
| --- /dev/null
|
| +++ b/chrome/test/data/extensions/api_test/browser_action/default_persistence/background.js
|
| @@ -0,0 +1,14 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// Set a background color for the badge at OnInstalled().
|
| +chrome.runtime.onInstalled.addListener(function() {
|
| + chrome.browserAction.setBadgeBackgroundColor({color: [0, 0, 255, 255]});
|
| +});
|
| +
|
| +// Every startup, change the badge text, but not the background color (which
|
| +// should persist at the blue we set originally).
|
| +chrome.runtime.onStartup.addListener(function() {
|
| + chrome.browserAction.setBadgeText({text: 'Hello'});
|
| +});
|
|
|