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

Side by Side Diff: chrome/browser/intents/web_intents_registry_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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/json/json_file_value_serializer.h" 8 #include "base/json/json_file_value_serializer.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 778
779 registry_.GetAllDefaultIntentServices( 779 registry_.GetAllDefaultIntentServices(
780 base::Bind(&DefaultServiceListConsumer::Accept, 780 base::Bind(&DefaultServiceListConsumer::Accept,
781 base::Unretained(&consumer))); 781 base::Unretained(&consumer)));
782 782
783 consumer.WaitForData(); 783 consumer.WaitForData();
784 784
785 ASSERT_EQ(2U, consumer.services_.size()); 785 ASSERT_EQ(2U, consumer.services_.size());
786 786
787 registry_.UnregisterServiceDefaults(service_url_0); 787 registry_.UnregisterServiceDefaults(service_url_0);
788 MessageLoop::current()->RunAllPending(); 788 MessageLoop::current()->RunUntilIdle();
789 789
790 registry_.GetAllDefaultIntentServices( 790 registry_.GetAllDefaultIntentServices(
791 base::Bind(&DefaultServiceListConsumer::Accept, 791 base::Bind(&DefaultServiceListConsumer::Accept,
792 base::Unretained(&consumer))); 792 base::Unretained(&consumer)));
793 793
794 consumer.WaitForData(); 794 consumer.WaitForData();
795 795
796 ASSERT_EQ(1U, consumer.services_.size()); 796 ASSERT_EQ(1U, consumer.services_.size());
797 EXPECT_EQ(service_url_1.spec(), consumer.services_[0].service_url); 797 EXPECT_EQ(service_url_1.spec(), consumer.services_[0].service_url);
798 } 798 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698