| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |