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

Side by Side Diff: chrome/test/remoting/remote_desktop_browsertest.cc

Issue 102103005: Move c/c/e/extension_set to top-level extensions/ (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed unused includes, added includes where missing Created 7 years 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
OLDNEW
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"
11 #include "chrome/common/chrome_switches.h" 11 #include "chrome/common/chrome_switches.h"
12 #include "chrome/common/extensions/extension_file_util.h" 12 #include "chrome/common/extensions/extension_file_util.h"
13 #include "chrome/test/remoting/key_code_conv.h" 13 #include "chrome/test/remoting/key_code_conv.h"
14 #include "chrome/test/remoting/page_load_notification_observer.h" 14 #include "chrome/test/remoting/page_load_notification_observer.h"
15 #include "chrome/test/remoting/waiter.h" 15 #include "chrome/test/remoting/waiter.h"
16 #include "content/public/browser/native_web_keyboard_event.h" 16 #include "content/public/browser/native_web_keyboard_event.h"
17 #include "content/public/browser/render_view_host.h" 17 #include "content/public/browser/render_view_host.h"
18 #include "content/public/test/test_utils.h" 18 #include "content/public/test/test_utils.h"
19 #include "extensions/common/constants.h" 19 #include "extensions/common/constants.h"
20 #include "extensions/common/extension.h" 20 #include "extensions/common/extension.h"
21 #include "extensions/common/extension_set.h"
21 #include "ui/base/window_open_disposition.h" 22 #include "ui/base/window_open_disposition.h"
22 23
23 namespace remoting { 24 namespace remoting {
24 25
25 RemoteDesktopBrowserTest::RemoteDesktopBrowserTest() 26 RemoteDesktopBrowserTest::RemoteDesktopBrowserTest()
26 : extension_(NULL) { 27 : extension_(NULL) {
27 } 28 }
28 29
29 RemoteDesktopBrowserTest::~RemoteDesktopBrowserTest() {} 30 RemoteDesktopBrowserTest::~RemoteDesktopBrowserTest() {}
30 31
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 110
110 observer.Wait(); 111 observer.Wait();
111 } 112 }
112 113
113 void RemoteDesktopBrowserTest::UninstallChromotingApp() { 114 void RemoteDesktopBrowserTest::UninstallChromotingApp() {
114 UninstallExtension(ChromotingID()); 115 UninstallExtension(ChromotingID());
115 extension_ = NULL; 116 extension_ = NULL;
116 } 117 }
117 118
118 void RemoteDesktopBrowserTest::VerifyChromotingLoaded(bool expected) { 119 void RemoteDesktopBrowserTest::VerifyChromotingLoaded(bool expected) {
119 const ExtensionSet* extensions = extension_service()->extensions(); 120 const extensions::ExtensionSet* extensions =
121 extension_service()->extensions();
120 scoped_refptr<const extensions::Extension> extension; 122 scoped_refptr<const extensions::Extension> extension;
121 ExtensionSet::const_iterator iter;
122 bool installed = false; 123 bool installed = false;
123 124
124 for (iter = extensions->begin(); iter != extensions->end(); ++iter) { 125 for (extensions::ExtensionSet::const_iterator iter = extensions->begin();
126 iter != extensions->end(); ++iter) {
125 extension = *iter; 127 extension = *iter;
126 // Is there a better way to recognize the chromoting extension 128 // Is there a better way to recognize the chromoting extension
127 // than name comparison? 129 // than name comparison?
128 if (extension->name() == "Chromoting" || 130 if (extension->name() == "Chromoting" ||
129 extension->name() == "Chrome Remote Desktop") { 131 extension->name() == "Chrome Remote Desktop") {
130 installed = true; 132 installed = true;
131 break; 133 break;
132 } 134 }
133 } 135 }
134 136
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 } 690 }
689 691
690 // static 692 // static
691 bool RemoteDesktopBrowserTest::IsAuthenticatedInWindow( 693 bool RemoteDesktopBrowserTest::IsAuthenticatedInWindow(
692 content::WebContents* web_contents) { 694 content::WebContents* web_contents) {
693 return ExecuteScriptAndExtractBool( 695 return ExecuteScriptAndExtractBool(
694 web_contents, "remoting.identity.isAuthenticated()"); 696 web_contents, "remoting.identity.isAuthenticated()");
695 } 697 }
696 698
697 } // namespace remoting 699 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698