text: // Copyright (c) 2012 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.
  
  #include "chrome/browser/extensions/extension_apitest.h"
  #include "content/public/test/browser_test.h"
  #include "extensions/test/result_catcher.h"
  
  namespace extensions {
  
  IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowOpenFocus) {
    ASSERT_TRUE(RunExtensionTest("window_open/focus")) << message_;
  }
  
  // The test uses the chrome.browserAction.openPopup API, which requires that the
  // window can automatically be activated.
  IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowOpen) {
    extensions::ResultCatcher catcher;
    ASSERT_TRUE(LoadExtension(
        test_data_dir_.AppendASCII("window_open").AppendASCII("spanning"),
        {.allow_in_incognito = true}));
    EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
  }
  
  }  // namespace extensions
  