OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #include "chrome/browser/chromeos/login/ui/login_web_dialog.h" | |
6 | |
7 #include "ash/shell.h" | |
8 #include "chrome/browser/profiles/profile.h" | |
9 #include "chrome/browser/ui/browser.h" | |
10 #include "chrome/test/base/in_process_browser_test.h" | |
11 #include "ui/aura/client/aura_constants.h" | |
12 #include "ui/aura/window.h" | |
13 #include "ui/wm/public/activation_client.h" | |
14 | |
15 namespace chromeos { | |
16 | |
17 typedef InProcessBrowserTest LoginWebDialogTest; | |
18 | |
19 // Test that LoginWebDialog is not minimizable. | |
20 IN_PROC_BROWSER_TEST_F(LoginWebDialogTest, CannotMinimize) { | |
21 LoginWebDialog* dialog = new LoginWebDialog(browser()->profile(), | |
22 NULL, | |
23 NULL, | |
24 base::string16(), | |
25 GURL(), | |
26 LoginWebDialog::STYLE_BUBBLE); | |
27 dialog->Show(); | |
28 | |
29 aura::client::ActivationClient* activation_client = | |
30 aura::client::GetActivationClient( | |
31 ash::Shell::GetInstance()->GetPrimaryRootWindow()); | |
32 aura::Window* active_window = activation_client->GetActiveWindow(); | |
33 ASSERT_TRUE(active_window != NULL); | |
34 EXPECT_FALSE(active_window->GetProperty(aura::client::kCanMinimizeKey)); | |
35 } | |
36 | |
37 } // namespace chromeos | |
OLD | NEW |