Chromium Code Reviews| 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 2306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2317 EXPECT_EQ("testword", std::string(frame->SelectionAsText().Utf8().data())); | 2317 EXPECT_EQ("testword", std::string(frame->SelectionAsText().Utf8().data())); |
| 2318 } | 2318 } |
| 2319 | 2319 |
| 2320 TEST_P(WebViewTest, FinishComposingTextDoesNotDismissHandles) { | 2320 TEST_P(WebViewTest, FinishComposingTextDoesNotDismissHandles) { |
| 2321 RegisterMockedHttpURLLoad("longpress_selection.html"); | 2321 RegisterMockedHttpURLLoad("longpress_selection.html"); |
| 2322 | 2322 |
| 2323 WebViewBase* web_view = web_view_helper_.InitializeAndLoad( | 2323 WebViewBase* web_view = web_view_helper_.InitializeAndLoad( |
| 2324 base_url_ + "longpress_selection.html", true); | 2324 base_url_ + "longpress_selection.html", true); |
| 2325 web_view->Resize(WebSize(500, 300)); | 2325 web_view->Resize(WebSize(500, 300)); |
| 2326 web_view->UpdateAllLifecyclePhases(); | 2326 web_view->UpdateAllLifecyclePhases(); |
| 2327 web_view->SetInitialFocus(false); | |
|
EhsanK
2017/05/30 22:39:22
Without it line 2332 returns nullptr after the cha
| |
| 2327 RunPendingTasks(); | 2328 RunPendingTasks(); |
| 2328 | 2329 |
| 2329 WebString target = WebString::FromUTF8("target"); | 2330 WebString target = WebString::FromUTF8("target"); |
| 2330 WebLocalFrameBase* frame = web_view->MainFrameImpl(); | 2331 WebLocalFrameBase* frame = web_view->MainFrameImpl(); |
| 2331 WebInputMethodController* active_input_method_controller = | 2332 WebInputMethodController* active_input_method_controller = |
| 2332 frame->FrameWidget()->GetActiveWebInputMethodController(); | 2333 frame->FrameWidget()->GetActiveWebInputMethodController(); |
| 2333 EXPECT_TRUE(TapElementById(WebInputEvent::kGestureTap, target)); | 2334 EXPECT_TRUE(TapElementById(WebInputEvent::kGestureTap, target)); |
| 2334 WebVector<WebCompositionUnderline> empty_underlines; | 2335 WebVector<WebCompositionUnderline> empty_underlines; |
| 2335 frame->SetEditableSelectionOffsets(8, 8); | 2336 frame->SetEditableSelectionOffsets(8, 8); |
| 2336 EXPECT_TRUE(active_input_method_controller->SetComposition( | 2337 EXPECT_TRUE(active_input_method_controller->SetComposition( |
| (...skipping 2001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4338 EXPECT_FALSE(frame_view->VisualViewportSuppliesScrollbars()); | 4339 EXPECT_FALSE(frame_view->VisualViewportSuppliesScrollbars()); |
| 4339 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 4340 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 4340 EXPECT_NE(nullptr, | 4341 EXPECT_NE(nullptr, |
| 4341 frame_view->LayoutViewportScrollableArea()->VerticalScrollbar()); | 4342 frame_view->LayoutViewportScrollableArea()->VerticalScrollbar()); |
| 4342 } else { | 4343 } else { |
| 4343 EXPECT_NE(nullptr, frame_view->VerticalScrollbar()); | 4344 EXPECT_NE(nullptr, frame_view->VerticalScrollbar()); |
| 4344 } | 4345 } |
| 4345 } | 4346 } |
| 4346 | 4347 |
| 4347 } // namespace blink | 4348 } // namespace blink |
| OLD | NEW |