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

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

Issue 132433005: Use web-based sign-in, rather than inline signin, for v1 and v2 apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use web-based-signin, rather than inline signin. Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 #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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 547
548 no_cleanup_ = command_line->HasSwitch(kNoCleanup); 548 no_cleanup_ = command_line->HasSwitch(kNoCleanup);
549 no_install_ = command_line->HasSwitch(kNoInstall); 549 no_install_ = command_line->HasSwitch(kNoInstall);
550 550
551 if (!no_install_) { 551 if (!no_install_) {
552 webapp_crx_ = command_line->GetSwitchValuePath(kWebAppCrx); 552 webapp_crx_ = command_line->GetSwitchValuePath(kWebAppCrx);
553 webapp_unpacked_ = command_line->GetSwitchValuePath(kWebAppUnpacked); 553 webapp_unpacked_ = command_line->GetSwitchValuePath(kWebAppUnpacked);
554 // One and only one of these two arguments should be provided. 554 // One and only one of these two arguments should be provided.
555 ASSERT_NE(webapp_crx_.empty(), webapp_unpacked_.empty()); 555 ASSERT_NE(webapp_crx_.empty(), webapp_unpacked_.empty());
556 } 556 }
557
558 // Run with "enable-web-based-signin" flag to enforce web-based sign-in,
559 // rather than inline signin. This ensures we use the same authentication
560 // page, regardless of whether we are testing the v1 or v2 web-app.
561 command_line->AppendSwitch(switches::kEnableWebBasedSignin);
557 } 562 }
558 563
559 void RemoteDesktopBrowserTest::ExecuteScript(const std::string& script) { 564 void RemoteDesktopBrowserTest::ExecuteScript(const std::string& script) {
560 ASSERT_TRUE(content::ExecuteScript(active_web_contents(), script)); 565 ASSERT_TRUE(content::ExecuteScript(active_web_contents(), script));
561 } 566 }
562 567
563 void RemoteDesktopBrowserTest::ExecuteScriptAndWaitForAnyPageLoad( 568 void RemoteDesktopBrowserTest::ExecuteScriptAndWaitForAnyPageLoad(
564 const std::string& script) { 569 const std::string& script) {
565 content::WindowedNotificationObserver observer( 570 content::WindowedNotificationObserver observer(
566 content::NOTIFICATION_LOAD_STOP, 571 content::NOTIFICATION_LOAD_STOP,
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 } 695 }
691 696
692 // static 697 // static
693 bool RemoteDesktopBrowserTest::IsAuthenticatedInWindow( 698 bool RemoteDesktopBrowserTest::IsAuthenticatedInWindow(
694 content::WebContents* web_contents) { 699 content::WebContents* web_contents) {
695 return ExecuteScriptAndExtractBool( 700 return ExecuteScriptAndExtractBool(
696 web_contents, "remoting.identity.isAuthenticated()"); 701 web_contents, "remoting.identity.isAuthenticated()");
697 } 702 }
698 703
699 } // namespace remoting 704 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698