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

Unified Diff: chrome/test/remoting/remote_desktop_browsertest.cc

Issue 840023004: Implement mocks for identity and host-list, add a browser test to test the app in various failure m… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/remoting/remote_desktop_browsertest.cc
diff --git a/chrome/test/remoting/remote_desktop_browsertest.cc b/chrome/test/remoting/remote_desktop_browsertest.cc
index a18778a990d5598c1717992faba72e710ac70232..586db7af651e26487b1c6da516fa16a11e9565a2 100644
--- a/chrome/test/remoting/remote_desktop_browsertest.cc
+++ b/chrome/test/remoting/remote_desktop_browsertest.cc
@@ -451,6 +451,18 @@ void RemoteDesktopBrowserTest::Install() {
VerifyChromotingLoaded(true);
}
+void RemoteDesktopBrowserTest::LoadBrowserTestJavaScript(
+ content::WebContents* content) {
+ LoadScript(content, FILE_PATH_LITERAL("browser_test.js"));
+ LoadScript(content, FILE_PATH_LITERAL("mock_client_plugin.js"));
+ LoadScript(content, FILE_PATH_LITERAL("mock_host_list_api.js"));
+ LoadScript(content, FILE_PATH_LITERAL("mock_identity.js"));
+ LoadScript(content, FILE_PATH_LITERAL("mock_oauth2_api.js"));
+ LoadScript(content, FILE_PATH_LITERAL("mock_session_connector.js"));
+ LoadScript(content, FILE_PATH_LITERAL("mock_signal_strategy.js"));
+ LoadScript(content, FILE_PATH_LITERAL("timeout_waiter.js"));
+}
+
void RemoteDesktopBrowserTest::Cleanup() {
// TODO(weitaosu): Remove this hack by blocking on the appropriate
// notification.
@@ -474,8 +486,8 @@ void RemoteDesktopBrowserTest::SetUpTestForMe2Me() {
VerifyInternetAccess();
Install();
LaunchChromotingApp(false);
+ LoadBrowserTestJavaScript(app_web_content());
Auth();
- LoadScript(app_web_content(), FILE_PATH_LITERAL("browser_test.js"));
ExpandMe2Me();
// The call to EnsureRemoteConnectionEnabled() does a PIN reset.
// This causes the test to fail because of a recent bug:
« no previous file with comments | « chrome/test/remoting/remote_desktop_browsertest.h ('k') | chrome/test/remoting/unauthenticated_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698