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

Unified Diff: chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller_unittest.mm

Issue 10808068: Store ChromeToMobile device list and timestamp prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add GetMobiles ownership/lifetime comment. Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller_unittest.mm
index 4c922c360a325608f756f1b76cebcac201fd50e7..c1efcb27c6949562d5d6d85d19bfbe6ec5fd93f6 100644
--- a/chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller_unittest.mm
@@ -16,6 +16,9 @@ class MockChromeToMobileService : public ChromeToMobileService {
// A utility function to add mock devices.
void AddDevices(size_t count);
+ // ChromeToMobileService overrides:
+ virtual const base::ListValue* GetMobiles() const OVERRIDE;
+
MOCK_METHOD0(RequestMobileListUpdate, void());
MOCK_METHOD2(GenerateSnapshot, void(Browser* browser,
base::WeakPtr<Observer> observer));
@@ -25,6 +28,9 @@ class MockChromeToMobileService : public ChromeToMobileService {
base::WeakPtr<Observer> observer));
MOCK_METHOD1(DeleteSnapshot, void(const FilePath& snapshot));
MOCK_CONST_METHOD1(LogMetric, void(ChromeToMobileService::Metric));
+
+ // A set of mock mobile devices, kept in lieu of the list in profile prefs.
+ base::ListValue mobiles_;
};
void MockChromeToMobileService::AddDevices(size_t count) {
@@ -35,6 +41,10 @@ void MockChromeToMobileService::AddDevices(size_t count) {
}
}
+const base::ListValue* MockChromeToMobileService::GetMobiles() const {
+ return &mobiles_;
+}
+
namespace {
class ChromeToMobileBubbleControllerTest : public CocoaTest {

Powered by Google App Engine
This is Rietveld 408576698