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

Side by Side Diff: chrome/browser/extensions/api/media_galleries_private/media_galleries_private_apitest.cc

Issue 16703025: [StorageMonitor] Move StorageMonitor ownership to BrowserProcessImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 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 unified diff | Download patch
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 #include "base/strings/stringprintf.h" 5 #include "base/strings/stringprintf.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/browser/extensions/api/media_galleries_private/media_galleries_ private_api.h" 7 #include "chrome/browser/extensions/api/media_galleries_private/media_galleries_ private_api.h"
8 #include "chrome/browser/extensions/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 content::RunAllPendingInMessageLoop(); 101 content::RunAllPendingInMessageLoop();
102 } 102 }
103 103
104 private: 104 private:
105 std::string device_id_; 105 std::string device_id_;
106 106
107 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPrivateApiTest); 107 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPrivateApiTest);
108 }; 108 };
109 109
110 IN_PROC_BROWSER_TEST_F(MediaGalleriesPrivateApiTest, DeviceAttachDetachEvents) { 110 IN_PROC_BROWSER_TEST_F(MediaGalleriesPrivateApiTest, DeviceAttachDetachEvents) {
111 scoped_ptr<chrome::test::TestStorageMonitor> monitor(
112 chrome::test::TestStorageMonitor::CreateForBrowserTests());
113 monitor->Init();
114 monitor->MarkInitialized();
115
116 // Setup. 111 // Setup.
112 chrome::test::TestStorageMonitor::SyncInitialize();
vandebo (ex-Chrome) 2013/07/10 16:57:45 Why is the test storage monitor setup different in
Greg Billock 2013/07/10 21:11:16 The eject one needs the mock object (we check for
117 const extensions::Extension* extension = 113 const extensions::Extension* extension =
118 LoadExtension(test_data_dir_.AppendASCII(kTestExtensionPath)); 114 LoadExtension(test_data_dir_.AppendASCII(kTestExtensionPath));
119 ASSERT_TRUE(extension); 115 ASSERT_TRUE(extension);
120 116
121 content::RenderViewHost* host = 117 content::RenderViewHost* host =
122 extensions::ExtensionSystem::Get(browser()->profile())-> 118 extensions::ExtensionSystem::Get(browser()->profile())->
123 process_manager()->GetBackgroundHostForExtension(extension->id())-> 119 process_manager()->GetBackgroundHostForExtension(extension->id())->
124 render_view_host(); 120 render_view_host();
125 ASSERT_TRUE(host); 121 ASSERT_TRUE(host);
126 122
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 Attach(); 176 Attach();
181 EXPECT_TRUE(attach_finished_listener.WaitUntilSatisfied()); 177 EXPECT_TRUE(attach_finished_listener.WaitUntilSatisfied());
182 Detach(); 178 Detach();
183 EXPECT_TRUE(detach_finished_listener.WaitUntilSatisfied()); 179 EXPECT_TRUE(detach_finished_listener.WaitUntilSatisfied());
184 180
185 Attach(); 181 Attach();
186 EXPECT_TRUE(attach_finished_listener.WaitUntilSatisfied()); 182 EXPECT_TRUE(attach_finished_listener.WaitUntilSatisfied());
187 Detach(); 183 Detach();
188 EXPECT_TRUE(detach_finished_listener.WaitUntilSatisfied()); 184 EXPECT_TRUE(detach_finished_listener.WaitUntilSatisfied());
189 } 185 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698