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

Side by Side Diff: chrome/browser/extensions/extension_messages_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, 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 CanConnectAndSendMessagesToIFrame(extension.get())); 1015 CanConnectAndSendMessagesToIFrame(extension.get()));
1016 EXPECT_FALSE(AreAnyNonWebApisDefinedForIFrame()); 1016 EXPECT_FALSE(AreAnyNonWebApisDefinedForIFrame());
1017 } 1017 }
1018 1018
1019 // Tests externally_connectable between a web page and an extension with a 1019 // Tests externally_connectable between a web page and an extension with a
1020 // TLS channel ID created for the origin. 1020 // TLS channel ID created for the origin.
1021 class ExternallyConnectableMessagingWithTlsChannelIdTest : 1021 class ExternallyConnectableMessagingWithTlsChannelIdTest :
1022 public ExternallyConnectableMessagingTest { 1022 public ExternallyConnectableMessagingTest {
1023 public: 1023 public:
1024 ExternallyConnectableMessagingWithTlsChannelIdTest() 1024 ExternallyConnectableMessagingWithTlsChannelIdTest()
1025 : tls_channel_id_created_(false, false) { 1025 : tls_channel_id_created_(
1026 } 1026 base::WaitableEvent::ResetPolicy::AUTOMATIC,
1027 base::WaitableEvent::InitialState::NOT_SIGNALED) {}
1027 1028
1028 std::string CreateTlsChannelId() { 1029 std::string CreateTlsChannelId() {
1029 scoped_refptr<net::URLRequestContextGetter> request_context_getter( 1030 scoped_refptr<net::URLRequestContextGetter> request_context_getter(
1030 profile()->GetRequestContext()); 1031 profile()->GetRequestContext());
1031 std::unique_ptr<crypto::ECPrivateKey> channel_id_key; 1032 std::unique_ptr<crypto::ECPrivateKey> channel_id_key;
1032 net::ChannelIDService::Request request; 1033 net::ChannelIDService::Request request;
1033 content::BrowserThread::PostTask( 1034 content::BrowserThread::PostTask(
1034 content::BrowserThread::IO, FROM_HERE, 1035 content::BrowserThread::IO, FROM_HERE,
1035 base::Bind(&ExternallyConnectableMessagingWithTlsChannelIdTest:: 1036 base::Bind(&ExternallyConnectableMessagingWithTlsChannelIdTest::
1036 CreateDomainBoundCertOnIOThread, 1037 CreateDomainBoundCertOnIOThread,
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 ui_test_utils::NavigateToURL(browser(), chromium_org_url()); 1251 ui_test_utils::NavigateToURL(browser(), chromium_org_url());
1251 EXPECT_EQ(COULD_NOT_ESTABLISH_CONNECTION_ERROR, 1252 EXPECT_EQ(COULD_NOT_ESTABLISH_CONNECTION_ERROR,
1252 CanConnectAndSendMessagesToMainFrame(invalid.get())); 1253 CanConnectAndSendMessagesToMainFrame(invalid.get()));
1253 } 1254 }
1254 1255
1255 #endif // !defined(OS_WIN) - http://crbug.com/350517. 1256 #endif // !defined(OS_WIN) - http://crbug.com/350517.
1256 1257
1257 } // namespace 1258 } // namespace
1258 1259
1259 }; // namespace extensions 1260 }; // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698