- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / test / data / extensions / api_test / browser_action / add_popup / background.js
1 // Copyright (c) 2011 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 chrome.tabs.getSelected(null, function(tab) {
6   // When the browser action is clicked, add a popup.
7   chrome.browserAction.onClicked.addListener(function(tab) {
8     chrome.browserAction.setPopup({
9       tabId: tab.id,
10       popup: 'a_popup.html'
11     });
12     chrome.test.notifyPass();
13   });
14   chrome.test.notifyPass();
15 });