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

Unified Diff: chrome/browser/extensions/api/socket/socket_apitest.cc

Issue 2021393004: Migrate WaitableEvent to enum-based constructor in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: Split out custom changes to thread_watcher_unittest.cc Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/socket/socket_apitest.cc
diff --git a/chrome/browser/extensions/api/socket/socket_apitest.cc b/chrome/browser/extensions/api/socket/socket_apitest.cc
index cb2ae769c5d2d7cd4c6d35f514952fb1a6c2e11f..c31b8af8b991bb260ed7e4ed76d8c6dc7aeeaa5e 100644
--- a/chrome/browser/extensions/api/socket/socket_apitest.cc
+++ b/chrome/browser/extensions/api/socket/socket_apitest.cc
@@ -22,15 +22,15 @@ using extensions::ResultCatcher;
namespace {
-const std::string kHostname = "127.0.0.1";
+const char kHostname[] = "127.0.0.1";
const int kPort = 8888;
class SocketApiTest : public ExtensionApiTest {
public:
- SocketApiTest() : resolver_event_(true, false),
- resolver_creator_(
- new extensions::MockHostResolverCreator()) {
- }
+ SocketApiTest()
+ : resolver_event_(base::WaitableEvent::ResetPolicy::MANUAL,
+ base::WaitableEvent::InitialState::NOT_SIGNALED),
+ resolver_creator_(new extensions::MockHostResolverCreator()) {}
void SetUpOnMainThread() override {
extensions::HostResolverWrapper::GetInstance()->SetHostResolverForTesting(
@@ -116,8 +116,7 @@ IN_PROC_BROWSER_TEST_F(SocketApiTest, SocketTCPServerExtension) {
ExtensionTestMessageListener listener("info_please", true);
ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("socket/api")));
EXPECT_TRUE(listener.WaitUntilSatisfied());
- listener.Reply(
- base::StringPrintf("tcp_server:%s:%d", kHostname.c_str(), kPort));
+ listener.Reply(base::StringPrintf("tcp_server:%s:%d", kHostname, kPort));
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
}
@@ -142,8 +141,7 @@ IN_PROC_BROWSER_TEST_F(SocketApiTest, SocketMulticast) {
ExtensionTestMessageListener listener("info_please", true);
ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("socket/api")));
EXPECT_TRUE(listener.WaitUntilSatisfied());
- listener.Reply(
- base::StringPrintf("multicast:%s:%d", kHostname.c_str(), kPort));
+ listener.Reply(base::StringPrintf("multicast:%s:%d", kHostname, kPort));
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
}

Powered by Google App Engine
This is Rietveld 408576698