Upstream version 11.40.271.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / login / ui / login_web_dialog_browsertest.cc
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(
22       browser()->profile(), NULL, NULL, base::string16(), GURL());
23   dialog->Show();
24
25   aura::client::ActivationClient* activation_client =
26       aura::client::GetActivationClient(
27           ash::Shell::GetInstance()->GetPrimaryRootWindow());
28   aura::Window* active_window = activation_client->GetActiveWindow();
29   ASSERT_TRUE(active_window != NULL);
30   EXPECT_FALSE(active_window->GetProperty(aura::client::kCanMinimizeKey));
31 }
32
33 }  // namespace chromeos