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

Side by Side Diff: trunk/src/chrome/browser/chromeos/policy/device_local_account_browsertest.cc

Issue 13590004: Revert 192504 "Re-apply 192420: Move login switches to src/chromeos" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 23 matching lines...) Expand all
34 #include "chrome/browser/policy/test/local_policy_test_server.h" 34 #include "chrome/browser/policy/test/local_policy_test_server.h"
35 #include "chrome/browser/prefs/session_startup_pref.h" 35 #include "chrome/browser/prefs/session_startup_pref.h"
36 #include "chrome/browser/ui/browser.h" 36 #include "chrome/browser/ui/browser.h"
37 #include "chrome/browser/ui/browser_finder.h" 37 #include "chrome/browser/ui/browser_finder.h"
38 #include "chrome/browser/ui/host_desktop.h" 38 #include "chrome/browser/ui/host_desktop.h"
39 #include "chrome/browser/ui/tabs/tab_strip_model.h" 39 #include "chrome/browser/ui/tabs/tab_strip_model.h"
40 #include "chrome/common/chrome_notification_types.h" 40 #include "chrome/common/chrome_notification_types.h"
41 #include "chrome/common/chrome_paths.h" 41 #include "chrome/common/chrome_paths.h"
42 #include "chrome/common/chrome_switches.h" 42 #include "chrome/common/chrome_switches.h"
43 #include "chrome/test/base/in_process_browser_test.h" 43 #include "chrome/test/base/in_process_browser_test.h"
44 #include "chromeos/chromeos_switches.h"
45 #include "chromeos/dbus/cryptohome_client.h" 44 #include "chromeos/dbus/cryptohome_client.h"
46 #include "chromeos/dbus/dbus_method_call_status.h" 45 #include "chromeos/dbus/dbus_method_call_status.h"
47 #include "chromeos/dbus/dbus_thread_manager.h" 46 #include "chromeos/dbus/dbus_thread_manager.h"
48 #include "chromeos/dbus/mock_dbus_thread_manager.h" 47 #include "chromeos/dbus/mock_dbus_thread_manager.h"
49 #include "chromeos/dbus/mock_update_engine_client.h" 48 #include "chromeos/dbus/mock_update_engine_client.h"
50 #include "chromeos/dbus/session_manager_client.h" 49 #include "chromeos/dbus/session_manager_client.h"
51 #include "content/public/browser/notification_observer.h" 50 #include "content/public/browser/notification_observer.h"
52 #include "content/public/browser/notification_registrar.h" 51 #include "content/public/browser/notification_registrar.h"
53 #include "content/public/browser/notification_service.h" 52 #include "content/public/browser/notification_service.h"
54 #include "content/public/browser/web_contents.h" 53 #include "content/public/browser/web_contents.h"
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 ASSERT_TRUE(test_server_.SetSigningKey(signing_key.get())); 376 ASSERT_TRUE(test_server_.SetSigningKey(signing_key.get()));
378 signing_key.reset(); 377 signing_key.reset();
379 test_server_.RegisterClient(PolicyBuilder::kFakeToken, 378 test_server_.RegisterClient(PolicyBuilder::kFakeToken,
380 PolicyBuilder::kFakeDeviceId); 379 PolicyBuilder::kFakeDeviceId);
381 ASSERT_TRUE(test_server_.Start()); 380 ASSERT_TRUE(test_server_.Start());
382 381
383 InProcessBrowserTest::SetUp(); 382 InProcessBrowserTest::SetUp();
384 } 383 }
385 384
386 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 385 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
387 command_line->AppendSwitch(chromeos::switches::kLoginManager); 386 command_line->AppendSwitch(switches::kLoginManager);
388 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); 387 command_line->AppendSwitch(switches::kForceLoginManagerInTests);
389 command_line->AppendSwitchASCII( 388 command_line->AppendSwitchASCII(
390 chromeos::switches::kLoginScreen, 389 switches::kLoginScreen, chromeos::WizardController::kLoginScreenName);
391 chromeos::WizardController::kLoginScreenName);
392 command_line->AppendSwitchASCII( 390 command_line->AppendSwitchASCII(
393 switches::kDeviceManagementUrl, test_server_.GetServiceURL().spec()); 391 switches::kDeviceManagementUrl, test_server_.GetServiceURL().spec());
394 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); 392 command_line->AppendSwitchASCII(
393 switches::kLoginProfile, "user");
395 } 394 }
396 395
397 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { 396 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
398 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 397 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
399 398
400 // Clear command-line arguments (but keep command-line switches) so the 399 // Clear command-line arguments (but keep command-line switches) so the
401 // startup pages policy takes effect. 400 // startup pages policy takes effect.
402 CommandLine* command_line = CommandLine::ForCurrentProcess(); 401 CommandLine* command_line = CommandLine::ForCurrentProcess();
403 CommandLine::StringVector argv(command_line->argv()); 402 CommandLine::StringVector argv(command_line->argv());
404 argv.erase(argv.begin() + argv.size() - command_line->GetArgs().size(), 403 argv.erase(argv.begin() + argv.size() - command_line->GetArgs().size(),
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 631
633 TabStripModel* tabs = browser->tab_strip_model(); 632 TabStripModel* tabs = browser->tab_strip_model();
634 ASSERT_TRUE(tabs); 633 ASSERT_TRUE(tabs);
635 int expected_tab_count = static_cast<int>(arraysize(kStartupURLs)); 634 int expected_tab_count = static_cast<int>(arraysize(kStartupURLs));
636 EXPECT_EQ(expected_tab_count, tabs->count()); 635 EXPECT_EQ(expected_tab_count, tabs->count());
637 for (int i = 0; i < expected_tab_count && i < tabs->count(); ++i) 636 for (int i = 0; i < expected_tab_count && i < tabs->count(); ++i)
638 EXPECT_EQ(GURL(kStartupURLs[i]), tabs->GetWebContentsAt(i)->GetURL()); 637 EXPECT_EQ(GURL(kStartupURLs[i]), tabs->GetWebContentsAt(i)->GetURL());
639 } 638 }
640 639
641 } // namespace policy 640 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698