OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 base::RunLoop loop; | 851 base::RunLoop loop; |
852 loop.RunUntilIdle(); | 852 loop.RunUntilIdle(); |
853 } | 853 } |
854 | 854 |
855 // Sends a mouse click at the given coordinates to the current renderer. | 855 // Sends a mouse click at the given coordinates to the current renderer. |
856 void PerformClick(int x, int y) { | 856 void PerformClick(int x, int y) { |
857 content::WebContents* contents = | 857 content::WebContents* contents = |
858 browser()->tab_strip_model()->GetActiveWebContents(); | 858 browser()->tab_strip_model()->GetActiveWebContents(); |
859 blink::WebMouseEvent click_event; | 859 blink::WebMouseEvent click_event; |
860 click_event.type = blink::WebInputEvent::MouseDown; | 860 click_event.type = blink::WebInputEvent::MouseDown; |
861 click_event.button = blink::WebMouseEvent::ButtonLeft; | 861 click_event.button = blink::WebMouseEvent::Button::Left; |
862 click_event.clickCount = 1; | 862 click_event.clickCount = 1; |
863 click_event.x = x; | 863 click_event.x = x; |
864 click_event.y = y; | 864 click_event.y = y; |
865 contents->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(click_event); | 865 contents->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(click_event); |
866 click_event.type = blink::WebInputEvent::MouseUp; | 866 click_event.type = blink::WebInputEvent::MouseUp; |
867 contents->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(click_event); | 867 contents->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(click_event); |
868 } | 868 } |
869 | 869 |
870 void SetPolicy(PolicyMap* policies, | 870 void SetPolicy(PolicyMap* policies, |
871 const char* key, | 871 const char* key, |
(...skipping 3203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4075 | 4075 |
4076 SetEmptyPolicy(); | 4076 SetEmptyPolicy(); |
4077 // Policy not set. | 4077 // Policy not set. |
4078 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); | 4078 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); |
4079 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); | 4079 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); |
4080 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); | 4080 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); |
4081 } | 4081 } |
4082 #endif // defined(OS_CHROMEOS) | 4082 #endif // defined(OS_CHROMEOS) |
4083 | 4083 |
4084 } // namespace policy | 4084 } // namespace policy |
OLD | NEW |