| 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 "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 no_cleanup_ = command_line->HasSwitch(kNoCleanup); | 670 no_cleanup_ = command_line->HasSwitch(kNoCleanup); |
| 671 no_install_ = command_line->HasSwitch(kNoInstall); | 671 no_install_ = command_line->HasSwitch(kNoInstall); |
| 672 | 672 |
| 673 if (!no_install_) { | 673 if (!no_install_) { |
| 674 webapp_crx_ = command_line->GetSwitchValuePath(kWebAppCrx); | 674 webapp_crx_ = command_line->GetSwitchValuePath(kWebAppCrx); |
| 675 webapp_unpacked_ = command_line->GetSwitchValuePath(kWebAppUnpacked); | 675 webapp_unpacked_ = command_line->GetSwitchValuePath(kWebAppUnpacked); |
| 676 // One and only one of these two arguments should be provided. | 676 // One and only one of these two arguments should be provided. |
| 677 ASSERT_NE(webapp_crx_.empty(), webapp_unpacked_.empty()); | 677 ASSERT_NE(webapp_crx_.empty(), webapp_unpacked_.empty()); |
| 678 } | 678 } |
| 679 | 679 |
| 680 // Run with "enable-web-based-signin" flag to enforce web-based sign-in, | |
| 681 // rather than inline signin. This ensures we use the same authentication | |
| 682 // page, regardless of whether we are testing the v1 or v2 web-app. | |
| 683 command_line->AppendSwitch(switches::kEnableWebBasedSignin); | |
| 684 | |
| 685 // Enable experimental extensions; this is to allow adding the LG extensions | 680 // Enable experimental extensions; this is to allow adding the LG extensions |
| 686 command_line->AppendSwitch( | 681 command_line->AppendSwitch( |
| 687 extensions::switches::kEnableExperimentalExtensionApis); | 682 extensions::switches::kEnableExperimentalExtensionApis); |
| 688 } | 683 } |
| 689 | 684 |
| 690 void RemoteDesktopBrowserTest::ExecuteScript(const std::string& script) { | 685 void RemoteDesktopBrowserTest::ExecuteScript(const std::string& script) { |
| 691 ASSERT_TRUE(content::ExecuteScript(active_web_contents(), script)); | 686 ASSERT_TRUE(content::ExecuteScript(active_web_contents(), script)); |
| 692 } | 687 } |
| 693 | 688 |
| 694 void RemoteDesktopBrowserTest::ExecuteScriptAndWaitForAnyPageLoad( | 689 void RemoteDesktopBrowserTest::ExecuteScriptAndWaitForAnyPageLoad( |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 | 927 |
| 933 ConditionalTimeoutWaiter homeWaiter( | 928 ConditionalTimeoutWaiter homeWaiter( |
| 934 base::TimeDelta::FromSeconds(5), | 929 base::TimeDelta::FromSeconds(5), |
| 935 base::TimeDelta::FromMilliseconds(500), | 930 base::TimeDelta::FromMilliseconds(500), |
| 936 base::Bind(&RemoteDesktopBrowserTest::IsAppModeEqualTo, | 931 base::Bind(&RemoteDesktopBrowserTest::IsAppModeEqualTo, |
| 937 this, "remoting.AppMode.HOME")); | 932 this, "remoting.AppMode.HOME")); |
| 938 EXPECT_TRUE(homeWaiter.Wait()); | 933 EXPECT_TRUE(homeWaiter.Wait()); |
| 939 } | 934 } |
| 940 | 935 |
| 941 } // namespace remoting | 936 } // namespace remoting |
| OLD | NEW |