| Index: content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
|
| index 751ff9c86bdc46f7f5566c92d500f81f188457f7..b4eecea318e93a82317a96f56240090d31a7d047 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
|
| +++ b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
|
| @@ -279,6 +279,13 @@ class RenderWidgetHostViewMacTest : public RenderViewHostImplTestHarness {
|
| rwhv_mac_->Destroy();
|
| }
|
|
|
| + void ActivateViewWithTextInputManager(RenderWidgetHostViewBase* view,
|
| + ui::TextInputType type) {
|
| + TextInputState state;
|
| + state.type = type;
|
| + view->TextInputStateChanged(state);
|
| + }
|
| +
|
| private:
|
| // This class isn't derived from PlatformTest.
|
| base::mac::ScopedNSAutoreleasePool pool_;
|
| @@ -534,6 +541,7 @@ TEST_F(RenderWidgetHostViewMacTest, GetFirstRectForCharacterRangeCaretCase) {
|
| }
|
|
|
| TEST_F(RenderWidgetHostViewMacTest, UpdateCompositionSinglelineCase) {
|
| + ActivateViewWithTextInputManager(rwhv_mac_, ui::TEXT_INPUT_TYPE_TEXT);
|
| const gfx::Point kOrigin(10, 11);
|
| const gfx::Size kBoundsUnit(10, 20);
|
|
|
| @@ -642,6 +650,7 @@ TEST_F(RenderWidgetHostViewMacTest, UpdateCompositionSinglelineCase) {
|
| }
|
|
|
| TEST_F(RenderWidgetHostViewMacTest, UpdateCompositionMultilineCase) {
|
| + ActivateViewWithTextInputManager(rwhv_mac_, ui::TEXT_INPUT_TYPE_TEXT);
|
| const gfx::Point kOrigin(10, 11);
|
| const gfx::Size kBoundsUnit(10, 20);
|
| NSRect rect;
|
| @@ -775,6 +784,7 @@ TEST_F(RenderWidgetHostViewMacTest, UpdateCompositionMultilineCase) {
|
| // firstRectForCharacterRange:actualRange] are handled in a sane manner if they
|
| // arrive after the C++ RenderWidgetHostView is destroyed.
|
| TEST_F(RenderWidgetHostViewMacTest, CompositionEventAfterDestroy) {
|
| + ActivateViewWithTextInputManager(rwhv_mac_, ui::TEXT_INPUT_TYPE_TEXT);
|
| const gfx::Rect composition_bounds(0, 0, 30, 40);
|
| const gfx::Range range(0, 1);
|
| rwhv_mac_->ImeCompositionRangeChanged(
|
|
|