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

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

Issue 27548004: Cache force-installed apps/extensions in device-local accounts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Ready to reland after revert due to conflicting concurrent commit. Created 7 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 | 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/bind_helpers.h" 10 #include "base/bind_helpers.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/file_util.h" 13 #include "base/file_util.h"
14 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
15 #include "base/files/scoped_temp_dir.h"
15 #include "base/json/json_reader.h" 16 #include "base/json/json_reader.h"
16 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
17 #include "base/message_loop/message_loop.h" 18 #include "base/message_loop/message_loop.h"
18 #include "base/path_service.h" 19 #include "base/path_service.h"
19 #include "base/run_loop.h" 20 #include "base/run_loop.h"
21 #include "base/strings/string_number_conversions.h"
20 #include "base/strings/string_util.h" 22 #include "base/strings/string_util.h"
21 #include "base/strings/stringprintf.h" 23 #include "base/strings/stringprintf.h"
22 #include "base/strings/utf_string_conversions.h" 24 #include "base/strings/utf_string_conversions.h"
25 #include "base/test/scoped_path_override.h"
23 #include "base/values.h" 26 #include "base/values.h"
24 #include "chrome/browser/browser_process.h" 27 #include "chrome/browser/browser_process.h"
25 #include "chrome/browser/chrome_notification_types.h" 28 #include "chrome/browser/chrome_notification_types.h"
26 #include "chrome/browser/chromeos/login/existing_user_controller.h" 29 #include "chrome/browser/chromeos/login/existing_user_controller.h"
27 #include "chrome/browser/chromeos/login/login_display_host.h" 30 #include "chrome/browser/chromeos/login/login_display_host.h"
28 #include "chrome/browser/chromeos/login/login_display_host_impl.h" 31 #include "chrome/browser/chromeos/login/login_display_host_impl.h"
29 #include "chrome/browser/chromeos/login/mock_login_status_consumer.h" 32 #include "chrome/browser/chromeos/login/mock_login_status_consumer.h"
30 #include "chrome/browser/chromeos/login/screens/wizard_screen.h" 33 #include "chrome/browser/chromeos/login/screens/wizard_screen.h"
31 #include "chrome/browser/chromeos/login/user.h" 34 #include "chrome/browser/chromeos/login/user.h"
32 #include "chrome/browser/chromeos/login/user_manager.h" 35 #include "chrome/browser/chromeos/login/user_manager.h"
(...skipping 17 matching lines...) Expand all
50 #include "chrome/browser/ui/browser_commands.h" 53 #include "chrome/browser/ui/browser_commands.h"
51 #include "chrome/browser/ui/browser_finder.h" 54 #include "chrome/browser/ui/browser_finder.h"
52 #include "chrome/browser/ui/browser_list.h" 55 #include "chrome/browser/ui/browser_list.h"
53 #include "chrome/browser/ui/browser_window.h" 56 #include "chrome/browser/ui/browser_window.h"
54 #include "chrome/browser/ui/host_desktop.h" 57 #include "chrome/browser/ui/host_desktop.h"
55 #include "chrome/browser/ui/tabs/tab_strip_model.h" 58 #include "chrome/browser/ui/tabs/tab_strip_model.h"
56 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" 59 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
57 #include "chrome/common/chrome_paths.h" 60 #include "chrome/common/chrome_paths.h"
58 #include "chrome/common/chrome_switches.h" 61 #include "chrome/common/chrome_switches.h"
59 #include "chrome/common/extensions/extension.h" 62 #include "chrome/common/extensions/extension.h"
63 #include "chromeos/chromeos_paths.h"
60 #include "chromeos/chromeos_switches.h" 64 #include "chromeos/chromeos_switches.h"
61 #include "chromeos/dbus/cryptohome_client.h" 65 #include "chromeos/dbus/cryptohome_client.h"
62 #include "chromeos/dbus/dbus_method_call_status.h" 66 #include "chromeos/dbus/dbus_method_call_status.h"
63 #include "chromeos/dbus/fake_session_manager_client.h" 67 #include "chromeos/dbus/fake_session_manager_client.h"
64 #include "chromeos/dbus/session_manager_client.h" 68 #include "chromeos/dbus/session_manager_client.h"
65 #include "content/public/browser/notification_details.h" 69 #include "content/public/browser/notification_details.h"
66 #include "content/public/browser/notification_source.h" 70 #include "content/public/browser/notification_source.h"
67 #include "content/public/browser/web_contents.h" 71 #include "content/public/browser/web_contents.h"
68 #include "content/public/browser/web_ui.h" 72 #include "content/public/browser/web_ui.h"
69 #include "content/public/test/browser_test_utils.h" 73 #include "content/public/test/browser_test_utils.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 "<?xml version='1.0' encoding='UTF-8'?>\n" 110 "<?xml version='1.0' encoding='UTF-8'?>\n"
107 "<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>\n"; 111 "<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>\n";
108 const char kUpdateManifestTemplate[] = 112 const char kUpdateManifestTemplate[] =
109 " <app appid='%s'>\n" 113 " <app appid='%s'>\n"
110 " <updatecheck codebase='%s' version='%s' />\n" 114 " <updatecheck codebase='%s' version='%s' />\n"
111 " </app>\n"; 115 " </app>\n";
112 const char kUpdateManifestFooter[] = 116 const char kUpdateManifestFooter[] =
113 "</gupdate>\n"; 117 "</gupdate>\n";
114 const char kHostedAppID[] = "kbmnembihfiondgfjekmnmcbddelicoi"; 118 const char kHostedAppID[] = "kbmnembihfiondgfjekmnmcbddelicoi";
115 const char kHostedAppCRXPath[] = "extensions/hosted_app.crx"; 119 const char kHostedAppCRXPath[] = "extensions/hosted_app.crx";
116 const char kHostedAppVersion[] = "0.1"; 120 const char kHostedAppVersion[] = "1.0.0.0";
117 const char kGoodExtensionID[] = "ldnnhddmnhbkjipkidpdiheffobcpfmf"; 121 const char kGoodExtensionID[] = "ldnnhddmnhbkjipkidpdiheffobcpfmf";
118 const char kGoodExtensionPath[] = "extensions/good.crx"; 122 const char kGoodExtensionCRXPath[] = "extensions/good.crx";
119 const char kGoodExtensionVersion[] = "1.0"; 123 const char kGoodExtensionVersion[] = "1.0";
120 124
121 // Helper that serves extension update manifests to Chrome. 125 // Helper that serves extension update manifests to Chrome.
122 class TestingUpdateManifestProvider { 126 class TestingUpdateManifestProvider {
123 public: 127 public:
124 128
125 // Update manifests will be served at |relative_update_url|. 129 // Update manifests will be served at |relative_update_url|.
126 explicit TestingUpdateManifestProvider( 130 explicit TestingUpdateManifestProvider(
127 const std::string& relative_update_url); 131 const std::string& relative_update_url);
128 ~TestingUpdateManifestProvider(); 132 ~TestingUpdateManifestProvider();
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 virtual void SetUp() OVERRIDE { 244 virtual void SetUp() OVERRIDE {
241 // Configure and start the test server. 245 // Configure and start the test server.
242 scoped_ptr<crypto::RSAPrivateKey> signing_key( 246 scoped_ptr<crypto::RSAPrivateKey> signing_key(
243 PolicyBuilder::CreateTestSigningKey()); 247 PolicyBuilder::CreateTestSigningKey());
244 ASSERT_TRUE(test_server_.SetSigningKey(signing_key.get())); 248 ASSERT_TRUE(test_server_.SetSigningKey(signing_key.get()));
245 signing_key.reset(); 249 signing_key.reset();
246 test_server_.RegisterClient(PolicyBuilder::kFakeToken, 250 test_server_.RegisterClient(PolicyBuilder::kFakeToken,
247 PolicyBuilder::kFakeDeviceId); 251 PolicyBuilder::kFakeDeviceId);
248 ASSERT_TRUE(test_server_.Start()); 252 ASSERT_TRUE(test_server_.Start());
249 253
254 ASSERT_TRUE(extension_cache_root_dir_.CreateUniqueTempDir());
255 extension_cache_root_dir_override_.reset(new base::ScopedPathOverride(
256 chromeos::DIR_DEVICE_LOCAL_ACCOUNT_CACHE,
257 extension_cache_root_dir_.path()));
258
250 DevicePolicyCrosBrowserTest::SetUp(); 259 DevicePolicyCrosBrowserTest::SetUp();
251 } 260 }
252 261
253 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 262 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
254 command_line->AppendSwitch(chromeos::switches::kLoginManager); 263 command_line->AppendSwitch(chromeos::switches::kLoginManager);
255 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); 264 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests);
256 command_line->AppendSwitchASCII( 265 command_line->AppendSwitchASCII(
257 switches::kDeviceManagementUrl, test_server_.GetServiceURL().spec()); 266 switches::kDeviceManagementUrl, test_server_.GetServiceURL().spec());
258 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); 267 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user");
259 } 268 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 std::string(), proto.SerializeAsString()); 338 std::string(), proto.SerializeAsString());
330 } 339 }
331 340
332 void CheckPublicSessionPresent(const std::string& id) { 341 void CheckPublicSessionPresent(const std::string& id) {
333 const chromeos::User* user = chromeos::UserManager::Get()->FindUser(id); 342 const chromeos::User* user = chromeos::UserManager::Get()->FindUser(id);
334 ASSERT_TRUE(user); 343 ASSERT_TRUE(user);
335 EXPECT_EQ(id, user->email()); 344 EXPECT_EQ(id, user->email());
336 EXPECT_EQ(chromeos::User::USER_TYPE_PUBLIC_ACCOUNT, user->GetType()); 345 EXPECT_EQ(chromeos::User::USER_TYPE_PUBLIC_ACCOUNT, user->GetType());
337 } 346 }
338 347
348 base::FilePath GetCacheDirectoryForAccountID(const std::string& account_id) {
349 return extension_cache_root_dir_.path()
350 .Append(base::HexEncode(account_id.c_str(), account_id.size()));
351 }
352
353 base::FilePath GetCacheCRXFile(const std::string& account_id,
354 const std::string& id,
355 const std::string& version) {
356 return GetCacheDirectoryForAccountID(account_id)
357 .Append(base::StringPrintf("%s-%s.crx", id.c_str(), version.c_str()));
358 }
359
339 const std::string user_id_1_; 360 const std::string user_id_1_;
340 const std::string user_id_2_; 361 const std::string user_id_2_;
341 362
363 base::ScopedTempDir extension_cache_root_dir_;
364 scoped_ptr<base::ScopedPathOverride> extension_cache_root_dir_override_;
365
342 UserPolicyBuilder device_local_account_policy_; 366 UserPolicyBuilder device_local_account_policy_;
343 LocalPolicyTestServer test_server_; 367 LocalPolicyTestServer test_server_;
344 }; 368 };
345 369
346 static bool IsKnownUser(const std::string& account_id) { 370 static bool IsKnownUser(const std::string& account_id) {
347 return chromeos::UserManager::Get()->IsKnownUser(account_id); 371 return chromeos::UserManager::Get()->IsKnownUser(account_id);
348 } 372 }
349 373
350 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, LoginScreen) { 374 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, LoginScreen) {
351 AddPublicSessionToDevicePolicy(kAccountId1); 375 AddPublicSessionToDevicePolicy(kAccountId1);
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 BrowserWindow* browser_window = browser->window(); 571 BrowserWindow* browser_window = browser->window();
548 ASSERT_TRUE(browser_window); 572 ASSERT_TRUE(browser_window);
549 chrome::EndKeepAlive(); 573 chrome::EndKeepAlive();
550 574
551 // Verify that an attempt to enter fullscreen mode is denied. 575 // Verify that an attempt to enter fullscreen mode is denied.
552 EXPECT_FALSE(browser_window->IsFullscreen()); 576 EXPECT_FALSE(browser_window->IsFullscreen());
553 chrome::ToggleFullscreenMode(browser); 577 chrome::ToggleFullscreenMode(browser);
554 EXPECT_FALSE(browser_window->IsFullscreen()); 578 EXPECT_FALSE(browser_window->IsFullscreen());
555 } 579 }
556 580
557 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, ExtensionWhitelist) { 581 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, ExtensionsUncached) {
558 // Make it possible to force-install a hosted app and an extension. 582 // Make it possible to force-install a hosted app and an extension.
559 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 583 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
560 TestingUpdateManifestProvider testing_update_manifest_provider( 584 TestingUpdateManifestProvider testing_update_manifest_provider(
561 kRelativeUpdateURL); 585 kRelativeUpdateURL);
562 testing_update_manifest_provider.AddUpdate( 586 testing_update_manifest_provider.AddUpdate(
563 kHostedAppID, 587 kHostedAppID,
564 kHostedAppVersion, 588 kHostedAppVersion,
565 embedded_test_server()->GetURL(std::string("/") + kHostedAppCRXPath)); 589 embedded_test_server()->GetURL(std::string("/") + kHostedAppCRXPath));
566 testing_update_manifest_provider.AddUpdate( 590 testing_update_manifest_provider.AddUpdate(
567 kGoodExtensionID, 591 kGoodExtensionID,
568 kGoodExtensionVersion, 592 kGoodExtensionVersion,
569 embedded_test_server()->GetURL(std::string("/") + kGoodExtensionPath)); 593 embedded_test_server()->GetURL(std::string("/") + kGoodExtensionCRXPath));
570 embedded_test_server()->RegisterRequestHandler( 594 embedded_test_server()->RegisterRequestHandler(
571 base::Bind(&TestingUpdateManifestProvider::HandleRequest, 595 base::Bind(&TestingUpdateManifestProvider::HandleRequest,
572 base::Unretained(&testing_update_manifest_provider))); 596 base::Unretained(&testing_update_manifest_provider)));
573 597
574 // Specify policy to force-install the hosted app and the extension. 598 // Specify policy to force-install the hosted app and the extension.
575 em::StringList* forcelist = device_local_account_policy_.payload() 599 em::StringList* forcelist = device_local_account_policy_.payload()
576 .mutable_extensioninstallforcelist()->mutable_value(); 600 .mutable_extensioninstallforcelist()->mutable_value();
577 forcelist->add_entries(base::StringPrintf( 601 forcelist->add_entries(base::StringPrintf(
578 "%s;%s", 602 "%s;%s",
579 kHostedAppID, 603 kHostedAppID,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 base::Bind(DoesInstallFailureReferToId, kGoodExtensionID)); 642 base::Bind(DoesInstallFailureReferToId, kGoodExtensionID));
619 643
620 // Start login into the device-local account. 644 // Start login into the device-local account.
621 host->StartSignInScreen(); 645 host->StartSignInScreen();
622 chromeos::ExistingUserController* controller = 646 chromeos::ExistingUserController* controller =
623 chromeos::ExistingUserController::current_controller(); 647 chromeos::ExistingUserController::current_controller();
624 ASSERT_TRUE(controller); 648 ASSERT_TRUE(controller);
625 controller->LoginAsPublicAccount(user_id_1_); 649 controller->LoginAsPublicAccount(user_id_1_);
626 650
627 // Wait for the hosted app installation to succeed and the extension 651 // Wait for the hosted app installation to succeed and the extension
652 // installation to fail (because hosted apps are whitelisted for use in
653 // device-local accounts and extensions are not).
654 hosted_app_observer.Wait();
655 extension_observer.Wait();
656
657 // Verify that the hosted app was installed.
658 Profile* profile = ProfileManager::GetDefaultProfile();
659 ASSERT_TRUE(profile);
660 ExtensionService* extension_service =
661 extensions::ExtensionSystem::Get(profile)->extension_service();
662 EXPECT_TRUE(extension_service->GetExtensionById(kHostedAppID, true));
663
664 // Verify that the extension was not installed.
665 EXPECT_FALSE(extension_service->GetExtensionById(kGoodExtensionID, true));
666
667 // Verify that the app was copied to the account's extension cache.
668 base::FilePath test_dir;
669 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir));
670 EXPECT_TRUE(ContentsEqual(
671 GetCacheCRXFile(kAccountId1, kHostedAppID, kHostedAppVersion),
672 test_dir.Append(kHostedAppCRXPath)));
673
674 // Verify that the extension was not copied to the account's extension cache.
675 EXPECT_FALSE(PathExists(GetCacheCRXFile(
676 kAccountId1, kGoodExtensionID, kGoodExtensionVersion)));
677 }
678
679 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, ExtensionsCached) {
680 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
681
682 // Pre-populate the device local account's extension cache with a hosted app
683 // and an extension.
684 EXPECT_TRUE(file_util::CreateDirectory(
685 GetCacheDirectoryForAccountID(kAccountId1)));
686 base::FilePath test_dir;
687 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir));
688 const base::FilePath cached_hosted_app =
689 GetCacheCRXFile(kAccountId1, kHostedAppID, kHostedAppVersion);
690 EXPECT_TRUE(CopyFile(test_dir.Append(kHostedAppCRXPath),
691 cached_hosted_app));
692 const base::FilePath cached_extension =
693 GetCacheCRXFile(kAccountId1, kGoodExtensionID, kGoodExtensionVersion);
694 EXPECT_TRUE(CopyFile(test_dir.Append(kGoodExtensionCRXPath),
695 cached_extension));
696
697 // Specify policy to force-install the hosted app.
698 em::StringList* forcelist = device_local_account_policy_.payload()
699 .mutable_extensioninstallforcelist()->mutable_value();
700 forcelist->add_entries(base::StringPrintf(
701 "%s;%s",
702 kHostedAppID,
703 embedded_test_server()->GetURL(kRelativeUpdateURL).spec().c_str()));
704 forcelist->add_entries(base::StringPrintf(
705 "%s;%s",
706 kGoodExtensionID,
707 embedded_test_server()->GetURL(kRelativeUpdateURL).spec().c_str()));
708
709 UploadAndInstallDeviceLocalAccountPolicy();
710 AddPublicSessionToDevicePolicy(kAccountId1);
711
712 // This observes the display name becoming available as this indicates
713 // device-local account policy is fully loaded, which is a prerequisite for
714 // successful login.
715 content::WindowedNotificationObserver(
716 chrome::NOTIFICATION_USER_LIST_CHANGED,
717 base::Bind(&DisplayNameMatches, user_id_1_, kDisplayName)).Wait();
718
719 // Wait for the login UI to be ready.
720 chromeos::LoginDisplayHostImpl* host =
721 reinterpret_cast<chromeos::LoginDisplayHostImpl*>(
722 chromeos::LoginDisplayHostImpl::default_host());
723 ASSERT_TRUE(host);
724 chromeos::OobeUI* oobe_ui = host->GetOobeUI();
725 ASSERT_TRUE(oobe_ui);
726 base::RunLoop run_loop;
727 const bool oobe_ui_ready = oobe_ui->IsJSReady(run_loop.QuitClosure());
728 if (!oobe_ui_ready)
729 run_loop.Run();
730
731 // Ensure that the browser stays alive, even though no windows are opened
732 // during session start.
733 chrome::StartKeepAlive();
734
735 // Start listening for app/extension installation results.
736 content::WindowedNotificationObserver hosted_app_observer(
737 chrome::NOTIFICATION_EXTENSION_INSTALLED,
738 base::Bind(DoesInstallSuccessReferToId, kHostedAppID));
739 content::WindowedNotificationObserver extension_observer(
740 chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
741 base::Bind(DoesInstallFailureReferToId, kGoodExtensionID));
742
743 // Start login into the device-local account.
744 host->StartSignInScreen();
745 chromeos::ExistingUserController* controller =
746 chromeos::ExistingUserController::current_controller();
747 ASSERT_TRUE(controller);
748 controller->LoginAsPublicAccount(user_id_1_);
749
750 // Wait for the hosted app installation to succeed and the extension
628 // installation to fail. 751 // installation to fail.
629 hosted_app_observer.Wait(); 752 hosted_app_observer.Wait();
630 extension_observer.Wait(); 753 extension_observer.Wait();
631 754
632 // Verify that the hosted app was installed. 755 // Verify that the hosted app was installed.
633 Profile* profile = ProfileManager::GetDefaultProfile(); 756 Profile* profile = ProfileManager::GetDefaultProfile();
634 ASSERT_TRUE(profile); 757 ASSERT_TRUE(profile);
635 ExtensionService* extension_service = 758 ExtensionService* extension_service =
636 extensions::ExtensionSystem::Get(profile)->extension_service(); 759 extensions::ExtensionSystem::Get(profile)->extension_service();
637 EXPECT_TRUE(extension_service->GetExtensionById(kHostedAppID, true)); 760 EXPECT_TRUE(extension_service->GetExtensionById(kHostedAppID, true));
638 761
639 // Verify that the extension was not installed. 762 // Verify that the extension was not installed.
640 EXPECT_FALSE(extension_service->GetExtensionById(kGoodExtensionID, true)); 763 EXPECT_FALSE(extension_service->GetExtensionById(kGoodExtensionID, true));
764
765 // Verify that the app is still in the account's extension cache.
766 EXPECT_TRUE(PathExists(cached_hosted_app));
767
768 // Verify that the extension was removed from the account's extension cache.
769 EXPECT_FALSE(PathExists(cached_extension));
641 } 770 }
642 771
643 class TermsOfServiceTest : public DeviceLocalAccountTest, 772 class TermsOfServiceTest : public DeviceLocalAccountTest,
644 public testing::WithParamInterface<bool> { 773 public testing::WithParamInterface<bool> {
645 }; 774 };
646 775
647 IN_PROC_BROWSER_TEST_P(TermsOfServiceTest, TermsOfServiceScreen) { 776 IN_PROC_BROWSER_TEST_P(TermsOfServiceTest, TermsOfServiceScreen) {
648 // Specify Terms of Service URL. 777 // Specify Terms of Service URL.
649 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 778 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
650 device_local_account_policy_.payload().mutable_termsofserviceurl()->set_value( 779 device_local_account_policy_.payload().mutable_termsofserviceurl()->set_value(
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 if (!IsSessionStarted()) { 923 if (!IsSessionStarted()) {
795 content::WindowedNotificationObserver(chrome::NOTIFICATION_SESSION_STARTED, 924 content::WindowedNotificationObserver(chrome::NOTIFICATION_SESSION_STARTED,
796 base::Bind(IsSessionStarted)).Wait(); 925 base::Bind(IsSessionStarted)).Wait();
797 } 926 }
798 } 927 }
799 928
800 INSTANTIATE_TEST_CASE_P(TermsOfServiceTestInstance, 929 INSTANTIATE_TEST_CASE_P(TermsOfServiceTestInstance,
801 TermsOfServiceTest, testing::Bool()); 930 TermsOfServiceTest, testing::Bool());
802 931
803 } // namespace policy 932 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698