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

Side by Side Diff: chrome/browser/media_gallery/media_galleries_preferences_unittest.cc

Issue 12095074: Media Galleries: Keep media gallery permission dialogs in sync with the gallery (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix nit Created 7 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // MediaGalleriesPreferences unit tests. 5 // MediaGalleriesPreferences unit tests.
6 6
7 #include "chrome/browser/media_gallery/media_galleries_preferences.h" 7 #include "chrome/browser/media_gallery/media_galleries_preferences.h"
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 public: 54 public:
55 explicit MockGalleryChangeObserver(MediaGalleriesPreferences* pref) 55 explicit MockGalleryChangeObserver(MediaGalleriesPreferences* pref)
56 : pref_(pref), 56 : pref_(pref),
57 notifications_(0) {} 57 notifications_(0) {}
58 virtual ~MockGalleryChangeObserver() {} 58 virtual ~MockGalleryChangeObserver() {}
59 59
60 int notifications() const { return notifications_;} 60 int notifications() const { return notifications_;}
61 61
62 private: 62 private:
63 // MediaGalleriesPreferences::GalleryChangeObserver implementation. 63 // MediaGalleriesPreferences::GalleryChangeObserver implementation.
64 virtual void OnGalleryChanged(MediaGalleriesPreferences* pref) OVERRIDE { 64 virtual void OnGalleryChanged(MediaGalleriesPreferences* pref,
65 const std::string& /*extension_id*/) OVERRIDE {
65 EXPECT_EQ(pref_, pref); 66 EXPECT_EQ(pref_, pref);
66 ++notifications_; 67 ++notifications_;
67 } 68 }
68 69
69 MediaGalleriesPreferences* pref_; 70 MediaGalleriesPreferences* pref_;
70 int notifications_; 71 int notifications_;
71 72
72 DISALLOW_COPY_AND_ASSIGN(MockGalleryChangeObserver); 73 DISALLOW_COPY_AND_ASSIGN(MockGalleryChangeObserver);
73 }; 74 };
74 75
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 expected_galleries_.erase(user_added_id); 638 expected_galleries_.erase(user_added_id);
638 expected_device_map[device_id].erase(user_added_id); 639 expected_device_map[device_id].erase(user_added_id);
639 640
640 EXPECT_EQ(2, observer1.notifications()); 641 EXPECT_EQ(2, observer1.notifications());
641 EXPECT_EQ(3, observer2.notifications()); 642 EXPECT_EQ(3, observer2.notifications());
642 } 643 }
643 644
644 } // namespace 645 } // namespace
645 646
646 } // namespace chrome 647 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698