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

Side by Side Diff: ui/aura/test/aura_test_base.cc

Issue 13235003: Support the Text services framework based IME for Chrome AURA on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 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 | « chrome/test/base/view_event_test_base.cc ('k') | ui/base/ime/input_method_win.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/aura/test/aura_test_base.h" 5 #include "ui/aura/test/aura_test_base.h"
6 6
7 #include "ui/aura/test/aura_test_helper.h" 7 #include "ui/aura/test/aura_test_helper.h"
8 #include "ui/aura/test/test_window_delegate.h" 8 #include "ui/aura/test/test_window_delegate.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/base/gestures/gesture_configuration.h" 10 #include "ui/base/gestures/gesture_configuration.h"
11 #include "ui/base/ime/text_input_test_support.h" 11 #include "ui/base/ime/text_input_test_support.h"
12 12
13 #if defined(OS_WIN)
14 #include "base/win/metro.h"
15 #include "ui/base/ime/win/tsf_bridge.h"
16 #endif
17
13 namespace aura { 18 namespace aura {
14 namespace test { 19 namespace test {
15 20
16 AuraTestBase::AuraTestBase() { 21 AuraTestBase::AuraTestBase() {
17 } 22 }
18 23
19 AuraTestBase::~AuraTestBase() { 24 AuraTestBase::~AuraTestBase() {
20 } 25 }
21 26
22 void AuraTestBase::SetUp() { 27 void AuraTestBase::SetUp() {
(...skipping 29 matching lines...) Expand all
52 ui::GestureConfiguration::set_fling_acceleration_curve_coefficients( 57 ui::GestureConfiguration::set_fling_acceleration_curve_coefficients(
53 1, -0.0238095f); 58 1, -0.0238095f);
54 ui::GestureConfiguration::set_fling_acceleration_curve_coefficients( 59 ui::GestureConfiguration::set_fling_acceleration_curve_coefficients(
55 2, 0.0452381f); 60 2, 0.0452381f);
56 ui::GestureConfiguration::set_fling_acceleration_curve_coefficients( 61 ui::GestureConfiguration::set_fling_acceleration_curve_coefficients(
57 3, 0.8f); 62 3, 0.8f);
58 ui::GestureConfiguration::set_fling_velocity_cap(15000.0f); 63 ui::GestureConfiguration::set_fling_velocity_cap(15000.0f);
59 64
60 helper_.reset(new AuraTestHelper(&message_loop_)); 65 helper_.reset(new AuraTestHelper(&message_loop_));
61 helper_->SetUp(); 66 helper_->SetUp();
67 #if defined(OS_WIN)
68 if (base::win::IsTSFAwareRequired())
69 ui::TSFBridge::Initialize();
70 #endif
62 } 71 }
63 72
64 void AuraTestBase::TearDown() { 73 void AuraTestBase::TearDown() {
65 // Flush the message loop because we have pending release tasks 74 // Flush the message loop because we have pending release tasks
66 // and these tasks if un-executed would upset Valgrind. 75 // and these tasks if un-executed would upset Valgrind.
67 RunAllPendingInMessageLoop(); 76 RunAllPendingInMessageLoop();
68 77
69 helper_->TearDown(); 78 helper_->TearDown();
70 ui::TextInputTestSupport::Shutdown(); 79 ui::TextInputTestSupport::Shutdown();
71 testing::Test::TearDown(); 80 testing::Test::TearDown();
(...skipping 25 matching lines...) Expand all
97 void AuraTestBase::SetDefaultParentByPrimaryRootWindow(aura::Window* window) { 106 void AuraTestBase::SetDefaultParentByPrimaryRootWindow(aura::Window* window) {
98 window->SetDefaultParentByRootWindow(root_window(), gfx::Rect()); 107 window->SetDefaultParentByRootWindow(root_window(), gfx::Rect());
99 } 108 }
100 109
101 void AuraTestBase::RunAllPendingInMessageLoop() { 110 void AuraTestBase::RunAllPendingInMessageLoop() {
102 helper_->RunAllPendingInMessageLoop(); 111 helper_->RunAllPendingInMessageLoop();
103 } 112 }
104 113
105 } // namespace test 114 } // namespace test
106 } // namespace aura 115 } // namespace aura
OLDNEW
« no previous file with comments | « chrome/test/base/view_event_test_base.cc ('k') | ui/base/ime/input_method_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698