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

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

Issue 584893004: Use the pinch viewport offset for tap disambiguation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 4113 matching lines...) Expand 10 before | Expand all | Expand 10 after
4124 4124
4125 frame = webViewHelper.webView()->mainFrame(); 4125 frame = webViewHelper.webView()->mainFrame();
4126 frame->executeCommand(WebString::fromUTF8("Unselect")); 4126 frame->executeCommand(WebString::fromUTF8("Unselect"));
4127 webViewHelper.webView()->layout(); 4127 webViewHelper.webView()->layout();
4128 ASSERT_FALSE(frame->hasSelection()); 4128 ASSERT_FALSE(frame->hasSelection());
4129 EXPECT_TRUE(fakeSelectionLayerTreeView.getAndResetSelectionCleared()); 4129 EXPECT_TRUE(fakeSelectionLayerTreeView.getAndResetSelectionCleared());
4130 } 4130 }
4131 4131
4132 class DisambiguationPopupTestWebViewClient : public FrameTestHelpers::TestWebVie wClient { 4132 class DisambiguationPopupTestWebViewClient : public FrameTestHelpers::TestWebVie wClient {
4133 public: 4133 public:
4134 virtual bool didTapMultipleTargets(const WebGestureEvent&, const WebVector<W ebRect>& targetRects) OVERRIDE 4134 virtual bool didTapMultipleTargets(const WebSize&, const WebRect&, const Web Vector<WebRect>& targetRects) OVERRIDE
4135 { 4135 {
4136 EXPECT_GE(targetRects.size(), 2u); 4136 EXPECT_GE(targetRects.size(), 2u);
4137 m_triggered = true; 4137 m_triggered = true;
4138 return true; 4138 return true;
4139 } 4139 }
4140 4140
4141 bool triggered() const { return m_triggered; } 4141 bool triggered() const { return m_triggered; }
4142 void resetTriggered() { m_triggered = false; } 4142 void resetTriggered() { m_triggered = false; }
4143 bool m_triggered; 4143 bool m_triggered;
4144 }; 4144 };
(...skipping 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after
6268 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6268 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6269 6269
6270 // Neither should a page reload. 6270 // Neither should a page reload.
6271 localFrame->reload(); 6271 localFrame->reload();
6272 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); 6272 EXPECT_EQ(4u, frameClient.provisionalLoadCount());
6273 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); 6273 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition());
6274 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6274 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6275 } 6275 }
6276 6276
6277 } // namespace 6277 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698