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

Side by Side Diff: ui/keyboard/keyboard_controller_unittest.cc

Issue 119753007: Add GrabWindowSnapshotAsync tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, compiling Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/window_tree_host.cc ('k') | ui/snapshot/snapshot.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/aura/client/focus_client.h" 10 #include "ui/aura/client/focus_client.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 } // namespace 192 } // namespace
193 193
194 class KeyboardControllerTest : public testing::Test { 194 class KeyboardControllerTest : public testing::Test {
195 public: 195 public:
196 KeyboardControllerTest() {} 196 KeyboardControllerTest() {}
197 virtual ~KeyboardControllerTest() {} 197 virtual ~KeyboardControllerTest() {}
198 198
199 virtual void SetUp() OVERRIDE { 199 virtual void SetUp() OVERRIDE {
200 aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_)); 200 aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_));
201 aura_test_helper_->SetUp(); 201 bool allow_test_contexts = true;
202 aura_test_helper_->SetUp(allow_test_contexts);
202 ui::SetUpInputMethodFactoryForTesting(); 203 ui::SetUpInputMethodFactoryForTesting();
203 focus_controller_.reset(new TestFocusController(root_window())); 204 focus_controller_.reset(new TestFocusController(root_window()));
204 proxy_ = new TestKeyboardControllerProxy(); 205 proxy_ = new TestKeyboardControllerProxy();
205 controller_.reset(new KeyboardController(proxy_)); 206 controller_.reset(new KeyboardController(proxy_));
206 } 207 }
207 208
208 virtual void TearDown() OVERRIDE { 209 virtual void TearDown() OVERRIDE {
209 focus_controller_.reset(); 210 focus_controller_.reset();
210 aura_test_helper_->TearDown(); 211 aura_test_helper_->TearDown();
211 } 212 }
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 434
434 EXPECT_TRUE(keyboard_container->IsVisible()); 435 EXPECT_TRUE(keyboard_container->IsVisible());
435 436
436 input_method->SetFocusedTextInputClient(&no_input_client); 437 input_method->SetFocusedTextInputClient(&no_input_client);
437 // Keyboard should not hide itself after lost focus. 438 // Keyboard should not hide itself after lost focus.
438 EXPECT_TRUE(keyboard_container->IsVisible()); 439 EXPECT_TRUE(keyboard_container->IsVisible());
439 EXPECT_FALSE(WillHideKeyboard()); 440 EXPECT_FALSE(WillHideKeyboard());
440 } 441 }
441 442
442 } // namespace keyboard 443 } // namespace keyboard
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host.cc ('k') | ui/snapshot/snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698