Do not announce robot account token before account ID is available
[chromium-blink-merge.git] / chrome / test / data / extensions / api_test / browser_action / default_persistence / background.js
blobf211f44cd973f013dadb7429e5124cd3a3e2992c
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.
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 chrome.test.sendMessage('Background Color Set');
9 });
11 // Every startup, change the badge text, but not the background color (which
12 // should persist at the blue we set originally).
13 chrome.runtime.onStartup.addListener(function() {
14 chrome.browserAction.setBadgeText({text: 'Hello'});
15 chrome.test.sendMessage('Badge Text Set');
16 });