OLD | NEW |
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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
7 #include "chrome/browser/extensions/extension_prefs.h" | 7 #include "chrome/browser/extensions/extension_prefs.h" |
8 #include "chrome/browser/extensions/extension_prefs_unittest.h" | 8 #include "chrome/browser/extensions/extension_prefs_unittest.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 permission.has_permission = has_access; | 26 permission.has_permission = has_access; |
27 vector->push_back(permission); | 27 vector->push_back(permission); |
28 } | 28 } |
29 | 29 |
30 } // namespace | 30 } // namespace |
31 | 31 |
32 // Test the MediaGalleries permissions functions. | 32 // Test the MediaGalleries permissions functions. |
33 class MediaGalleriesPermissionsTest : public extensions::ExtensionPrefsTest { | 33 class MediaGalleriesPermissionsTest : public extensions::ExtensionPrefsTest { |
34 protected: | 34 protected: |
35 MediaGalleriesPermissionsTest() | 35 MediaGalleriesPermissionsTest() |
36 : file_thread_(content::BrowserThread::FILE) { | 36 : extensions::ExtensionPrefsTest(NULL), |
| 37 file_thread_(content::BrowserThread::FILE) { |
37 } | 38 } |
38 virtual ~MediaGalleriesPermissionsTest() {} | 39 virtual ~MediaGalleriesPermissionsTest() {} |
39 | 40 |
40 // This is the same implementation as ExtensionPrefsTest::TearDown(), except | 41 // This is the same implementation as ExtensionPrefsTest::TearDown(), except |
41 // for also resetting the ExtensionPrefs used by |gallery_prefs_| after | 42 // for also resetting the ExtensionPrefs used by |gallery_prefs_| after |
42 // TestExtensionPrefs reconstructs them. | 43 // TestExtensionPrefs reconstructs them. |
43 virtual void TearDown() OVERRIDE { | 44 virtual void TearDown() OVERRIDE { |
44 Verify(); | 45 Verify(); |
45 | 46 |
46 // Reset ExtensionPrefs, and re-verify. | 47 // Reset ExtensionPrefs, and re-verify. |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 149 |
149 // Needed for |gallery_prefs_| to initialize correctly. | 150 // Needed for |gallery_prefs_| to initialize correctly. |
150 EnsureMediaDirectoriesExists ensure_media_directories_exists_; | 151 EnsureMediaDirectoriesExists ensure_media_directories_exists_; |
151 content::TestBrowserThread file_thread_; | 152 content::TestBrowserThread file_thread_; |
152 | 153 |
153 scoped_ptr<TestingProfile> profile_; | 154 scoped_ptr<TestingProfile> profile_; |
154 scoped_ptr<MediaGalleriesPreferences> gallery_prefs_; | 155 scoped_ptr<MediaGalleriesPreferences> gallery_prefs_; |
155 }; | 156 }; |
156 | 157 |
157 TEST_F(MediaGalleriesPermissionsTest, MediaGalleries) {} | 158 TEST_F(MediaGalleriesPermissionsTest, MediaGalleries) {} |
OLD | NEW |