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

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

Issue 2965603002: Update hover states when dragging the mouse into an element (Closed)
Patch Set: hover drag Created 3 years, 5 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
« no previous file with comments | « third_party/WebKit/Source/core/input/GestureManager.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 11025 matching lines...) Expand 10 before | Expand all | Expand 10 after
11036 11036
11037 WebMouseEvent mouse_press_event( 11037 WebMouseEvent mouse_press_event(
11038 WebInputEvent::kMouseDown, WebFloatPoint(18, a_tag->OffsetTop()), 11038 WebInputEvent::kMouseDown, WebFloatPoint(18, a_tag->OffsetTop()),
11039 WebFloatPoint(18, a_tag->OffsetTop()), 11039 WebFloatPoint(18, a_tag->OffsetTop()),
11040 WebPointerProperties::Button::kLeft, 0, 11040 WebPointerProperties::Button::kLeft, 0,
11041 WebInputEvent::Modifiers::kLeftButtonDown, TimeTicks::Now().InSeconds()); 11041 WebInputEvent::Modifiers::kLeftButtonDown, TimeTicks::Now().InSeconds());
11042 mouse_press_event.SetFrameScale(1); 11042 mouse_press_event.SetFrameScale(1);
11043 document->GetFrame()->GetEventHandler().HandleMousePressEvent( 11043 document->GetFrame()->GetEventHandler().HandleMousePressEvent(
11044 mouse_press_event); 11044 mouse_press_event);
11045 11045
11046 EXPECT_TRUE(document->ActiveHoverElement()); 11046 EXPECT_TRUE(document->GetActiveElement());
11047 EXPECT_TRUE(document->HoverElement()); 11047 EXPECT_TRUE(document->HoverElement());
11048 11048
11049 WebMouseEvent mouse_release_event( 11049 WebMouseEvent mouse_release_event(
11050 WebInputEvent::kMouseUp, WebFloatPoint(18, a_tag->OffsetTop()), 11050 WebInputEvent::kMouseUp, WebFloatPoint(18, a_tag->OffsetTop()),
11051 WebFloatPoint(18, a_tag->OffsetTop()), 11051 WebFloatPoint(18, a_tag->OffsetTop()),
11052 WebPointerProperties::Button::kLeft, 0, 11052 WebPointerProperties::Button::kLeft, 0,
11053 WebInputEvent::Modifiers::kLeftButtonDown, TimeTicks::Now().InSeconds()); 11053 WebInputEvent::Modifiers::kLeftButtonDown, TimeTicks::Now().InSeconds());
11054 mouse_release_event.SetFrameScale(1); 11054 mouse_release_event.SetFrameScale(1);
11055 document->GetFrame()->GetEventHandler().HandleMouseReleaseEvent( 11055 document->GetFrame()->GetEventHandler().HandleMouseReleaseEvent(
11056 mouse_release_event); 11056 mouse_release_event);
(...skipping 14 matching lines...) Expand all
11071 mouse_move_event, Vector<WebMouseEvent>()); 11071 mouse_move_event, Vector<WebMouseEvent>());
11072 11072
11073 EXPECT_EQ(Cursor::Type::kHand, document->GetFrame() 11073 EXPECT_EQ(Cursor::Type::kHand, document->GetFrame()
11074 ->GetChromeClient() 11074 ->GetChromeClient()
11075 .LastSetCursorForTesting() 11075 .LastSetCursorForTesting()
11076 .GetType()); 11076 .GetType());
11077 11077
11078 document->GetFrame()->GetEventHandler().HandleMousePressEvent( 11078 document->GetFrame()->GetEventHandler().HandleMousePressEvent(
11079 mouse_press_event); 11079 mouse_press_event);
11080 11080
11081 EXPECT_TRUE(document->ActiveHoverElement()); 11081 EXPECT_TRUE(document->GetActiveElement());
11082 EXPECT_TRUE(document->HoverElement()); 11082 EXPECT_TRUE(document->HoverElement());
11083 11083
11084 document->GetFrame()->GetEventHandler().HandleMouseReleaseEvent( 11084 document->GetFrame()->GetEventHandler().HandleMouseReleaseEvent(
11085 mouse_release_event); 11085 mouse_release_event);
11086 } 11086 }
11087 11087
11088 // Makes sure that mouse hover over an custom scrollbar doesn't change the 11088 // Makes sure that mouse hover over an custom scrollbar doesn't change the
11089 // activate elements. 11089 // activate elements.
11090 TEST_F(WebFrameTest, MouseOverCustomScrollbar) { 11090 TEST_F(WebFrameTest, MouseOverCustomScrollbar) {
11091 RegisterMockedHttpURLLoad("custom-scrollbar-hover.html"); 11091 RegisterMockedHttpURLLoad("custom-scrollbar-hover.html");
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after
12019 web_view_helper.LocalMainFrame()->ExecuteScriptAndReturnValue( 12019 web_view_helper.LocalMainFrame()->ExecuteScriptAndReturnValue(
12020 WebScriptSource("navigator.plugins.length")); 12020 WebScriptSource("navigator.plugins.length"));
12021 EXPECT_NE(0, result->Int32Value()); 12021 EXPECT_NE(0, result->Int32Value());
12022 web_view_helper.WebView()->GetPage()->GetSettings().SetPluginsEnabled(false); 12022 web_view_helper.WebView()->GetPage()->GetSettings().SetPluginsEnabled(false);
12023 result = web_view_helper.LocalMainFrame()->ExecuteScriptAndReturnValue( 12023 result = web_view_helper.LocalMainFrame()->ExecuteScriptAndReturnValue(
12024 WebScriptSource("navigator.plugins.length")); 12024 WebScriptSource("navigator.plugins.length"));
12025 EXPECT_EQ(0, result->Int32Value()); 12025 EXPECT_EQ(0, result->Int32Value());
12026 } 12026 }
12027 12027
12028 } // namespace blink 12028 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/GestureManager.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698