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

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

Issue 617103008: Update chromoting browser-tests to obtain user-name and password from a specified file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Windows-specific compile error. Created 6 years, 2 months 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
« no previous file with comments | « no previous file | chrome/test/remoting/remote_desktop_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ 5 #ifndef CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_
6 #define CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ 6 #define CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_
7 7
8 #include "base/debug/stack_trace.h" 8 #include "base/debug/stack_trace.h"
9 #include "chrome/browser/apps/app_browsertest_util.h" 9 #include "chrome/browser/apps/app_browsertest_util.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
11 #include "chrome/browser/ui/tabs/tab_strip_model.h" 11 #include "chrome/browser/ui/tabs/tab_strip_model.h"
12 #include "chrome/test/base/ui_test_utils.h" 12 #include "chrome/test/base/ui_test_utils.h"
13 #include "content/public/browser/notification_service.h" 13 #include "content/public/browser/notification_service.h"
14 #include "content/public/test/browser_test_utils.h" 14 #include "content/public/test/browser_test_utils.h"
15 #include "net/dns/mock_host_resolver.h" 15 #include "net/dns/mock_host_resolver.h"
16 16
17 namespace { 17 namespace {
18 // Command line arguments specific to the chromoting browser tests. 18 // Command line arguments specific to the chromoting browser tests.
19 const char kOverrideUserDataDir[] = "override-user-data-dir"; 19 const char kOverrideUserDataDir[] = "override-user-data-dir";
20 const char kNoCleanup[] = "no-cleanup"; 20 const char kNoCleanup[] = "no-cleanup";
21 const char kNoInstall[] = "no-install"; 21 const char kNoInstall[] = "no-install";
22 const char kWebAppCrx[] = "webapp-crx"; 22 const char kWebAppCrx[] = "webapp-crx";
23 const char kWebAppUnpacked[] = "webapp-unpacked"; 23 const char kWebAppUnpacked[] = "webapp-unpacked";
24 const char kUsername[] = "username"; 24 const char kUserName[] = "username";
25 const char kkPassword[] = "password"; 25 const char kUserPassword[] = "password";
26 const char kAccountsFile[] = "accounts-file";
27 const char kAccountType[] = "account-type";
26 const char kMe2MePin[] = "me2me-pin"; 28 const char kMe2MePin[] = "me2me-pin";
27 const char kRemoteHostName[] = "remote-host-name"; 29 const char kRemoteHostName[] = "remote-host-name";
28 const char kExtensionName[] = "extension-name"; 30 const char kExtensionName[] = "extension-name";
29 const char kHttpServer[] = "http-server"; 31 const char kHttpServer[] = "http-server";
30 32
31 // ASSERT_TRUE can only be used in void returning functions. This version 33 // ASSERT_TRUE can only be used in void returning functions. This version
32 // should be used in non-void-returning functions. 34 // should be used in non-void-returning functions.
33 inline void _ASSERT_TRUE(bool condition) { 35 inline void _ASSERT_TRUE(bool condition) {
34 if (!condition) { 36 if (!condition) {
35 // ASSERT_TRUE only prints the first call frame in the error message. 37 // ASSERT_TRUE only prints the first call frame in the error message.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // Simulate typing a string 120 // Simulate typing a string
119 void SimulateStringInput(const std::string& input); 121 void SimulateStringInput(const std::string& input);
120 122
121 // Helper to simulate a left button mouse click. 123 // Helper to simulate a left button mouse click.
122 void SimulateMouseLeftClickAt(int x, int y); 124 void SimulateMouseLeftClickAt(int x, int y);
123 125
124 // Helper to simulate a mouse click. 126 // Helper to simulate a mouse click.
125 void SimulateMouseClickAt( 127 void SimulateMouseClickAt(
126 int modifiers, blink::WebMouseEvent::Button button, int x, int y); 128 int modifiers, blink::WebMouseEvent::Button button, int x, int y);
127 129
130 void SetUserNameAndPassword(
131 const base::FilePath &accounts_file, const std::string& account_type);
132
128 // The following helpers each perform a composite task. 133 // The following helpers each perform a composite task.
129 134
130 // Install the chromoting extension 135 // Install the chromoting extension
131 void Install(); 136 void Install();
132 137
133 // Perform all necessary steps (installation, authorization, authentication, 138 // Perform all necessary steps (installation, authorization, authentication,
134 // expanding the me2me section) so that the app is ready for a me2me 139 // expanding the me2me section) so that the app is ready for a me2me
135 // connection. 140 // connection.
136 void SetUpTestForMe2Me(); 141 void SetUpTestForMe2Me();
137 142
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 std::string password_; 372 std::string password_;
368 std::string me2me_pin_; 373 std::string me2me_pin_;
369 std::string remote_host_name_; 374 std::string remote_host_name_;
370 std::string extension_name_; 375 std::string extension_name_;
371 std::string http_server_; 376 std::string http_server_;
372 }; 377 };
373 378
374 } // namespace remoting 379 } // namespace remoting
375 380
376 #endif // CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ 381 #endif // CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/test/remoting/remote_desktop_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698