OLD | NEW |
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 "ppapi/tests/test_host_resolver_private_disallowed.h" | 5 #include "ppapi/tests/test_host_resolver_private_disallowed.h" |
6 | 6 |
7 #include "ppapi/cpp/module.h" | 7 #include "ppapi/cpp/module.h" |
8 #include "ppapi/cpp/private/net_address_private.h" | 8 #include "ppapi/cpp/private/net_address_private.h" |
9 #include "ppapi/tests/test_utils.h" | 9 #include "ppapi/tests/test_utils.h" |
10 #include "ppapi/tests/testing_instance.h" | 10 #include "ppapi/tests/testing_instance.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 EnsureRunningOverHTTP(); | 32 EnsureRunningOverHTTP(); |
33 } | 33 } |
34 | 34 |
35 void TestHostResolverPrivateDisallowed::RunTests(const std::string& filter) { | 35 void TestHostResolverPrivateDisallowed::RunTests(const std::string& filter) { |
36 RUN_CALLBACK_TEST(TestHostResolverPrivateDisallowed, Resolve, filter); | 36 RUN_CALLBACK_TEST(TestHostResolverPrivateDisallowed, Resolve, filter); |
37 } | 37 } |
38 | 38 |
39 std::string TestHostResolverPrivateDisallowed::TestResolve() { | 39 std::string TestHostResolverPrivateDisallowed::TestResolve() { |
40 pp::HostResolverPrivate host_resolver(instance_); | 40 pp::HostResolverPrivate host_resolver(instance_); |
41 PP_HostResolver_Private_Hint hint; | 41 PP_HostResolver_Private_Hint hint; |
42 hint.family = PP_NETADDRESSFAMILY_UNSPECIFIED; | 42 hint.family = PP_NETADDRESSFAMILY_PRIVATE_UNSPECIFIED; |
43 hint.flags = PP_HOST_RESOLVER_FLAGS_CANONNAME; | 43 hint.flags = PP_HOST_RESOLVER_PRIVATE_FLAGS_CANONNAME; |
44 TestCompletionCallback callback(instance_->pp_instance(), callback_type()); | 44 TestCompletionCallback callback(instance_->pp_instance(), callback_type()); |
45 callback.WaitForResult( | 45 callback.WaitForResult( |
46 host_resolver.Resolve(host_, port_, hint, callback.GetCallback())); | 46 host_resolver.Resolve(host_, port_, hint, callback.GetCallback())); |
47 CHECK_CALLBACK_BEHAVIOR(callback); | 47 CHECK_CALLBACK_BEHAVIOR(callback); |
48 ASSERT_EQ(PP_ERROR_FAILED, callback.result()); | 48 ASSERT_EQ(PP_ERROR_FAILED, callback.result()); |
49 PASS(); | 49 PASS(); |
50 } | 50 } |
OLD | NEW |