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

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

Issue 83633004: Do not spawn a thread in browser/interactive ui tests before spawning sandbox host process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h" 5 #include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 fake_session_manager_client_(new chromeos::FakeSessionManagerClient) { 76 fake_session_manager_client_(new chromeos::FakeSessionManagerClient) {
77 fake_dbus_thread_manager_->SetFakeClients(); 77 fake_dbus_thread_manager_->SetFakeClients();
78 fake_dbus_thread_manager_->SetSessionManagerClient( 78 fake_dbus_thread_manager_->SetSessionManagerClient(
79 scoped_ptr<chromeos::SessionManagerClient>(fake_session_manager_client_)); 79 scoped_ptr<chromeos::SessionManagerClient>(fake_session_manager_client_));
80 } 80 }
81 81
82 DevicePolicyCrosBrowserTest::~DevicePolicyCrosBrowserTest() { 82 DevicePolicyCrosBrowserTest::~DevicePolicyCrosBrowserTest() {
83 } 83 }
84 84
85 void DevicePolicyCrosBrowserTest::SetUpInProcessBrowserTestFixture() { 85 void DevicePolicyCrosBrowserTest::SetUpInProcessBrowserTestFixture() {
86 chromeos::DBusThreadManager::InitializeForTesting(fake_dbus_thread_manager_); 86 chromeos::DBusThreadManager::SetInstanceForTesting(fake_dbus_thread_manager_);
87 InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); 87 InProcessBrowserTest::SetUpInProcessBrowserTestFixture();
88 } 88 }
89 89
90 void DevicePolicyCrosBrowserTest::TearDownInProcessBrowserTestFixture() { 90 void DevicePolicyCrosBrowserTest::TearDownInProcessBrowserTestFixture() {
91 InProcessBrowserTest::TearDownInProcessBrowserTestFixture(); 91 InProcessBrowserTest::TearDownInProcessBrowserTestFixture();
92 chromeos::DBusThreadManager::Shutdown(); 92 chromeos::DBusThreadManager::Shutdown();
93 } 93 }
94 94
95 void DevicePolicyCrosBrowserTest::MarkAsEnterpriseOwned() { 95 void DevicePolicyCrosBrowserTest::MarkAsEnterpriseOwned() {
96 test_helper_.MarkAsEnterpriseOwned(); 96 test_helper_.MarkAsEnterpriseOwned();
97 } 97 }
98 98
99 void DevicePolicyCrosBrowserTest::InstallOwnerKey() { 99 void DevicePolicyCrosBrowserTest::InstallOwnerKey() {
100 test_helper_.InstallOwnerKey(); 100 test_helper_.InstallOwnerKey();
101 } 101 }
102 102
103 void DevicePolicyCrosBrowserTest::RefreshDevicePolicy() { 103 void DevicePolicyCrosBrowserTest::RefreshDevicePolicy() {
104 // Reset the key to its original state. 104 // Reset the key to its original state.
105 device_policy()->SetDefaultSigningKey(); 105 device_policy()->SetDefaultSigningKey();
106 device_policy()->Build(); 106 device_policy()->Build();
107 session_manager_client()->set_device_policy(device_policy()->GetBlob()); 107 session_manager_client()->set_device_policy(device_policy()->GetBlob());
108 session_manager_client()->OnPropertyChangeComplete(true); 108 session_manager_client()->OnPropertyChangeComplete(true);
109 } 109 }
110 110
111 } // namespace policy 111 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698