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

Side by Side Diff: chrome/browser/webdata/web_data_service_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
« no previous file with comments | « chrome/browser/value_store/value_store_frontend_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 s1.user_date = 1; 812 s1.user_date = 1;
813 s1.suppression = 4; 813 s1.suppression = 4;
814 s1.service_url = service_url_1.spec(); 814 s1.service_url = service_url_1.spec();
815 wds_->AddDefaultWebIntentService(s1); 815 wds_->AddDefaultWebIntentService(s1);
816 816
817 wds_->GetAllDefaultWebIntentServices(&consumer); 817 wds_->GetAllDefaultWebIntentServices(&consumer);
818 WaitUntilCalled(); 818 WaitUntilCalled();
819 ASSERT_EQ(2U, consumer.services_.size()); 819 ASSERT_EQ(2U, consumer.services_.size());
820 820
821 wds_->RemoveWebIntentServiceDefaults(service_url_0); 821 wds_->RemoveWebIntentServiceDefaults(service_url_0);
822 MessageLoop::current()->RunAllPending(); 822 MessageLoop::current()->RunUntilIdle();
823 823
824 wds_->GetAllDefaultWebIntentServices(&consumer); 824 wds_->GetAllDefaultWebIntentServices(&consumer);
825 WaitUntilCalled(); 825 WaitUntilCalled();
826 ASSERT_EQ(1U, consumer.services_.size()); 826 ASSERT_EQ(1U, consumer.services_.size());
827 EXPECT_EQ(service_url_1.spec(), consumer.services_[0].service_url); 827 EXPECT_EQ(service_url_1.spec(), consumer.services_[0].service_url);
828 } 828 }
829 829
830 TEST_F(WebDataServiceTest, DidDefaultSearchProviderChangeOnNewProfile) { 830 TEST_F(WebDataServiceTest, DidDefaultSearchProviderChangeOnNewProfile) {
831 KeywordsConsumer consumer; 831 KeywordsConsumer consumer;
832 wds_->GetKeywords(&consumer); 832 wds_->GetKeywords(&consumer);
833 WaitUntilCalled(); 833 WaitUntilCalled();
834 ASSERT_TRUE(consumer.load_succeeded); 834 ASSERT_TRUE(consumer.load_succeeded);
835 EXPECT_FALSE(consumer.keywords_result.did_default_search_provider_change); 835 EXPECT_FALSE(consumer.keywords_result.did_default_search_provider_change);
836 EXPECT_FALSE(consumer.keywords_result.backup_valid); 836 EXPECT_FALSE(consumer.keywords_result.backup_valid);
837 } 837 }
OLDNEW
« no previous file with comments | « chrome/browser/value_store/value_store_frontend_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698