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

Unified Diff: chrome/browser/chromeos/login/owner_manager_unittest.h

Issue 7034003: cros: Slightly more mock out-of-lining. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/owner_manager_unittest.h
diff --git a/chrome/browser/chromeos/login/owner_manager_unittest.h b/chrome/browser/chromeos/login/owner_manager_unittest.h
index ca6f499e3ba2c0d50cd93cb53def6510060d9b65..c75016f8b98fc16b453b6ff9bfb923c13bf6c18b 100644
--- a/chrome/browser/chromeos/login/owner_manager_unittest.h
+++ b/chrome/browser/chromeos/login/owner_manager_unittest.h
@@ -39,26 +39,13 @@ class MockKeyLoadObserver : public NotificationObserver {
}
virtual ~MockKeyLoadObserver() {
- EXPECT_TRUE(observed_);
+ DCHECK(observed_);
}
// NotificationObserver implementation.
virtual void Observe(NotificationType type,
const NotificationSource& source,
- const NotificationDetails& details) {
- LOG(INFO) << "Observed key fetch event";
- if (type == NotificationType::OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED) {
- EXPECT_TRUE(success_expected_);
- observed_ = true;
- if (quit_on_observe_)
- MessageLoop::current()->Quit();
- } else if (type == NotificationType::OWNER_KEY_FETCH_ATTEMPT_FAILED) {
- EXPECT_FALSE(success_expected_);
- observed_ = true;
- if (quit_on_observe_)
- MessageLoop::current()->Quit();
- }
- }
+ const NotificationDetails& details);
void ExpectKeyFetchSuccess(bool should_succeed) {
success_expected_ = should_succeed;
@@ -87,12 +74,8 @@ class MockKeyUser : public OwnerManager::Delegate {
virtual ~MockKeyUser() {}
- void OnKeyOpComplete(const OwnerManager::KeyOpCode return_code,
- const std::vector<uint8>& payload) {
- EXPECT_EQ(expected_, return_code);
- if (quit_on_callback_)
- MessageLoop::current()->Quit();
- }
+ virtual void OnKeyOpComplete(const OwnerManager::KeyOpCode return_code,
+ const std::vector<uint8>& payload);
const OwnerManager::KeyOpCode expected_;
const bool quit_on_callback_;
« no previous file with comments | « chrome/browser/chromeos/login/mock_owner_key_utils.cc ('k') | chrome/browser/chromeos/login/owner_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698