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

Side by Side Diff: chrome/browser/net/dns_probe_browsertest.cc

Issue 2083363002: Remove calls to deprecated MessageLoop methods in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 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 <memory> 5 #include <memory>
6 #include <set> 6 #include <set>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 BrowserThread::IO, FROM_HERE, 599 BrowserThread::IO, FROM_HERE,
600 Bind(&DnsProbeBrowserTestIOThreadHelper::StartDelayedProbes, 600 Bind(&DnsProbeBrowserTestIOThreadHelper::StartDelayedProbes,
601 Unretained(helper_), 601 Unretained(helper_),
602 expected_delayed_probe_count)); 602 expected_delayed_probe_count));
603 } 603 }
604 604
605 DnsProbeStatus DnsProbeBrowserTest::WaitForSentStatus() { 605 DnsProbeStatus DnsProbeBrowserTest::WaitForSentStatus() {
606 CHECK(!awaiting_dns_probe_status_); 606 CHECK(!awaiting_dns_probe_status_);
607 while (dns_probe_status_queue_.empty()) { 607 while (dns_probe_status_queue_.empty()) {
608 awaiting_dns_probe_status_ = true; 608 awaiting_dns_probe_status_ = true;
609 MessageLoop::current()->Run(); 609 base::RunLoop().Run();
610 awaiting_dns_probe_status_ = false; 610 awaiting_dns_probe_status_ = false;
611 } 611 }
612 612
613 CHECK(!dns_probe_status_queue_.empty()); 613 CHECK(!dns_probe_status_queue_.empty());
614 DnsProbeStatus status = dns_probe_status_queue_.front(); 614 DnsProbeStatus status = dns_probe_status_queue_.front();
615 dns_probe_status_queue_.pop_front(); 615 dns_probe_status_queue_.pop_front();
616 return status; 616 return status;
617 } 617 }
618 618
619 // Check title by roundtripping to renderer, to make sure any probe results 619 // Check title by roundtripping to renderer, to make sure any probe results
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 984
985 EXPECT_EQ(error_page::DNS_PROBE_FINISHED_INCONCLUSIVE, 985 EXPECT_EQ(error_page::DNS_PROBE_FINISHED_INCONCLUSIVE,
986 WaitForSentStatus()); 986 WaitForSentStatus());
987 EXPECT_EQ(0, pending_status_count()); 987 EXPECT_EQ(0, pending_status_count());
988 ExpectDisplayingLocalErrorPage("ERR_NAME_NOT_RESOLVED"); 988 ExpectDisplayingLocalErrorPage("ERR_NAME_NOT_RESOLVED");
989 } 989 }
990 990
991 } // namespace 991 } // namespace
992 992
993 } // namespace chrome_browser_net 993 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/media_galleries/media_galleries_permissions_unittest.cc ('k') | chrome/browser/net/predictor_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698