Remove unused parameter.
[chromium-blink-merge.git] / extensions / shell / browser / shell_browsertest.cc
blob93e6b39d5f84b941e83d51266a4b2785f7538a37
1 // Copyright 2014 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 #include "base/logging.h"
6 #include "content/public/browser/notification_service.h"
7 #include "content/public/browser/web_contents.h"
8 #include "content/public/test/test_utils.h"
9 #include "extensions/browser/app_window/app_window.h"
10 #include "extensions/browser/app_window/app_window_registry.h"
11 #include "extensions/browser/notification_types.h"
12 #include "extensions/shell/test/shell_apitest.h"
14 #if defined(USE_AURA)
15 #include "ui/aura/window.h"
16 #endif
18 namespace extensions {
20 // Flaky on linux. See http://crbug.com/470873.
21 #if defined(OS_LINUX)
22 #define MAYBE_Basic DISABLED_Basic
23 #else
24 #define MAYBE_Basic Basic
25 #endif
26 // Test that we can open an app window and wait for it to load.
27 IN_PROC_BROWSER_TEST_F(ShellApiTest, MAYBE_Basic) {
28 ASSERT_TRUE(RunAppTest("platform_app")) << message_;
30 // A window was created.
31 AppWindow* app_window =
32 AppWindowRegistry::Get(browser_context())->app_windows().front();
33 ASSERT_TRUE(app_window);
35 // TOOD(yoz): Test for focus on Cocoa.
36 // app_window->GetBaseWindow()->IsActive() is possible, although on Mac,
37 // focus changes are asynchronous, so interactive_ui_tests are required.
38 #if defined(USE_AURA)
39 // The web contents have focus.
40 EXPECT_TRUE(app_window->web_contents()->GetContentNativeView()->HasFocus());
41 #endif
44 } // namespace extensions