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

Side by Side Diff: chrome/browser/chromeos/input_method/textinput_test_helper.cc

Issue 13925020: keyboard: Add a test suite for the tests, and initialize all the UI things properly. (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 | « no previous file | ui/base/ime/input_method_factory.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 "ash/shell.h" 5 #include "ash/shell.h"
6 #include "base/string_util.h" 6 #include "base/string_util.h"
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/chromeos/input_method/textinput_test_helper.h" 9 #include "chrome/browser/chromeos/input_method/textinput_test_helper.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 10 matching lines...) Expand all
21 ui::MockInputMethod* GetInputMethod() { 21 ui::MockInputMethod* GetInputMethod() {
22 ui::MockInputMethod* input_method = static_cast<ui::MockInputMethod*>( 22 ui::MockInputMethod* input_method = static_cast<ui::MockInputMethod*>(
23 ash::Shell::GetPrimaryRootWindow()->GetProperty( 23 ash::Shell::GetPrimaryRootWindow()->GetProperty(
24 aura::client::kRootWindowInputMethodKey)); 24 aura::client::kRootWindowInputMethodKey));
25 CHECK(input_method); 25 CHECK(input_method);
26 return input_method; 26 return input_method;
27 } 27 }
28 } // namespace 28 } // namespace
29 29
30 void TextInputTestBase::SetUpInProcessBrowserTestFixture() { 30 void TextInputTestBase::SetUpInProcessBrowserTestFixture() {
31 ui::SetUpInputMethodFacotryForTesting(); 31 ui::SetUpInputMethodFactoryForTesting();
32 } 32 }
33 33
34 TextInputTestHelper::TextInputTestHelper() 34 TextInputTestHelper::TextInputTestHelper()
35 : waiting_type_(NO_WAIT), 35 : waiting_type_(NO_WAIT),
36 selection_range_(ui::Range::InvalidRange()), 36 selection_range_(ui::Range::InvalidRange()),
37 focus_state_(false), 37 focus_state_(false),
38 latest_text_input_type_(ui::TEXT_INPUT_TYPE_NONE) { 38 latest_text_input_type_(ui::TEXT_INPUT_TYPE_NONE) {
39 GetInputMethod()->AddObserver(this); 39 GetInputMethod()->AddObserver(this);
40 } 40 }
41 41
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 mouse_event.y = rect.CenterPoint().y(); 190 mouse_event.y = rect.CenterPoint().y();
191 mouse_event.clickCount = 1; 191 mouse_event.clickCount = 1;
192 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); 192 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event);
193 193
194 mouse_event.type = WebKit::WebInputEvent::MouseUp; 194 mouse_event.type = WebKit::WebInputEvent::MouseUp;
195 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); 195 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event);
196 return true; 196 return true;
197 } 197 }
198 198
199 } // namespace chromeos 199 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | ui/base/ime/input_method_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698