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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 2664253002: Revert "Blink handle selection handle visibility" (Closed)
Patch Set: Created 3 years, 10 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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 5594 matching lines...) Expand 10 before | Expand all | Expand 10 after
5605 RuntimeEnabledFeatures::setCompositedSelectionUpdateEnabled(true); 5605 RuntimeEnabledFeatures::setCompositedSelectionUpdateEnabled(true);
5606 registerMockedHttpURLLoad("Ahem.ttf"); 5606 registerMockedHttpURLLoad("Ahem.ttf");
5607 5607
5608 m_webViewHelper.initialize(true, nullptr, &m_fakeSelectionWebViewClient, 5608 m_webViewHelper.initialize(true, nullptr, &m_fakeSelectionWebViewClient,
5609 nullptr); 5609 nullptr);
5610 m_webViewHelper.webView()->settings()->setDefaultFontSize(12); 5610 m_webViewHelper.webView()->settings()->setDefaultFontSize(12);
5611 m_webViewHelper.webView()->setDefaultPageScaleLimits(1, 1); 5611 m_webViewHelper.webView()->setDefaultPageScaleLimits(1, 1);
5612 m_webViewHelper.resize(WebSize(640, 480)); 5612 m_webViewHelper.resize(WebSize(640, 480));
5613 } 5613 }
5614 5614
5615 void runTestWithNoSelection(const char* testFile) { 5615 void runTest(const char* testFile) {
5616 registerMockedHttpURLLoad(testFile); 5616 registerMockedHttpURLLoad(testFile);
5617 m_webViewHelper.webView()->setFocus(true); 5617 m_webViewHelper.webView()->setFocus(true);
5618 FrameTestHelpers::loadFrame(m_webViewHelper.webView()->mainFrame(), 5618 FrameTestHelpers::loadFrame(m_webViewHelper.webView()->mainFrame(),
5619 m_baseURL + testFile); 5619 m_baseURL + testFile);
5620 m_webViewHelper.webView()->updateAllLifecyclePhases(); 5620 m_webViewHelper.webView()->updateAllLifecyclePhases();
5621 5621
5622 const WebSelection* selection = m_fakeSelectionLayerTreeView.selection(); 5622 const WebSelection* selection = m_fakeSelectionLayerTreeView.selection();
5623 const WebSelectionBound* selectStart = m_fakeSelectionLayerTreeView.start(); 5623 const WebSelectionBound* selectStart = m_fakeSelectionLayerTreeView.start();
5624 const WebSelectionBound* selectEnd = m_fakeSelectionLayerTreeView.end(); 5624 const WebSelectionBound* selectEnd = m_fakeSelectionLayerTreeView.end();
5625 5625
5626 EXPECT_FALSE(selection);
5627 EXPECT_FALSE(selectStart);
5628 EXPECT_FALSE(selectEnd);
5629 }
5630
5631 void runTest(const char* testFile) {
5632 registerMockedHttpURLLoad(testFile);
5633 m_webViewHelper.webView()->setFocus(true);
5634 FrameTestHelpers::loadFrame(m_webViewHelper.webView()->mainFrame(),
5635 m_baseURL + testFile);
5636 m_webViewHelper.webView()->updateAllLifecyclePhases();
5637
5638 v8::HandleScope handleScope(v8::Isolate::GetCurrent()); 5626 v8::HandleScope handleScope(v8::Isolate::GetCurrent());
5639 v8::Local<v8::Value> result = 5627 v8::Local<v8::Value> result =
5640 m_webViewHelper.webView()->mainFrameImpl()->executeScriptAndReturnValue( 5628 m_webViewHelper.webView()->mainFrameImpl()->executeScriptAndReturnValue(
5641 WebScriptSource("expectedResult")); 5629 WebScriptSource("expectedResult"));
5642 ASSERT_FALSE(result.IsEmpty() || (*result)->IsUndefined()); 5630 if (result.IsEmpty() || (*result)->IsUndefined()) {
5643 5631 EXPECT_FALSE(selection);
5644 ASSERT_TRUE((*result)->IsArray()); 5632 EXPECT_FALSE(selectStart);
5645 v8::Array& expectedResult = *v8::Array::Cast(*result); 5633 EXPECT_FALSE(selectEnd);
5646 ASSERT_GE(expectedResult.Length(), 10u); 5634 return;
5647 5635 }
5648 v8::Local<v8::Context> context =
5649 v8::Isolate::GetCurrent()->GetCurrentContext();
5650
5651 const int startEdgeTopInLayerX = expectedResult.Get(context, 1)
5652 .ToLocalChecked()
5653 .As<v8::Int32>()
5654 ->Value();
5655 const int startEdgeTopInLayerY = expectedResult.Get(context, 2)
5656 .ToLocalChecked()
5657 .As<v8::Int32>()
5658 ->Value();
5659 const int startEdgeBottomInLayerX = expectedResult.Get(context, 3)
5660 .ToLocalChecked()
5661 .As<v8::Int32>()
5662 ->Value();
5663 const int startEdgeBottomInLayerY = expectedResult.Get(context, 4)
5664 .ToLocalChecked()
5665 .As<v8::Int32>()
5666 ->Value();
5667
5668 const int endEdgeTopInLayerX = expectedResult.Get(context, 6)
5669 .ToLocalChecked()
5670 .As<v8::Int32>()
5671 ->Value();
5672 const int endEdgeTopInLayerY = expectedResult.Get(context, 7)
5673 .ToLocalChecked()
5674 .As<v8::Int32>()
5675 ->Value();
5676 const int endEdgeBottomInLayerX = expectedResult.Get(context, 8)
5677 .ToLocalChecked()
5678 .As<v8::Int32>()
5679 ->Value();
5680 const int endEdgeBottomInLayerY = expectedResult.Get(context, 9)
5681 .ToLocalChecked()
5682 .As<v8::Int32>()
5683 ->Value();
5684
5685 const IntPoint hitPoint =
5686 IntPoint((startEdgeTopInLayerX + startEdgeBottomInLayerX +
5687 endEdgeTopInLayerX + endEdgeBottomInLayerX) /
5688 4,
5689 (startEdgeTopInLayerY + startEdgeBottomInLayerY +
5690 endEdgeTopInLayerY + endEdgeBottomInLayerY) /
5691 4 +
5692 3);
5693
5694 WebGestureEvent gestureEvent(WebInputEvent::GestureTap,
5695 WebInputEvent::NoModifiers,
5696 WebInputEvent::TimeStampForTesting);
5697 gestureEvent.setFrameScale(1);
5698 gestureEvent.x = gestureEvent.globalX = hitPoint.x();
5699 gestureEvent.y = gestureEvent.globalY = hitPoint.y();
5700 gestureEvent.sourceDevice = WebGestureDeviceTouchscreen;
5701
5702 m_webViewHelper.webView()
5703 ->mainFrameImpl()
5704 ->frame()
5705 ->eventHandler()
5706 .handleGestureEvent(gestureEvent);
5707
5708 const WebSelection* selection = m_fakeSelectionLayerTreeView.selection();
5709 const WebSelectionBound* selectStart = m_fakeSelectionLayerTreeView.start();
5710 const WebSelectionBound* selectEnd = m_fakeSelectionLayerTreeView.end();
5711 5636
5712 ASSERT_TRUE(selection); 5637 ASSERT_TRUE(selection);
5713 ASSERT_TRUE(selectStart); 5638 ASSERT_TRUE(selectStart);
5714 ASSERT_TRUE(selectEnd); 5639 ASSERT_TRUE(selectEnd);
5715 5640
5716 EXPECT_FALSE(selection->isNone()); 5641 EXPECT_FALSE(selection->isNone());
5717 5642
5643 ASSERT_TRUE((*result)->IsArray());
5644 v8::Array& expectedResult = *v8::Array::Cast(*result);
5645 ASSERT_GE(expectedResult.Length(), 10u);
5646
5718 blink::Node* layerOwnerNodeForStart = V8Node::toImplWithTypeCheck( 5647 blink::Node* layerOwnerNodeForStart = V8Node::toImplWithTypeCheck(
5719 v8::Isolate::GetCurrent(), expectedResult.Get(0)); 5648 v8::Isolate::GetCurrent(), expectedResult.Get(0));
5720 ASSERT_TRUE(layerOwnerNodeForStart); 5649 ASSERT_TRUE(layerOwnerNodeForStart);
5721 EXPECT_EQ(layerOwnerNodeForStart->layoutObject() 5650 EXPECT_EQ(layerOwnerNodeForStart->layoutObject()
5722 ->enclosingLayer() 5651 ->enclosingLayer()
5723 ->enclosingLayerForPaintInvalidation() 5652 ->enclosingLayerForPaintInvalidation()
5724 ->graphicsLayerBacking() 5653 ->graphicsLayerBacking()
5725 ->platformLayer() 5654 ->platformLayer()
5726 ->id(), 5655 ->id(),
5727 selectStart->layerId); 5656 selectStart->layerId);
5728 5657 v8::Local<v8::Context> context =
5729 EXPECT_EQ(startEdgeTopInLayerX, selectStart->edgeTopInLayer.x); 5658 v8::Isolate::GetCurrent()->GetCurrentContext();
5730 EXPECT_EQ(startEdgeTopInLayerY, selectStart->edgeTopInLayer.y); 5659 EXPECT_EQ(expectedResult.Get(context, 1)
5731 EXPECT_EQ(startEdgeBottomInLayerX, selectStart->edgeBottomInLayer.x); 5660 .ToLocalChecked()
5661 .As<v8::Int32>()
5662 ->Value(),
5663 selectStart->edgeTopInLayer.x);
5664 EXPECT_EQ(expectedResult.Get(context, 2)
5665 .ToLocalChecked()
5666 .As<v8::Int32>()
5667 ->Value(),
5668 selectStart->edgeTopInLayer.y);
5669 EXPECT_EQ(expectedResult.Get(context, 3)
5670 .ToLocalChecked()
5671 .As<v8::Int32>()
5672 ->Value(),
5673 selectStart->edgeBottomInLayer.x);
5732 5674
5733 blink::Node* layerOwnerNodeForEnd = V8Node::toImplWithTypeCheck( 5675 blink::Node* layerOwnerNodeForEnd = V8Node::toImplWithTypeCheck(
5734 v8::Isolate::GetCurrent(), 5676 v8::Isolate::GetCurrent(),
5735 expectedResult.Get(context, 5).ToLocalChecked()); 5677 expectedResult.Get(context, 5).ToLocalChecked());
5736 5678
5737 ASSERT_TRUE(layerOwnerNodeForEnd); 5679 ASSERT_TRUE(layerOwnerNodeForEnd);
5738 EXPECT_EQ(layerOwnerNodeForEnd->layoutObject() 5680 EXPECT_EQ(layerOwnerNodeForEnd->layoutObject()
5739 ->enclosingLayer() 5681 ->enclosingLayer()
5740 ->enclosingLayerForPaintInvalidation() 5682 ->enclosingLayerForPaintInvalidation()
5741 ->graphicsLayerBacking() 5683 ->graphicsLayerBacking()
5742 ->platformLayer() 5684 ->platformLayer()
5743 ->id(), 5685 ->id(),
5744 selectEnd->layerId); 5686 selectEnd->layerId);
5745 5687 EXPECT_EQ(expectedResult.Get(context, 6)
5746 EXPECT_EQ(endEdgeTopInLayerX, selectEnd->edgeTopInLayer.x); 5688 .ToLocalChecked()
5747 EXPECT_EQ(endEdgeTopInLayerY, selectEnd->edgeTopInLayer.y); 5689 .As<v8::Int32>()
5748 EXPECT_EQ(endEdgeBottomInLayerX, selectEnd->edgeBottomInLayer.x); 5690 ->Value(),
5691 selectEnd->edgeTopInLayer.x);
5692 EXPECT_EQ(expectedResult.Get(context, 7)
5693 .ToLocalChecked()
5694 .As<v8::Int32>()
5695 ->Value(),
5696 selectEnd->edgeTopInLayer.y);
5697 EXPECT_EQ(expectedResult.Get(context, 8)
5698 .ToLocalChecked()
5699 .As<v8::Int32>()
5700 ->Value(),
5701 selectEnd->edgeBottomInLayer.x);
5749 5702
5750 // Platform differences can introduce small stylistic deviations in 5703 // Platform differences can introduce small stylistic deviations in
5751 // y-axis positioning, the details of which aren't relevant to 5704 // y-axis positioning, the details of which aren't relevant to
5752 // selection behavior. However, such deviations from the expected value 5705 // selection behavior. However, such deviations from the expected value
5753 // should be consistent for the corresponding y coordinates. 5706 // should be consistent for the corresponding y coordinates.
5754 int yBottomEpsilon = 0; 5707 int yBottomEpsilon = 0;
5755 if (expectedResult.Length() == 13) 5708 if (expectedResult.Length() == 13)
5756 yBottomEpsilon = expectedResult.Get(context, 12) 5709 yBottomEpsilon = expectedResult.Get(context, 12)
5757 .ToLocalChecked() 5710 .ToLocalChecked()
5758 .As<v8::Int32>() 5711 .As<v8::Int32>()
5759 ->Value(); 5712 ->Value();
5760 int yBottomDeviation = 5713 int yBottomDeviation = expectedResult.Get(context, 4)
5761 startEdgeBottomInLayerY - selectStart->edgeBottomInLayer.y; 5714 .ToLocalChecked()
5715 .As<v8::Int32>()
5716 ->Value() -
5717 selectStart->edgeBottomInLayer.y;
5762 EXPECT_GE(yBottomEpsilon, std::abs(yBottomDeviation)); 5718 EXPECT_GE(yBottomEpsilon, std::abs(yBottomDeviation));
5763 EXPECT_EQ(yBottomDeviation, 5719 EXPECT_EQ(yBottomDeviation, expectedResult.Get(context, 9)
5764 endEdgeBottomInLayerY - selectEnd->edgeBottomInLayer.y); 5720 .ToLocalChecked()
5721 .As<v8::Int32>()
5722 ->Value() -
5723 selectEnd->edgeBottomInLayer.y);
5765 5724
5766 if (expectedResult.Length() >= 12) { 5725 if (expectedResult.Length() >= 12) {
5767 EXPECT_EQ(expectedResult.Get(context, 10) 5726 EXPECT_EQ(expectedResult.Get(context, 10)
5768 .ToLocalChecked() 5727 .ToLocalChecked()
5769 .As<v8::Boolean>() 5728 .As<v8::Boolean>()
5770 ->Value(), 5729 ->Value(),
5771 m_fakeSelectionLayerTreeView.selection()->isEditable()); 5730 m_fakeSelectionLayerTreeView.selection()->isEditable());
5772 EXPECT_EQ( 5731 EXPECT_EQ(
5773 expectedResult.Get(context, 11) 5732 expectedResult.Get(context, 11)
5774 .ToLocalChecked() 5733 .ToLocalChecked()
(...skipping 12 matching lines...) Expand all
5787 5746
5788 runTest(testFile); 5747 runTest(testFile);
5789 } 5748 }
5790 5749
5791 CompositedSelectionBoundsTestWebViewClient m_fakeSelectionWebViewClient; 5750 CompositedSelectionBoundsTestWebViewClient m_fakeSelectionWebViewClient;
5792 CompositedSelectionBoundsTestLayerTreeView& m_fakeSelectionLayerTreeView; 5751 CompositedSelectionBoundsTestLayerTreeView& m_fakeSelectionLayerTreeView;
5793 FrameTestHelpers::WebViewHelper m_webViewHelper; 5752 FrameTestHelpers::WebViewHelper m_webViewHelper;
5794 }; 5753 };
5795 5754
5796 TEST_F(CompositedSelectionBoundsTest, None) { 5755 TEST_F(CompositedSelectionBoundsTest, None) {
5797 runTestWithNoSelection("composited_selection_bounds_none.html"); 5756 runTest("composited_selection_bounds_none.html");
5798 } 5757 }
5799 TEST_F(CompositedSelectionBoundsTest, NoneReadonlyCaret) { 5758 TEST_F(CompositedSelectionBoundsTest, NoneReadonlyCaret) {
5800 runTestWithNoSelection( 5759 runTest("composited_selection_bounds_none_readonly_caret.html");
5801 "composited_selection_bounds_none_readonly_caret.html");
5802 } 5760 }
5803 TEST_F(CompositedSelectionBoundsTest, DetachedFrame) {
5804 runTestWithNoSelection("composited_selection_bounds_detached_frame.html");
5805 }
5806
5807 TEST_F(CompositedSelectionBoundsTest, Basic) { 5761 TEST_F(CompositedSelectionBoundsTest, Basic) {
5808 runTest("composited_selection_bounds_basic.html"); 5762 runTest("composited_selection_bounds_basic.html");
5809 } 5763 }
5810 TEST_F(CompositedSelectionBoundsTest, Transformed) { 5764 TEST_F(CompositedSelectionBoundsTest, Transformed) {
5811 runTest("composited_selection_bounds_transformed.html"); 5765 runTest("composited_selection_bounds_transformed.html");
5812 } 5766 }
5813 TEST_F(CompositedSelectionBoundsTest, VerticalRightToLeft) { 5767 TEST_F(CompositedSelectionBoundsTest, VerticalRightToLeft) {
5814 runTest("composited_selection_bounds_vertical_rl.html"); 5768 runTest("composited_selection_bounds_vertical_rl.html");
5815 } 5769 }
5816 TEST_F(CompositedSelectionBoundsTest, VerticalLeftToRight) { 5770 TEST_F(CompositedSelectionBoundsTest, VerticalLeftToRight) {
5817 runTest("composited_selection_bounds_vertical_lr.html"); 5771 runTest("composited_selection_bounds_vertical_lr.html");
5818 } 5772 }
5819 TEST_F(CompositedSelectionBoundsTest, SplitLayer) { 5773 TEST_F(CompositedSelectionBoundsTest, SplitLayer) {
5820 runTest("composited_selection_bounds_split_layer.html"); 5774 runTest("composited_selection_bounds_split_layer.html");
5821 } 5775 }
5776 TEST_F(CompositedSelectionBoundsTest, EmptyLayer) {
5777 runTest("composited_selection_bounds_empty_layer.html");
5778 }
5822 TEST_F(CompositedSelectionBoundsTest, Iframe) { 5779 TEST_F(CompositedSelectionBoundsTest, Iframe) {
5823 runTestWithMultipleFiles("composited_selection_bounds_iframe.html", 5780 runTestWithMultipleFiles("composited_selection_bounds_iframe.html",
5824 "composited_selection_bounds_basic.html", nullptr); 5781 "composited_selection_bounds_basic.html", nullptr);
5825 } 5782 }
5783 TEST_F(CompositedSelectionBoundsTest, DetachedFrame) {
5784 runTest("composited_selection_bounds_detached_frame.html");
5785 }
5826 TEST_F(CompositedSelectionBoundsTest, Editable) { 5786 TEST_F(CompositedSelectionBoundsTest, Editable) {
5827 runTest("composited_selection_bounds_editable.html"); 5787 runTest("composited_selection_bounds_editable.html");
5828 } 5788 }
5829 TEST_F(CompositedSelectionBoundsTest, EditableDiv) { 5789 TEST_F(CompositedSelectionBoundsTest, EditableDiv) {
5830 runTest("composited_selection_bounds_editable_div.html"); 5790 runTest("composited_selection_bounds_editable_div.html");
5831 } 5791 }
5792 TEST_F(CompositedSelectionBoundsTest, EmptyEditableInput) {
5793 runTest("composited_selection_bounds_empty_editable_input.html");
5794 }
5795 TEST_F(CompositedSelectionBoundsTest, EmptyEditableArea) {
5796 runTest("composited_selection_bounds_empty_editable_area.html");
5797 }
5798
5799 // Fails on Mac ASan 64 bot. https://crbug.com/588769.
5800 #if OS(MACOSX) && defined(ADDRESS_SANITIZER)
5801 TEST_P(ParameterizedWebFrameTest, DISABLED_CompositedSelectionBoundsCleared)
5802 #else
5803 TEST_P(ParameterizedWebFrameTest, CompositedSelectionBoundsCleared)
5804 #endif
5805 {
5806 RuntimeEnabledFeatures::setCompositedSelectionUpdateEnabled(true);
5807
5808 registerMockedHttpURLLoad("select_range_basic.html");
5809 registerMockedHttpURLLoad("select_range_scroll.html");
5810
5811 int viewWidth = 500;
5812 int viewHeight = 500;
5813
5814 CompositedSelectionBoundsTestWebViewClient fakeSelectionWebViewClient;
5815 CompositedSelectionBoundsTestLayerTreeView& fakeSelectionLayerTreeView =
5816 fakeSelectionWebViewClient.selectionLayerTreeView();
5817
5818 FrameTestHelpers::WebViewHelper webViewHelper;
5819 webViewHelper.initialize(true, nullptr, &fakeSelectionWebViewClient, nullptr);
5820 webViewHelper.webView()->settings()->setDefaultFontSize(12);
5821 webViewHelper.webView()->setDefaultPageScaleLimits(1, 1);
5822 webViewHelper.resize(WebSize(viewWidth, viewHeight));
5823 webViewHelper.webView()->setFocus(true);
5824 FrameTestHelpers::loadFrame(webViewHelper.webView()->mainFrame(),
5825 m_baseURL + "select_range_basic.html");
5826
5827 // The frame starts with no selection.
5828 WebLocalFrame* frame = webViewHelper.webView()->mainFrameImpl();
5829 ASSERT_TRUE(frame->hasSelection());
5830 EXPECT_TRUE(fakeSelectionLayerTreeView.getAndResetSelectionCleared());
5831
5832 // The selection cleared notification should be triggered upon layout.
5833 frame->executeCommand(WebString::fromUTF8("Unselect"));
5834 ASSERT_FALSE(frame->hasSelection());
5835 EXPECT_FALSE(fakeSelectionLayerTreeView.getAndResetSelectionCleared());
5836 webViewHelper.webView()->updateAllLifecyclePhases();
5837 EXPECT_TRUE(fakeSelectionLayerTreeView.getAndResetSelectionCleared());
5838
5839 frame->executeCommand(WebString::fromUTF8("SelectAll"));
5840 webViewHelper.webView()->updateAllLifecyclePhases();
5841 ASSERT_TRUE(frame->hasSelection());
5842 EXPECT_FALSE(fakeSelectionLayerTreeView.getAndResetSelectionCleared());
5843
5844 FrameTestHelpers::loadFrame(webViewHelper.webView()->mainFrame(),
5845 m_baseURL + "select_range_scroll.html");
5846 ASSERT_TRUE(frame->hasSelection());
5847 EXPECT_FALSE(fakeSelectionLayerTreeView.getAndResetSelectionCleared());
5848
5849 // Transitions between non-empty selections should not trigger a clearing.
5850 WebRect startWebRect;
5851 WebRect endWebRect;
5852 webViewHelper.webView()->selectionBounds(startWebRect, endWebRect);
5853 WebPoint movedEnd(bottomRightMinusOne(endWebRect));
5854 endWebRect.x -= 20;
5855 frame->selectRange(topLeft(startWebRect), movedEnd);
5856 webViewHelper.webView()->updateAllLifecyclePhases();
5857 ASSERT_TRUE(frame->hasSelection());
5858 EXPECT_FALSE(fakeSelectionLayerTreeView.getAndResetSelectionCleared());
5859
5860 frame = webViewHelper.webView()->mainFrameImpl();
5861 frame->executeCommand(WebString::fromUTF8("Unselect"));
5862 webViewHelper.webView()->updateAllLifecyclePhases();
5863 ASSERT_FALSE(frame->hasSelection());
5864 EXPECT_TRUE(fakeSelectionLayerTreeView.getAndResetSelectionCleared());
5865 }
5832 5866
5833 class DisambiguationPopupTestWebViewClient 5867 class DisambiguationPopupTestWebViewClient
5834 : public FrameTestHelpers::TestWebViewClient { 5868 : public FrameTestHelpers::TestWebViewClient {
5835 public: 5869 public:
5836 bool didTapMultipleTargets(const WebSize&, 5870 bool didTapMultipleTargets(const WebSize&,
5837 const WebRect&, 5871 const WebRect&,
5838 const WebVector<WebRect>& targetRects) override { 5872 const WebVector<WebRect>& targetRects) override {
5839 EXPECT_GE(targetRects.size(), 2u); 5873 EXPECT_GE(targetRects.size(), 2u);
5840 m_triggered = true; 5874 m_triggered = true;
5841 return true; 5875 return true;
(...skipping 5389 matching lines...) Expand 10 before | Expand all | Expand 10 after
11231 11265
11232 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); 11266 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached());
11233 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); 11267 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading());
11234 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); 11268 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad());
11235 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); 11269 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents());
11236 11270
11237 webViewHelper.reset(); 11271 webViewHelper.reset();
11238 } 11272 }
11239 11273
11240 } // namespace blink 11274 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698