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

Side by Side Diff: extensions/browser/api/sockets_udp/sockets_udp_apitest.cc

Issue 598173003: Run clang-modernize -use-nullptr over src/extensions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/api/dns/host_resolver_wrapper.h" 5 #include "extensions/browser/api/dns/host_resolver_wrapper.h"
6 #include "extensions/browser/api/dns/mock_host_resolver_creator.h" 6 #include "extensions/browser/api/dns/mock_host_resolver_creator.h"
7 #include "extensions/browser/api/sockets_udp/sockets_udp_api.h" 7 #include "extensions/browser/api/sockets_udp/sockets_udp_api.h"
8 #include "extensions/browser/api_test_utils.h" 8 #include "extensions/browser/api_test_utils.h"
9 #include "extensions/common/extension.h" 9 #include "extensions/common/extension.h"
10 #include "extensions/common/test_util.h" 10 #include "extensions/common/test_util.h"
(...skipping 10 matching lines...) Expand all
21 socket_create_function( 21 socket_create_function(
22 new extensions::core_api::SocketsUdpCreateFunction()); 22 new extensions::core_api::SocketsUdpCreateFunction());
23 scoped_refptr<Extension> empty_extension = test_util::CreateEmptyExtension(); 23 scoped_refptr<Extension> empty_extension = test_util::CreateEmptyExtension();
24 24
25 socket_create_function->set_extension(empty_extension.get()); 25 socket_create_function->set_extension(empty_extension.get());
26 socket_create_function->set_has_callback(true); 26 socket_create_function->set_has_callback(true);
27 27
28 scoped_ptr<base::Value> result(RunFunctionAndReturnSingleResult( 28 scoped_ptr<base::Value> result(RunFunctionAndReturnSingleResult(
29 socket_create_function.get(), "[]", browser_context())); 29 socket_create_function.get(), "[]", browser_context()));
30 30
31 base::DictionaryValue* value = NULL; 31 base::DictionaryValue* value = nullptr;
32 ASSERT_TRUE(result->GetAsDictionary(&value)); 32 ASSERT_TRUE(result->GetAsDictionary(&value));
33 int socketId = -1; 33 int socketId = -1;
34 EXPECT_TRUE(value->GetInteger("socketId", &socketId)); 34 EXPECT_TRUE(value->GetInteger("socketId", &socketId));
35 ASSERT_TRUE(socketId > 0); 35 ASSERT_TRUE(socketId > 0);
36 } 36 }
37 37
38 } // namespace extensions 38 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698