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

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

Issue 1395103003: Don't use base::MessageLoop::{Quit,QuitClosure} in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 <set> 5 #include <set>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 const std::string& status_text) { 659 const std::string& status_text) {
660 EXPECT_TRUE(PageContains("http://correction1/")); 660 EXPECT_TRUE(PageContains("http://correction1/"));
661 EXPECT_TRUE(PageContains("http://correction2/")); 661 EXPECT_TRUE(PageContains("http://correction2/"));
662 EXPECT_TRUE(PageContains(status_text)); 662 EXPECT_TRUE(PageContains(status_text));
663 } 663 }
664 664
665 void DnsProbeBrowserTest::OnDnsProbeStatusSent( 665 void DnsProbeBrowserTest::OnDnsProbeStatusSent(
666 DnsProbeStatus dns_probe_status) { 666 DnsProbeStatus dns_probe_status) {
667 dns_probe_status_queue_.push_back(dns_probe_status); 667 dns_probe_status_queue_.push_back(dns_probe_status);
668 if (awaiting_dns_probe_status_) 668 if (awaiting_dns_probe_status_)
669 MessageLoop::current()->Quit(); 669 MessageLoop::current()->QuitWhenIdle();
670 } 670 }
671 671
672 // Make sure probes don't break non-DNS error pages when corrections load. 672 // Make sure probes don't break non-DNS error pages when corrections load.
673 IN_PROC_BROWSER_TEST_F(DnsProbeBrowserTest, OtherErrorWithCorrectionsSuccess) { 673 IN_PROC_BROWSER_TEST_F(DnsProbeBrowserTest, OtherErrorWithCorrectionsSuccess) {
674 SetCorrectionServiceBroken(false); 674 SetCorrectionServiceBroken(false);
675 675
676 NavigateToOtherError(2); 676 NavigateToOtherError(2);
677 ExpectDisplayingCorrections("ERR_CONNECTION_REFUSED"); 677 ExpectDisplayingCorrections("ERR_CONNECTION_REFUSED");
678 } 678 }
679 679
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 989
990 EXPECT_EQ(error_page::DNS_PROBE_FINISHED_INCONCLUSIVE, 990 EXPECT_EQ(error_page::DNS_PROBE_FINISHED_INCONCLUSIVE,
991 WaitForSentStatus()); 991 WaitForSentStatus());
992 EXPECT_EQ(0, pending_status_count()); 992 EXPECT_EQ(0, pending_status_count());
993 ExpectDisplayingLocalErrorPage("ERR_NAME_NOT_RESOLVED"); 993 ExpectDisplayingLocalErrorPage("ERR_NAME_NOT_RESOLVED");
994 } 994 }
995 995
996 } // namespace 996 } // namespace
997 997
998 } // namespace chrome_browser_net 998 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/metrics/thread_watcher_unittest.cc ('k') | chrome/browser/net/predictor_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698