| 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 "content/public/test/browser_test_utils.h" | 5 #include "content/public/test/browser_test_utils.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <tuple> | 8 #include <tuple> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 if (command) { | 735 if (command) { |
| 736 modifiers &= ~blink::WebInputEvent::MetaKey; | 736 modifiers &= ~blink::WebInputEvent::MetaKey; |
| 737 InjectRawKeyEvent(web_contents, blink::WebInputEvent::KeyUp, | 737 InjectRawKeyEvent(web_contents, blink::WebInputEvent::KeyUp, |
| 738 ui::DomKey::META, ui::DomCode::META_LEFT, | 738 ui::DomKey::META, ui::DomCode::META_LEFT, |
| 739 ui::VKEY_COMMAND, modifiers); | 739 ui::VKEY_COMMAND, modifiers); |
| 740 } | 740 } |
| 741 | 741 |
| 742 ASSERT_EQ(modifiers, 0); | 742 ASSERT_EQ(modifiers, 0); |
| 743 } | 743 } |
| 744 | 744 |
| 745 bool HasWebcamAvailableOnSystem(WebContents* tab_contents) { |
| 746 std::string result; |
| 747 EXPECT_TRUE(content::ExecuteScriptAndExtractString( |
| 748 tab_contents, hasVideoInputDeviceOnSystem, &result)); |
| 749 return result == "has-video-input-device"; |
| 750 } |
| 751 |
| 745 RenderFrameHost* ConvertToRenderFrameHost(WebContents* web_contents) { | 752 RenderFrameHost* ConvertToRenderFrameHost(WebContents* web_contents) { |
| 746 return web_contents->GetMainFrame(); | 753 return web_contents->GetMainFrame(); |
| 747 } | 754 } |
| 748 | 755 |
| 749 RenderFrameHost* ConvertToRenderFrameHost(RenderViewHost* render_view_host) { | 756 RenderFrameHost* ConvertToRenderFrameHost(RenderViewHost* render_view_host) { |
| 750 return render_view_host->GetMainFrame(); | 757 return render_view_host->GetMainFrame(); |
| 751 } | 758 } |
| 752 | 759 |
| 753 RenderFrameHost* ConvertToRenderFrameHost(RenderFrameHost* render_frame_host) { | 760 RenderFrameHost* ConvertToRenderFrameHost(RenderFrameHost* render_frame_host) { |
| 754 return render_frame_host; | 761 return render_frame_host; |
| (...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1689 | 1696 |
| 1690 bool TestNavigationManager::ShouldMonitorNavigation(NavigationHandle* handle) { | 1697 bool TestNavigationManager::ShouldMonitorNavigation(NavigationHandle* handle) { |
| 1691 if (handle_ || handle->GetURL() != url_) | 1698 if (handle_ || handle->GetURL() != url_) |
| 1692 return false; | 1699 return false; |
| 1693 if (handled_navigation_) | 1700 if (handled_navigation_) |
| 1694 return false; | 1701 return false; |
| 1695 return true; | 1702 return true; |
| 1696 } | 1703 } |
| 1697 | 1704 |
| 1698 } // namespace content | 1705 } // namespace content |
| OLD | NEW |