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

Side by Side Diff: chrome/browser/managed_mode/managed_user_registration_service_unittest.cc

Issue 19602003: Use a direct include of the message_loop header in chrome/browser/, part 7. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "base/threading/sequenced_worker_pool.h" 11 #include "base/threading/sequenced_worker_pool.h"
12 #include "chrome/browser/managed_mode/managed_user_refresh_token_fetcher.h" 12 #include "chrome/browser/managed_mode/managed_user_refresh_token_fetcher.h"
13 #include "chrome/browser/managed_mode/managed_user_registration_service.h" 13 #include "chrome/browser/managed_mode/managed_user_registration_service.h"
14 #include "chrome/browser/prefs/scoped_user_pref_update.h" 14 #include "chrome/browser/prefs/scoped_user_pref_update.h"
15 #include "chrome/common/pref_names.h" 15 #include "chrome/common/pref_names.h"
16 #include "chrome/test/base/testing_pref_service_syncable.h" 16 #include "chrome/test/base/testing_pref_service_syncable.h"
17 #include "content/public/browser/browser_thread.h" 17 #include "content/public/browser/browser_thread.h"
18 #include "google_apis/gaia/google_service_auth_error.h" 18 #include "google_apis/gaia/google_service_auth_error.h"
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 StartInitialSync(); 379 StartInitialSync();
380 service()->Register(ManagedUserRegistrationInfo(ASCIIToUTF16("Mike")), 380 service()->Register(ManagedUserRegistrationInfo(ASCIIToUTF16("Mike")),
381 GetRegistrationCallback()); 381 GetRegistrationCallback());
382 EXPECT_EQ(1u, prefs()->GetDictionary(prefs::kManagedUsers)->size()); 382 EXPECT_EQ(1u, prefs()->GetDictionary(prefs::kManagedUsers)->size());
383 service()->StopSyncing(MANAGED_USERS); 383 service()->StopSyncing(MANAGED_USERS);
384 EXPECT_EQ(0u, prefs()->GetDictionary(prefs::kManagedUsers)->size()); 384 EXPECT_EQ(0u, prefs()->GetDictionary(prefs::kManagedUsers)->size());
385 EXPECT_TRUE(received_callback()); 385 EXPECT_TRUE(received_callback());
386 EXPECT_EQ(GoogleServiceAuthError::REQUEST_CANCELED, error().state()); 386 EXPECT_EQ(GoogleServiceAuthError::REQUEST_CANCELED, error().state());
387 EXPECT_EQ(std::string(), token()); 387 EXPECT_EQ(std::string(), token());
388 } 388 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698