| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 EXPECT_TRUE(registration_utility_stub_->register_was_called()); | 173 EXPECT_TRUE(registration_utility_stub_->register_was_called()); |
| 174 EXPECT_EQ(registration_utility_stub_->display_name(), | 174 EXPECT_EQ(registration_utility_stub_->display_name(), |
| 175 base::UTF8ToUTF16(kTestSupervisedUserDisplayName)); | 175 base::UTF8ToUTF16(kTestSupervisedUserDisplayName)); |
| 176 | 176 |
| 177 std::string user_id = registration_utility_stub_->supervised_user_id(); | 177 std::string user_id = registration_utility_stub_->supervised_user_id(); |
| 178 | 178 |
| 179 // Make sure user is already in list. | 179 // Make sure user is already in list. |
| 180 ASSERT_EQ(3UL, user_manager::UserManager::Get()->GetUsers().size()); | 180 ASSERT_EQ(3UL, user_manager::UserManager::Get()->GetUsers().size()); |
| 181 | 181 |
| 182 // We wait for token now. Press cancel button at this point. | 182 // We wait for token now. Press cancel button at this point. |
| 183 JSEvalOrExitBrowser("$('cancel-add-user-button').click()"); | 183 JSEvalOrExitBrowser("$('supervised-user-creation').cancel()"); |
| 184 } | 184 } |
| 185 | 185 |
| 186 IN_PROC_BROWSER_TEST_( | 186 IN_PROC_BROWSER_TEST_( |
| 187 SupervisedUserTransactionCleanupTest, | 187 SupervisedUserTransactionCleanupTest, |
| 188 CreateAndCancelSupervisedUser, | 188 CreateAndCancelSupervisedUser, |
| 189 SupervisedUserTransactionCleanupTest2, | 189 SupervisedUserTransactionCleanupTest2, |
| 190 testing::internal::GetTypeId<SupervisedUserTransactionCleanupTest>()) { | 190 testing::internal::GetTypeId<SupervisedUserTransactionCleanupTest>()) { |
| 191 // Make sure there is no supervised user in list. | 191 // Make sure there is no supervised user in list. |
| 192 ASSERT_EQ(2UL, user_manager::UserManager::Get()->GetUsers().size()); | 192 ASSERT_EQ(2UL, user_manager::UserManager::Get()->GetUsers().size()); |
| 193 } | 193 } |
| 194 | 194 |
| 195 } // namespace chromeos | 195 } // namespace chromeos |
| OLD | NEW |