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

Side by Side Diff: chrome/browser/chromeos/login/supervised/supervised_user_creation_browsertest.cc

Issue 1411423006: Simplifed logic of showing/hiding cancel buttons on login screens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small fix. Created 5 years, 1 month 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
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698