| OLD | NEW |
| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 new chromeos::MockDBusThreadManagerWithoutGMock(); | 167 new chromeos::MockDBusThreadManagerWithoutGMock(); |
| 168 session_manager_client_ = | 168 session_manager_client_ = |
| 169 dbus_thread_manager->fake_session_manager_client(); | 169 dbus_thread_manager->fake_session_manager_client(); |
| 170 chromeos::DBusThreadManager::InitializeForTesting(dbus_thread_manager); | 170 chromeos::DBusThreadManager::InitializeForTesting(dbus_thread_manager); |
| 171 | 171 |
| 172 SetUpPolicy(); | 172 SetUpPolicy(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 virtual void CleanUpOnMainThread() OVERRIDE { | 175 virtual void CleanUpOnMainThread() OVERRIDE { |
| 176 // This shuts down the login UI. | 176 // This shuts down the login UI. |
| 177 MessageLoop::current()->PostTask(FROM_HERE, | 177 base::MessageLoop::current()->PostTask(FROM_HERE, |
| 178 base::Bind(&chrome::AttemptExit)); | 178 base::Bind(&chrome::AttemptExit)); |
| 179 base::RunLoop().RunUntilIdle(); | 179 base::RunLoop().RunUntilIdle(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void SetUpInstallAttributes() { | 182 void SetUpInstallAttributes() { |
| 183 cryptohome::SerializedInstallAttributes install_attrs_proto; | 183 cryptohome::SerializedInstallAttributes install_attrs_proto; |
| 184 cryptohome::SerializedInstallAttributes::Attribute* attribute = NULL; | 184 cryptohome::SerializedInstallAttributes::Attribute* attribute = NULL; |
| 185 | 185 |
| 186 attribute = install_attrs_proto.add_attributes(); | 186 attribute = install_attrs_proto.add_attributes(); |
| 187 attribute->set_name(EnterpriseInstallAttributes::kAttrEnterpriseOwned); | 187 attribute->set_name(EnterpriseInstallAttributes::kAttrEnterpriseOwned); |
| 188 attribute->set_value("true"); | 188 attribute->set_value("true"); |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 | 391 |
| 392 TabStripModel* tabs = browser->tab_strip_model(); | 392 TabStripModel* tabs = browser->tab_strip_model(); |
| 393 ASSERT_TRUE(tabs); | 393 ASSERT_TRUE(tabs); |
| 394 int expected_tab_count = static_cast<int>(arraysize(kStartupURLs)); | 394 int expected_tab_count = static_cast<int>(arraysize(kStartupURLs)); |
| 395 EXPECT_EQ(expected_tab_count, tabs->count()); | 395 EXPECT_EQ(expected_tab_count, tabs->count()); |
| 396 for (int i = 0; i < expected_tab_count && i < tabs->count(); ++i) | 396 for (int i = 0; i < expected_tab_count && i < tabs->count(); ++i) |
| 397 EXPECT_EQ(GURL(kStartupURLs[i]), tabs->GetWebContentsAt(i)->GetURL()); | 397 EXPECT_EQ(GURL(kStartupURLs[i]), tabs->GetWebContentsAt(i)->GetURL()); |
| 398 } | 398 } |
| 399 | 399 |
| 400 } // namespace policy | 400 } // namespace policy |
| OLD | NEW |