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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Issue 1635953002: Added replacement_range to ImeSetComposition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: erikchen's review Created 4 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
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 "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 ASSERT_EQ(underlines.size(), base::get<1>(params).size()); 1077 ASSERT_EQ(underlines.size(), base::get<1>(params).size());
1078 for (size_t i = 0; i < underlines.size(); ++i) { 1078 for (size_t i = 0; i < underlines.size(); ++i) {
1079 EXPECT_EQ(underlines[i].start_offset, 1079 EXPECT_EQ(underlines[i].start_offset,
1080 base::get<1>(params)[i].startOffset); 1080 base::get<1>(params)[i].startOffset);
1081 EXPECT_EQ(underlines[i].end_offset, base::get<1>(params)[i].endOffset); 1081 EXPECT_EQ(underlines[i].end_offset, base::get<1>(params)[i].endOffset);
1082 EXPECT_EQ(underlines[i].color, base::get<1>(params)[i].color); 1082 EXPECT_EQ(underlines[i].color, base::get<1>(params)[i].color);
1083 EXPECT_EQ(underlines[i].thick, base::get<1>(params)[i].thick); 1083 EXPECT_EQ(underlines[i].thick, base::get<1>(params)[i].thick);
1084 EXPECT_EQ(underlines[i].background_color, 1084 EXPECT_EQ(underlines[i].background_color,
1085 base::get<1>(params)[i].backgroundColor); 1085 base::get<1>(params)[i].backgroundColor);
1086 } 1086 }
1087 EXPECT_EQ(gfx::Range::InvalidRange(), base::get<2>(params));
1087 // highlighted range 1088 // highlighted range
1088 EXPECT_EQ(4, base::get<2>(params)) << "Should be the same to the caret pos";
1089 EXPECT_EQ(4, base::get<3>(params)) << "Should be the same to the caret pos"; 1089 EXPECT_EQ(4, base::get<3>(params)) << "Should be the same to the caret pos";
1090 EXPECT_EQ(4, base::get<4>(params)) << "Should be the same to the caret pos";
1090 } 1091 }
1091 1092
1092 view_->ImeCancelComposition(); 1093 view_->ImeCancelComposition();
1093 EXPECT_FALSE(view_->has_composition_text_); 1094 EXPECT_FALSE(view_->has_composition_text_);
1094 } 1095 }
1095 1096
1096 // Checks that sequence of IME-composition-event and mouse-event when mouse 1097 // Checks that sequence of IME-composition-event and mouse-event when mouse
1097 // clicking to cancel the composition. 1098 // clicking to cancel the composition.
1098 TEST_F(RenderWidgetHostViewAuraTest, FinishCompositionByMouse) { 1099 TEST_F(RenderWidgetHostViewAuraTest, FinishCompositionByMouse) {
1099 view_->InitAsChild(NULL); 1100 view_->InitAsChild(NULL);
(...skipping 2680 matching lines...) Expand 10 before | Expand all | Expand 10 after
3780 view()->OnGestureEvent(&gesture_event); 3781 view()->OnGestureEvent(&gesture_event);
3781 3782
3782 EXPECT_TRUE(delegate->context_menu_request_received()); 3783 EXPECT_TRUE(delegate->context_menu_request_received());
3783 EXPECT_EQ(delegate->context_menu_source_type(), ui::MENU_SOURCE_MOUSE); 3784 EXPECT_EQ(delegate->context_menu_source_type(), ui::MENU_SOURCE_MOUSE);
3784 #endif 3785 #endif
3785 3786
3786 RenderViewHostFactory::set_is_real_render_view_host(false); 3787 RenderViewHostFactory::set_is_real_render_view_host(false);
3787 } 3788 }
3788 3789
3789 } // namespace content 3790 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698