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

Unified Diff: chrome/renderer/autofill/page_click_tracker_browsertest.cc

Issue 1195473005: Let PageClickTracker use onMouseDown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/autofill/content/renderer/page_click_tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/autofill/page_click_tracker_browsertest.cc
diff --git a/chrome/renderer/autofill/page_click_tracker_browsertest.cc b/chrome/renderer/autofill/page_click_tracker_browsertest.cc
index d868870426144623dfbe459975321a2470d751f6..a6a5a2b4ea9aabb6eb59b27e2bfb24fc73efc715 100644
--- a/chrome/renderer/autofill/page_click_tracker_browsertest.cc
+++ b/chrome/renderer/autofill/page_click_tracker_browsertest.cc
@@ -114,6 +114,16 @@ TEST_F(PageClickTrackerTest, PageClickTrackerInputClicked) {
EXPECT_FALSE(test_listener_.form_control_element_clicked_called_);
}
+// Tests that PageClickTracker does not notify when there is right click.
+TEST_F(PageClickTrackerTest, PageClickTrackerInputRightClicked) {
+ EXPECT_NE(text_, text_.document().focusedElement());
+ // Right click the text field once.
+ EXPECT_TRUE(SimulateElementRightClick("text_1"));
+ EXPECT_FALSE(test_listener_.form_control_element_clicked_called_);
+ EXPECT_FALSE(test_listener_.was_focused_);
+ EXPECT_NE(text_, test_listener_.form_control_element_clicked_);
+}
+
TEST_F(PageClickTrackerTest, PageClickTrackerInputFocusedAndClicked) {
// Focus the text field without a click.
ExecuteJavaScript("document.getElementById('text_1').focus();");
« no previous file with comments | « no previous file | components/autofill/content/renderer/page_click_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698