1 // Copyright 2013 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 // Notify pass to return control to the ApiTest. This needs to be done in 2
6 // passes so we can open the popup from the ApiTest side because loading an
7 // extension hides any open popups. After a popup is opened, we can assert that
8 // a popup fails to open with this API.
9 chrome.test.notifyPass();
10 chrome.test.sendMessage('ready', function() {
11 chrome.browserAction.openPopup(function(popupWindow2) {
12 // This popup should fail to open.
13 chrome.test.assertTrue(!popupWindow2);
14 chrome.test.succeed();