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

Side by Side Diff: content/browser/message_port_provider_browsertest.cc

Issue 2026253003: Migrate WaitableEvent to enum-based constructor in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/macros.h" 6 #include "base/macros.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/synchronization/waitable_event.h" 8 #include "base/synchronization/waitable_event.h"
9 #include "content/browser/message_port_service.h" 9 #include "content/browser/message_port_service.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 EXPECT_EQ(received[1].sent_ports[0], port3); 127 EXPECT_EQ(received[1].sent_ports[0], port3);
128 128
129 event->Signal(); 129 event->Signal();
130 } 130 }
131 131
132 } // namespace 132 } // namespace
133 133
134 // Verify that a message channel can be created and used for exchanging 134 // Verify that a message channel can be created and used for exchanging
135 // messages. 135 // messages.
136 IN_PROC_BROWSER_TEST_F(MessagePortProviderBrowserTest, CreateChannel) { 136 IN_PROC_BROWSER_TEST_F(MessagePortProviderBrowserTest, CreateChannel) {
137 base::WaitableEvent event(true, false); 137 base::WaitableEvent event(base::WaitableEvent::ResetPolicy::MANUAL,
138 base::WaitableEvent::InitialState::NOT_SIGNALED);
138 BrowserThread::PostTask( 139 BrowserThread::PostTask(
139 BrowserThread::IO, FROM_HERE, 140 BrowserThread::IO, FROM_HERE,
140 base::Bind(&VerifyCreateChannelOnIOThread, &event)); 141 base::Bind(&VerifyCreateChannelOnIOThread, &event));
141 event.Wait(); 142 event.Wait();
142 } 143 }
143 144
144 } // namespace content 145 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698