| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
| 6 #include "chrome/browser/ui/browser_window.h" | 6 #include "chrome/browser/ui/browser_window.h" |
| 7 #include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h" | 7 #include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h" |
| 8 #include "chrome/common/chrome_notification_types.h" | 8 #include "chrome/common/chrome_notification_types.h" |
| 9 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
| 10 #include "chrome/test/base/ui_test_utils.h" | 10 #include "chrome/test/base/ui_test_utils.h" |
| 11 #include "content/public/browser/notification_service.h" | 11 #include "content/public/browser/notification_service.h" |
| 12 #include "content/public/browser/notification_types.h" | 12 #include "content/public/browser/notification_types.h" |
| 13 #include "net/base/mock_host_resolver.h" | 13 #include "net/base/mock_host_resolver.h" |
| 14 #include "ui/views/widget/widget.h" | 14 #include "views/widget/widget.h" |
| 15 | 15 |
| 16 class VirtualKeyboardManagerTest : public InProcessBrowserTest, | 16 class VirtualKeyboardManagerTest : public InProcessBrowserTest, |
| 17 public content::NotificationObserver { | 17 public content::NotificationObserver { |
| 18 public: | 18 public: |
| 19 VirtualKeyboardManagerTest() | 19 VirtualKeyboardManagerTest() |
| 20 : InProcessBrowserTest(), | 20 : InProcessBrowserTest(), |
| 21 keyboard_visible_(false) { | 21 keyboard_visible_(false) { |
| 22 } | 22 } |
| 23 | 23 |
| 24 bool keyboard_visible() const { return keyboard_visible_; } | 24 bool keyboard_visible() const { return keyboard_visible_; } |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 load_stop_observer.Wait(); | 89 load_stop_observer.Wait(); |
| 90 | 90 |
| 91 // Focus the first tab where the textfield has the focus. | 91 // Focus the first tab where the textfield has the focus. |
| 92 browser()->SelectNextTab(); | 92 browser()->SelectNextTab(); |
| 93 EXPECT_TRUE(keyboard_visible()); | 93 EXPECT_TRUE(keyboard_visible()); |
| 94 | 94 |
| 95 // Focus the next tab again. | 95 // Focus the next tab again. |
| 96 browser()->SelectNextTab(); | 96 browser()->SelectNextTab(); |
| 97 EXPECT_FALSE(keyboard_visible()); | 97 EXPECT_FALSE(keyboard_visible()); |
| 98 } | 98 } |
| OLD | NEW |