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

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: change int to size_t 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(size_t before,
218 size_t after) OVERRIDE { }
217 219
218 bool HasNativeEvent() const { 220 bool HasNativeEvent() const {
219 base::NativeEvent empty; 221 base::NativeEvent empty;
220 std::memset(&empty, 0, sizeof(empty)); 222 std::memset(&empty, 0, sizeof(empty));
221 return !!std::memcmp(&dispatched_native_event_, 223 return !!std::memcmp(&dispatched_native_event_,
222 &empty, 224 &empty,
223 sizeof(dispatched_native_event_)); 225 sizeof(dispatched_native_event_));
224 } 226 }
225 227
226 void ResetFlags() { 228 void ResetFlags() {
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 composition_text.underlines[0].start_offset); 889 composition_text.underlines[0].start_offset);
888 EXPECT_EQ(GetOffsetInUTF16(kSampleText, selection.end_index), 890 EXPECT_EQ(GetOffsetInUTF16(kSampleText, selection.end_index),
889 composition_text.underlines[0].end_offset); 891 composition_text.underlines[0].end_offset);
890 EXPECT_EQ(SK_ColorBLACK, composition_text.underlines[0].color); 892 EXPECT_EQ(SK_ColorBLACK, composition_text.underlines[0].color);
891 EXPECT_TRUE(composition_text.underlines[0].thick); 893 EXPECT_TRUE(composition_text.underlines[0].thick);
892 } 894 }
893 895
894 // TODO(nona): Write more tests, especially for key event functions. 896 // TODO(nona): Write more tests, especially for key event functions.
895 897
896 } // namespace ui 898 } // 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