| Index: chrome/browser/extensions/api/tabs/tabs_test.cc
|
| diff --git a/chrome/browser/extensions/api/tabs/tabs_test.cc b/chrome/browser/extensions/api/tabs/tabs_test.cc
|
| index f2f3aa3ca189f54cc7d5f1ae3c4c136785bb9d45..101adbf31e5e0f47934cf4c318d0d19ff2739c6a 100644
|
| --- a/chrome/browser/extensions/api/tabs/tabs_test.cc
|
| +++ b/chrome/browser/extensions/api/tabs/tabs_test.cc
|
| @@ -41,10 +41,8 @@ namespace keys = tabs_constants;
|
| namespace utils = extension_function_test_utils;
|
|
|
| namespace {
|
| -
|
| -class ExtensionTabsTest : public InProcessBrowserTest {
|
| -};
|
| -
|
| +using ExtensionTabsTest = InProcessBrowserTest;
|
| +using ExtensionWindowCreateTest = InProcessBrowserTest;
|
| }
|
|
|
| IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, GetWindow) {
|
| @@ -564,6 +562,38 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, InvalidUpdateWindowState) {
|
| keys::kInvalidWindowStateError));
|
| }
|
|
|
| +IN_PROC_BROWSER_TEST_F(ExtensionWindowCreateTest, AcceptState) {
|
| + scoped_refptr<WindowsCreateFunction> function(new WindowsCreateFunction());
|
| + scoped_refptr<Extension> extension(test_util::CreateEmptyExtension());
|
| + function->set_extension(extension.get());
|
| +
|
| + scoped_ptr<base::DictionaryValue> result(
|
| + utils::ToDictionary(utils::RunFunctionAndReturnSingleResult(
|
| + function.get(), "[{\"state\": \"fullscreen\"}]", browser(),
|
| + utils::INCLUDE_INCOGNITO)));
|
| + int window_id = api_test_utils::GetInteger(result.get(), "id");
|
| + std::string error;
|
| + Browser* new_window = ExtensionTabUtil::GetBrowserFromWindowID(
|
| + function.get(), window_id, &error);
|
| + EXPECT_TRUE(new_window->window()->IsFullscreen());
|
| + EXPECT_TRUE(error.empty());
|
| +
|
| + function = new WindowsCreateFunction();
|
| + function->set_extension(extension.get());
|
| + result.reset(utils::ToDictionary(utils::RunFunctionAndReturnSingleResult(
|
| + function.get(), "[{\"state\": \"minimized\"}]", browser(),
|
| + utils::INCLUDE_INCOGNITO)));
|
| + window_id = api_test_utils::GetInteger(result.get(), "id");
|
| + new_window = ExtensionTabUtil::GetBrowserFromWindowID(function.get(),
|
| + window_id, &error);
|
| + EXPECT_TRUE(error.empty());
|
| +#if !defined(OS_LINUX) || defined(OS_CHROMEOS)
|
| + // DesktopWindowTreeHostX11::IsMinimized() relies on an asynchronous update
|
| + // from the window server.
|
| + EXPECT_TRUE(new_window->window()->IsMinimized());
|
| +#endif
|
| +}
|
| +
|
| IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, DuplicateTab) {
|
| content::OpenURLParams params(GURL(url::kAboutBlankURL),
|
| content::Referrer(),
|
|
|