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 2439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2450 mouse_event.button = WebMouseEvent::Button::kRight; | 2450 mouse_event.button = WebMouseEvent::Button::kRight; |
2451 mouse_event.SetPositionInWidget(1, 1); | 2451 mouse_event.SetPositionInWidget(1, 1); |
2452 mouse_event.click_count = 1; | 2452 mouse_event.click_count = 1; |
2453 web_view->HandleInputEvent(WebCoalescedInputEvent(mouse_event)); | 2453 web_view->HandleInputEvent(WebCoalescedInputEvent(mouse_event)); |
2454 RunPendingTasks(); | 2454 RunPendingTasks(); |
2455 | 2455 |
2456 WebLocalFrameBase* main_frame = web_view->MainFrameImpl(); | 2456 WebLocalFrameBase* main_frame = web_view->MainFrameImpl(); |
2457 EXPECT_TRUE(main_frame->GetFrame()->Selection().IsCaretBlinkingSuspended()); | 2457 EXPECT_TRUE(main_frame->GetFrame()->Selection().IsCaretBlinkingSuspended()); |
2458 | 2458 |
2459 // Caret blinking is still suspended after showing context menu. | 2459 // Caret blinking is still suspended after showing context menu. |
2460 web_view->ShowContextMenu(kMenuSourceMouse); | 2460 web_view->GetWidget()->ShowContextMenu(kMenuSourceMouse); |
2461 EXPECT_TRUE(main_frame->GetFrame()->Selection().IsCaretBlinkingSuspended()); | 2461 EXPECT_TRUE(main_frame->GetFrame()->Selection().IsCaretBlinkingSuspended()); |
2462 | 2462 |
2463 // Caret blinking will be resumed only after context menu is closed. | 2463 // Caret blinking will be resumed only after context menu is closed. |
2464 web_view->DidCloseContextMenu(); | 2464 web_view->DidCloseContextMenu(); |
2465 | 2465 |
2466 EXPECT_FALSE(main_frame->GetFrame()->Selection().IsCaretBlinkingSuspended()); | 2466 EXPECT_FALSE(main_frame->GetFrame()->Selection().IsCaretBlinkingSuspended()); |
2467 } | 2467 } |
2468 | 2468 |
2469 TEST_P(WebViewTest, SelectionOnReadOnlyInput) { | 2469 TEST_P(WebViewTest, SelectionOnReadOnlyInput) { |
2470 RegisterMockedHttpURLLoad("selection_readonly.html"); | 2470 RegisterMockedHttpURLLoad("selection_readonly.html"); |
(...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4340 EXPECT_FALSE(frame_view->VisualViewportSuppliesScrollbars()); | 4340 EXPECT_FALSE(frame_view->VisualViewportSuppliesScrollbars()); |
4341 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 4341 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
4342 EXPECT_NE(nullptr, | 4342 EXPECT_NE(nullptr, |
4343 frame_view->LayoutViewportScrollableArea()->VerticalScrollbar()); | 4343 frame_view->LayoutViewportScrollableArea()->VerticalScrollbar()); |
4344 } else { | 4344 } else { |
4345 EXPECT_NE(nullptr, frame_view->VerticalScrollbar()); | 4345 EXPECT_NE(nullptr, frame_view->VerticalScrollbar()); |
4346 } | 4346 } |
4347 } | 4347 } |
4348 | 4348 |
4349 } // namespace blink | 4349 } // namespace blink |
OLD | NEW |