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

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

Issue 11413050: chrome/browser: Update calls from RunAllPending() to RunUntilIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 file_thread_(content::BrowserThread::FILE, &loop_), 59 file_thread_(content::BrowserThread::FILE, &loop_),
60 profile_(new TestingProfile()), 60 profile_(new TestingProfile()),
61 default_galleries_count_(0) { 61 default_galleries_count_(0) {
62 MediaStorageUtilTest::SetTestingMode(); 62 MediaStorageUtilTest::SetTestingMode();
63 } 63 }
64 64
65 virtual ~MediaGalleriesPreferencesTest() { 65 virtual ~MediaGalleriesPreferencesTest() {
66 // TestExtensionSystem uses DeleteSoon, so we need to delete the profile 66 // TestExtensionSystem uses DeleteSoon, so we need to delete the profile
67 // and then run the message queue to clean up. 67 // and then run the message queue to clean up.
68 profile_.reset(); 68 profile_.reset();
69 MessageLoop::current()->RunAllPending(); 69 MessageLoop::current()->RunUntilIdle();
70 } 70 }
71 71
72 virtual void SetUp() OVERRIDE { 72 virtual void SetUp() OVERRIDE {
73 extensions::TestExtensionSystem* extension_system( 73 extensions::TestExtensionSystem* extension_system(
74 static_cast<extensions::TestExtensionSystem*>( 74 static_cast<extensions::TestExtensionSystem*>(
75 extensions::ExtensionSystem::Get(profile_.get()))); 75 extensions::ExtensionSystem::Get(profile_.get())));
76 extension_system->CreateExtensionService( 76 extension_system->CreateExtensionService(
77 CommandLine::ForCurrentProcess(), FilePath(), false); 77 CommandLine::ForCurrentProcess(), FilePath(), false);
78 78
79 gallery_prefs_.reset(new MediaGalleriesPreferences(profile_.get())); 79 gallery_prefs_.reset(new MediaGalleriesPreferences(profile_.get()));
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 // Check that adding one of them again works as expected. 555 // Check that adding one of them again works as expected.
556 MediaGalleryPrefId id = gallery_prefs()->AddGallery( 556 MediaGalleryPrefId id = gallery_prefs()->AddGallery(
557 device_id, device_name, relative_path, true /*user*/); 557 device_id, device_name, relative_path, true /*user*/);
558 EXPECT_EQ(dev2_path2_id, id); 558 EXPECT_EQ(dev2_path2_id, id);
559 Verify(); 559 Verify();
560 } 560 }
561 561
562 } // namespace 562 } // namespace
563 563
564 } // namespace chrome 564 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698