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

Side by Side Diff: chrome/browser/signin/easy_unlock_app_manager_unittest.cc

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/signin/easy_unlock_app_manager.h" 5 #include "chrome/browser/signin/easy_unlock_app_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 void OnExtensionLoaded(content::BrowserContext* browser_context, 106 void OnExtensionLoaded(content::BrowserContext* browser_context,
107 const extensions::Extension* extension) override { 107 const extensions::Extension* extension) override {
108 ASSERT_FALSE(loaded_); 108 ASSERT_FALSE(loaded_);
109 ASSERT_EQ(extension_id_, extension->id()); 109 ASSERT_EQ(extension_id_, extension->id());
110 loaded_ = true; 110 loaded_ = true;
111 } 111 }
112 112
113 void OnExtensionUnloaded( 113 void OnExtensionUnloaded(
114 content::BrowserContext* browser_context, 114 content::BrowserContext* browser_context,
115 const extensions::Extension* extension, 115 const extensions::Extension* extension,
116 extensions::UnloadedExtensionInfo::Reason reason) override { 116 extensions::UnloadedExtensionReason reason) override {
117 ASSERT_FALSE(unloaded_); 117 ASSERT_FALSE(unloaded_);
118 ASSERT_EQ(extension_id_, extension->id()); 118 ASSERT_EQ(extension_id_, extension->id());
119 unloaded_ = true; 119 unloaded_ = true;
120 } 120 }
121 121
122 // Whether the extensino was unloaded and loaded during |this| lifetime. 122 // Whether the extensino was unloaded and loaded during |this| lifetime.
123 bool HasReloaded() const { return loaded_ && unloaded_; } 123 bool HasReloaded() const { return loaded_ && unloaded_; }
124 124
125 private: 125 private:
126 Profile* profile_; 126 Profile* profile_;
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 extension_misc::kEasyUnlockAppId); 635 extension_misc::kEasyUnlockAppId);
636 app_manager_->DisableAppIfLoaded(); 636 app_manager_->DisableAppIfLoaded();
637 637
638 ASSERT_EQ(0u, event_consumer_.auth_attempted_count()); 638 ASSERT_EQ(0u, event_consumer_.auth_attempted_count());
639 639
640 EXPECT_FALSE(app_manager_->SendAuthAttemptEvent()); 640 EXPECT_FALSE(app_manager_->SendAuthAttemptEvent());
641 EXPECT_EQ(0u, event_consumer_.auth_attempted_count()); 641 EXPECT_EQ(0u, event_consumer_.auth_attempted_count());
642 } 642 }
643 643
644 } // namespace 644 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698