| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 2308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2319 EXPECT_EQ("testword", std::string(frame->SelectionAsText().Utf8().data())); | 2319 EXPECT_EQ("testword", std::string(frame->SelectionAsText().Utf8().data())); |
| 2320 } | 2320 } |
| 2321 | 2321 |
| 2322 TEST_P(WebViewTest, FinishComposingTextDoesNotDismissHandles) { | 2322 TEST_P(WebViewTest, FinishComposingTextDoesNotDismissHandles) { |
| 2323 RegisterMockedHttpURLLoad("longpress_selection.html"); | 2323 RegisterMockedHttpURLLoad("longpress_selection.html"); |
| 2324 | 2324 |
| 2325 WebViewBase* web_view = web_view_helper_.InitializeAndLoad( | 2325 WebViewBase* web_view = web_view_helper_.InitializeAndLoad( |
| 2326 base_url_ + "longpress_selection.html", true); | 2326 base_url_ + "longpress_selection.html", true); |
| 2327 web_view->Resize(WebSize(500, 300)); | 2327 web_view->Resize(WebSize(500, 300)); |
| 2328 web_view->UpdateAllLifecyclePhases(); | 2328 web_view->UpdateAllLifecyclePhases(); |
| 2329 web_view->SetInitialFocus(false); |
| 2329 RunPendingTasks(); | 2330 RunPendingTasks(); |
| 2330 | 2331 |
| 2331 WebString target = WebString::FromUTF8("target"); | 2332 WebString target = WebString::FromUTF8("target"); |
| 2332 WebLocalFrameBase* frame = web_view->MainFrameImpl(); | 2333 WebLocalFrameBase* frame = web_view->MainFrameImpl(); |
| 2333 WebInputMethodController* active_input_method_controller = | 2334 WebInputMethodController* active_input_method_controller = |
| 2334 frame->FrameWidget()->GetActiveWebInputMethodController(); | 2335 frame->FrameWidget()->GetActiveWebInputMethodController(); |
| 2335 EXPECT_TRUE(TapElementById(WebInputEvent::kGestureTap, target)); | 2336 EXPECT_TRUE(TapElementById(WebInputEvent::kGestureTap, target)); |
| 2336 WebVector<WebCompositionUnderline> empty_underlines; | 2337 WebVector<WebCompositionUnderline> empty_underlines; |
| 2337 frame->SetEditableSelectionOffsets(8, 8); | 2338 frame->SetEditableSelectionOffsets(8, 8); |
| 2338 EXPECT_TRUE(active_input_method_controller->SetComposition( | 2339 EXPECT_TRUE(active_input_method_controller->SetComposition( |
| (...skipping 2001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4340 EXPECT_FALSE(frame_view->VisualViewportSuppliesScrollbars()); | 4341 EXPECT_FALSE(frame_view->VisualViewportSuppliesScrollbars()); |
| 4341 if (RuntimeEnabledFeatures::RootLayerScrollingEnabled()) { | 4342 if (RuntimeEnabledFeatures::RootLayerScrollingEnabled()) { |
| 4342 EXPECT_NE(nullptr, | 4343 EXPECT_NE(nullptr, |
| 4343 frame_view->LayoutViewportScrollableArea()->VerticalScrollbar()); | 4344 frame_view->LayoutViewportScrollableArea()->VerticalScrollbar()); |
| 4344 } else { | 4345 } else { |
| 4345 EXPECT_NE(nullptr, frame_view->VerticalScrollbar()); | 4346 EXPECT_NE(nullptr, frame_view->VerticalScrollbar()); |
| 4346 } | 4347 } |
| 4347 } | 4348 } |
| 4348 | 4349 |
| 4349 } // namespace blink | 4350 } // namespace blink |
| OLD | NEW |