OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/test/remoting/remote_desktop_browsertest.h" | 5 #include "chrome/test/remoting/remote_desktop_browsertest.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
9 #include "chrome/browser/extensions/unpacked_installer.h" | 9 #include "chrome/browser/extensions/unpacked_installer.h" |
10 #include "chrome/browser/ui/extensions/application_launch.h" | 10 #include "chrome/browser/ui/extensions/application_launch.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 observer.Wait(); | 110 observer.Wait(); |
111 } | 111 } |
112 | 112 |
113 void RemoteDesktopBrowserTest::UninstallChromotingApp() { | 113 void RemoteDesktopBrowserTest::UninstallChromotingApp() { |
114 UninstallExtension(ChromotingID()); | 114 UninstallExtension(ChromotingID()); |
115 extension_ = NULL; | 115 extension_ = NULL; |
116 } | 116 } |
117 | 117 |
118 void RemoteDesktopBrowserTest::VerifyChromotingLoaded(bool expected) { | 118 void RemoteDesktopBrowserTest::VerifyChromotingLoaded(bool expected) { |
119 const ExtensionSet* extensions = extension_service()->extensions(); | 119 const extensions::ExtensionSet* extensions = |
| 120 extension_service()->extensions(); |
120 scoped_refptr<const extensions::Extension> extension; | 121 scoped_refptr<const extensions::Extension> extension; |
121 ExtensionSet::const_iterator iter; | |
122 bool installed = false; | 122 bool installed = false; |
123 | 123 |
124 for (iter = extensions->begin(); iter != extensions->end(); ++iter) { | 124 for (extensions::ExtensionSet::const_iterator iter = extensions->begin(); |
| 125 iter != extensions->end(); ++iter) { |
125 extension = *iter; | 126 extension = *iter; |
126 // Is there a better way to recognize the chromoting extension | 127 // Is there a better way to recognize the chromoting extension |
127 // than name comparison? | 128 // than name comparison? |
128 if (extension->name() == "Chromoting" || | 129 if (extension->name() == "Chromoting" || |
129 extension->name() == "Chrome Remote Desktop") { | 130 extension->name() == "Chrome Remote Desktop") { |
130 installed = true; | 131 installed = true; |
131 break; | 132 break; |
132 } | 133 } |
133 } | 134 } |
134 | 135 |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 } | 689 } |
689 | 690 |
690 // static | 691 // static |
691 bool RemoteDesktopBrowserTest::IsAuthenticatedInWindow( | 692 bool RemoteDesktopBrowserTest::IsAuthenticatedInWindow( |
692 content::WebContents* web_contents) { | 693 content::WebContents* web_contents) { |
693 return ExecuteScriptAndExtractBool( | 694 return ExecuteScriptAndExtractBool( |
694 web_contents, "remoting.identity.isAuthenticated()"); | 695 web_contents, "remoting.identity.isAuthenticated()"); |
695 } | 696 } |
696 | 697 |
697 } // namespace remoting | 698 } // namespace remoting |
OLD | NEW |