Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Unified Diff: chrome/browser/chromeos/login/ui/login_web_dialog_browsertest.cc

Issue 613563002: Make WindowState::CanMinimize() take into account WidgetDelegate::CanMinimize() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/ui/login_web_dialog_browsertest.cc
diff --git a/chrome/browser/chromeos/login/ui/login_web_dialog_browsertest.cc b/chrome/browser/chromeos/login/ui/login_web_dialog_browsertest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..573feb079a8c820e42de48ecc52f51ed668e0ed5
--- /dev/null
+++ b/chrome/browser/chromeos/login/ui/login_web_dialog_browsertest.cc
@@ -0,0 +1,33 @@
+// Copyright 2014 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/chromeos/login/ui/login_web_dialog.h"
+
+#include "ash/shell.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/browser.h"
+#include "chrome/test/base/in_process_browser_test.h"
+#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/window.h"
+#include "ui/wm/public/activation_client.h"
+
+namespace chromeos {
+
+typedef InProcessBrowserTest LoginWebDialogTest;
+
+// Test that LoginWebDialog is not minimizable.
+IN_PROC_BROWSER_TEST_F(LoginWebDialogTest, CannotMinimize) {
+ LoginWebDialog* dialog = new LoginWebDialog(
+ browser()->profile(), NULL, NULL, base::string16(), GURL());
+ dialog->Show();
+
+ aura::client::ActivationClient* activation_client =
+ aura::client::GetActivationClient(
+ ash::Shell::GetInstance()->GetPrimaryRootWindow());
+ aura::Window* active_window = activation_client->GetActiveWindow();
+ ASSERT_TRUE(active_window != NULL);
+ EXPECT_FALSE(active_window->GetProperty(aura::client::kCanMinimizeKey));
+}
+
+} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698