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 <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 provider_.UpdateChromePolicy(policy); | 692 provider_.UpdateChromePolicy(policy); |
693 DCHECK(base::MessageLoop::current()); | 693 DCHECK(base::MessageLoop::current()); |
694 base::RunLoop loop; | 694 base::RunLoop loop; |
695 loop.RunUntilIdle(); | 695 loop.RunUntilIdle(); |
696 } | 696 } |
697 | 697 |
698 // Sends a mouse click at the given coordinates to the current renderer. | 698 // Sends a mouse click at the given coordinates to the current renderer. |
699 void PerformClick(int x, int y) { | 699 void PerformClick(int x, int y) { |
700 content::WebContents* contents = | 700 content::WebContents* contents = |
701 browser()->tab_strip_model()->GetActiveWebContents(); | 701 browser()->tab_strip_model()->GetActiveWebContents(); |
702 WebKit::WebMouseEvent click_event; | 702 blink::WebMouseEvent click_event; |
703 click_event.type = WebKit::WebInputEvent::MouseDown; | 703 click_event.type = blink::WebInputEvent::MouseDown; |
704 click_event.button = WebKit::WebMouseEvent::ButtonLeft; | 704 click_event.button = blink::WebMouseEvent::ButtonLeft; |
705 click_event.clickCount = 1; | 705 click_event.clickCount = 1; |
706 click_event.x = x; | 706 click_event.x = x; |
707 click_event.y = y; | 707 click_event.y = y; |
708 contents->GetRenderViewHost()->ForwardMouseEvent(click_event); | 708 contents->GetRenderViewHost()->ForwardMouseEvent(click_event); |
709 click_event.type = WebKit::WebInputEvent::MouseUp; | 709 click_event.type = blink::WebInputEvent::MouseUp; |
710 contents->GetRenderViewHost()->ForwardMouseEvent(click_event); | 710 contents->GetRenderViewHost()->ForwardMouseEvent(click_event); |
711 } | 711 } |
712 | 712 |
713 MockConfigurationPolicyProvider provider_; | 713 MockConfigurationPolicyProvider provider_; |
714 }; | 714 }; |
715 | 715 |
716 #if defined(OS_WIN) | 716 #if defined(OS_WIN) |
717 // This policy only exists on Windows. | 717 // This policy only exists on Windows. |
718 | 718 |
719 // Sets the locale policy before the browser is started. | 719 // Sets the locale policy before the browser is started. |
(...skipping 2113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2833 chrome_variations::VariationsService::GetVariationsServerURL( | 2833 chrome_variations::VariationsService::GetVariationsServerURL( |
2834 g_browser_process->local_state()); | 2834 g_browser_process->local_state()); |
2835 EXPECT_TRUE(StartsWithASCII(url.spec(), default_variations_url, true)); | 2835 EXPECT_TRUE(StartsWithASCII(url.spec(), default_variations_url, true)); |
2836 std::string value; | 2836 std::string value; |
2837 EXPECT_TRUE(net::GetValueForKeyInQuery(url, "restrict", &value)); | 2837 EXPECT_TRUE(net::GetValueForKeyInQuery(url, "restrict", &value)); |
2838 EXPECT_EQ("restricted", value); | 2838 EXPECT_EQ("restricted", value); |
2839 } | 2839 } |
2840 #endif | 2840 #endif |
2841 | 2841 |
2842 } // namespace policy | 2842 } // namespace policy |
OLD | NEW |