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

Side by Side Diff: ui/base/ime/input_method_ibus_unittest.cc

Issue 10928199: Add ExtendSelectionAndDelete() method to ui::TextInputClient. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add ExtendSelectionAndDelete() to some test classes. Created 8 years, 3 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
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 <cstring> 5 #include <cstring>
6 6
7 #include "base/i18n/char_iterator.h" 7 #include "base/i18n/char_iterator.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chromeos/dbus/dbus_thread_manager.h" 10 #include "chromeos/dbus/dbus_thread_manager.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 virtual bool GetSelectionRange(Range* range) OVERRIDE { return false; } 207 virtual bool GetSelectionRange(Range* range) OVERRIDE { return false; }
208 virtual bool SetSelectionRange(const Range& range) OVERRIDE { return false; } 208 virtual bool SetSelectionRange(const Range& range) OVERRIDE { return false; }
209 virtual bool DeleteRange(const Range& range) OVERRIDE { return false; } 209 virtual bool DeleteRange(const Range& range) OVERRIDE { return false; }
210 virtual bool GetTextFromRange(const Range& range, 210 virtual bool GetTextFromRange(const Range& range,
211 string16* text) OVERRIDE { return false; } 211 string16* text) OVERRIDE { return false; }
212 virtual void OnInputMethodChanged() OVERRIDE { 212 virtual void OnInputMethodChanged() OVERRIDE {
213 ++on_input_method_changed_call_count_; 213 ++on_input_method_changed_call_count_;
214 } 214 }
215 virtual bool ChangeTextDirectionAndLayoutAlignment( 215 virtual bool ChangeTextDirectionAndLayoutAlignment(
216 base::i18n::TextDirection direction) OVERRIDE { return false; } 216 base::i18n::TextDirection direction) OVERRIDE { return false; }
217 virtual void ExtendSelectionAndDelete(int before, int after) OVERRIDE { }
Seigo Nonaka 2012/09/14 04:49:19 remove white space after brace.
217 218
218 bool HasNativeEvent() const { 219 bool HasNativeEvent() const {
219 base::NativeEvent empty; 220 base::NativeEvent empty;
220 std::memset(&empty, 0, sizeof(empty)); 221 std::memset(&empty, 0, sizeof(empty));
221 return !!std::memcmp(&dispatched_native_event_, 222 return !!std::memcmp(&dispatched_native_event_,
222 &empty, 223 &empty,
223 sizeof(dispatched_native_event_)); 224 sizeof(dispatched_native_event_));
224 } 225 }
225 226
226 void ResetFlags() { 227 void ResetFlags() {
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 composition_text.underlines[0].start_offset); 888 composition_text.underlines[0].start_offset);
888 EXPECT_EQ(GetOffsetInUTF16(kSampleText, selection.end_index), 889 EXPECT_EQ(GetOffsetInUTF16(kSampleText, selection.end_index),
889 composition_text.underlines[0].end_offset); 890 composition_text.underlines[0].end_offset);
890 EXPECT_EQ(SK_ColorBLACK, composition_text.underlines[0].color); 891 EXPECT_EQ(SK_ColorBLACK, composition_text.underlines[0].color);
891 EXPECT_TRUE(composition_text.underlines[0].thick); 892 EXPECT_TRUE(composition_text.underlines[0].thick);
892 } 893 }
893 894
894 // TODO(nona): Write more tests, especially for key event functions. 895 // TODO(nona): Write more tests, especially for key event functions.
895 896
896 } // namespace ui 897 } // namespace ui
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_win.cc ('k') | ui/base/ime/text_input_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698