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

Unified Diff: chrome/browser/chromeos/compact_location_bar_host_browsertest.cc

Issue 2812007: Remove compact navbar: 1st step. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: " Created 10 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/compact_navigation_bar_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/compact_location_bar_host_browsertest.cc
diff --git a/chrome/browser/chromeos/compact_location_bar_host_browsertest.cc b/chrome/browser/chromeos/compact_location_bar_host_browsertest.cc
deleted file mode 100644
index 7c4c4afc60ad154a557086a923143f36eb14a35f..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/compact_location_bar_host_browsertest.cc
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (c) 2010 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/automation/ui_controls.h"
-#include "chrome/browser/browser.h"
-#include "chrome/browser/browser_process.h"
-#include "chrome/browser/chromeos/compact_location_bar_host.h"
-#include "chrome/browser/chromeos/frame/browser_view.h"
-#include "chrome/browser/chromeos/view_ids.h"
-#include "chrome/test/in_process_browser_test.h"
-#include "chrome/test/ui_test_utils.h"
-#include "views/widget/widget.h"
-#include "views/window/window.h"
-
-namespace chromeos {
-
-class CompactLocationBarHostTest : public InProcessBrowserTest {
- public:
- CompactLocationBarHostTest() {
- }
-
- virtual void SetUp() {
- // Don't animate during the test.
- DropdownBarHost::disable_animations_during_testing_ = true;
- InProcessBrowserTest::SetUp();
- }
-
- BrowserView* browser_view() const {
- return static_cast<BrowserView*>(browser()->window());
- }
-
- gfx::NativeWindow window() const {
- return browser_view()->GetNativeHandle();
- }
-
- CompactLocationBarHost* clb_host() const {
- return browser_view()->compact_location_bar_host();
- }
-
- bool IsViewIdVisible(int id) const {
- return browser_view()->GetViewByID(id)->IsVisible();
- }
-
- bool IsCurrentTabIndex(int index) {
- return clb_host()->IsCurrentTabIndex(index);
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CompactLocationBarHostTest);
-};
-
-IN_PROC_BROWSER_TEST_F(CompactLocationBarHostTest, TestCtrlLOpen) {
- // ctrl-l should not open compact location bar in normal mode.
- ui_controls::SendKeyPress(window(), base::VKEY_L, true, false, false, false);
- ui_test_utils::RunAllPendingInMessageLoop();
- EXPECT_TRUE(IsCurrentTabIndex(-1));
- EXPECT_FALSE(clb_host()->IsVisible());
-
- browser()->ToggleCompactNavigationBar();
- ui_test_utils::RunAllPendingInMessageLoop();
- EXPECT_TRUE(IsCurrentTabIndex(-1));
- EXPECT_FALSE(clb_host()->IsVisible());
-
- // ctrl-l should not open compact location bar in compact nav mode.
- ui_controls::SendKeyPress(window(), base::VKEY_L, true, false, false, false);
- ui_test_utils::RunAllPendingInMessageLoop();
- EXPECT_TRUE(IsCurrentTabIndex(0));
- EXPECT_TRUE(clb_host()->IsVisible());
-
- // Esc to close it.
- ui_controls::SendKeyPress(window(), base::VKEY_ESCAPE,
- false, false, false, false);
- ui_test_utils::RunAllPendingInMessageLoop();
- EXPECT_TRUE(IsCurrentTabIndex(0));
- EXPECT_FALSE(clb_host()->IsVisible());
-}
-
-IN_PROC_BROWSER_TEST_F(CompactLocationBarHostTest, TestOnNewTab) {
- browser()->ToggleCompactNavigationBar();
- ui_controls::SendKeyPress(window(), base::VKEY_L, true, false, false, false);
- ui_test_utils::RunAllPendingInMessageLoop();
- EXPECT_TRUE(IsCurrentTabIndex(0));
- EXPECT_TRUE(clb_host()->IsVisible());
-
- browser()->NewTab();
- ui_test_utils::RunAllPendingInMessageLoop();
-
- // See http://crbug.com/39858 for details.
- //EXPECT_FALSE(clb_host()->IsVisible());
-
- ui_controls::SendKeyPress(window(), base::VKEY_L, true, false, false, false);
- ui_test_utils::RunAllPendingInMessageLoop();
- EXPECT_TRUE(IsCurrentTabIndex(1));
- EXPECT_TRUE(clb_host()->IsVisible());
-}
-
-} // namespace chromeos
« no previous file with comments | « no previous file | chrome/browser/chromeos/compact_navigation_bar_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698