- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / test / data / extensions / api_test / page_action / getters / update.js
1 // Copyright (c) 2012 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 var pass = chrome.test.callbackPass;
6
7 chrome.tabs.getSelected(null, function(tab) {
8   chrome.test.runTests([
9     function getPopup() {
10       chrome.pageAction.getPopup({tabId: tab.id}, pass(function(result) {
11         chrome.test.assertTrue(
12             /chrome-extension\:\/\/[a-p]{32}\/Popup\.html/.test(result));
13       }));
14     },
15
16     function getTitle() {
17       chrome.pageAction.getTitle({tabId: tab.id}, pass(function(result) {
18         chrome.test.assertEq("Title", result);
19       }));
20     }
21   ]);
22 });