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

Side by Side Diff: chrome/browser/ui/search/instant_extended_interactive_uitest.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 <sstream> 5 #include <sstream>
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/metrics/histogram_base.h" 9 #include "base/metrics/histogram_base.h"
10 #include "base/metrics/histogram_samples.h" 10 #include "base/metrics/histogram_samples.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // for use with BlockUntilHistoryProcessesPendingRequests. 88 // for use with BlockUntilHistoryProcessesPendingRequests.
89 class QuittingHistoryDBTask : public history::HistoryDBTask { 89 class QuittingHistoryDBTask : public history::HistoryDBTask {
90 public: 90 public:
91 QuittingHistoryDBTask() {} 91 QuittingHistoryDBTask() {}
92 92
93 bool RunOnDBThread(history::HistoryBackend* backend, 93 bool RunOnDBThread(history::HistoryBackend* backend,
94 history::HistoryDatabase* db) override { 94 history::HistoryDatabase* db) override {
95 return true; 95 return true;
96 } 96 }
97 97
98 void DoneRunOnMainThread() override { base::MessageLoop::current()->Quit(); } 98 void DoneRunOnMainThread() override {
99 base::MessageLoop::current()->QuitWhenIdle();
100 }
99 101
100 private: 102 private:
101 ~QuittingHistoryDBTask() override {} 103 ~QuittingHistoryDBTask() override {}
102 104
103 DISALLOW_COPY_AND_ASSIGN(QuittingHistoryDBTask); 105 DISALLOW_COPY_AND_ASSIGN(QuittingHistoryDBTask);
104 }; 106 };
105 107
106 class FakeNetworkChangeNotifier : public net::NetworkChangeNotifier { 108 class FakeNetworkChangeNotifier : public net::NetworkChangeNotifier {
107 public: 109 public:
108 FakeNetworkChangeNotifier() : connection_type_(CONNECTION_NONE) {} 110 FakeNetworkChangeNotifier() : connection_type_(CONNECTION_NONE) {}
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 stream << "link.href = \"" << result_url.spec() << "\";"; 1005 stream << "link.href = \"" << result_url.spec() << "\";";
1004 stream << "document.body.appendChild(link);"; 1006 stream << "document.body.appendChild(link);";
1005 stream << "link.click();"; 1007 stream << "link.click();";
1006 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); 1008 EXPECT_TRUE(content::ExecuteScript(contents, stream.str()));
1007 1009
1008 content::WaitForLoadStop(contents); 1010 content::WaitForLoadStop(contents);
1009 std::string expected_title = 1011 std::string expected_title =
1010 "Referrer is " + instant_url().GetWithEmptyPath().spec(); 1012 "Referrer is " + instant_url().GetWithEmptyPath().spec();
1011 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); 1013 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle());
1012 } 1014 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_view_browsertest.cc ('k') | chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698