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 "net/proxy/mojo_proxy_resolver_v8_tracing_bindings.h" | 5 #include "net/proxy/mojo_proxy_resolver_v8_tracing_bindings.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 private: | 45 private: |
46 DISALLOW_COPY_AND_ASSIGN(MojoProxyResolverV8TracingBindingsTest); | 46 DISALLOW_COPY_AND_ASSIGN(MojoProxyResolverV8TracingBindingsTest); |
47 }; | 47 }; |
48 | 48 |
49 TEST_F(MojoProxyResolverV8TracingBindingsTest, Basic) { | 49 TEST_F(MojoProxyResolverV8TracingBindingsTest, Basic) { |
50 bindings_->Alert(base::ASCIIToUTF16("alert")); | 50 bindings_->Alert(base::ASCIIToUTF16("alert")); |
51 bindings_->OnError(-1, base::ASCIIToUTF16("error")); | 51 bindings_->OnError(-1, base::ASCIIToUTF16("error")); |
52 | 52 |
53 EXPECT_TRUE(bindings_->GetHostResolver()); | 53 EXPECT_TRUE(bindings_->GetHostResolver()); |
54 EXPECT_FALSE(bindings_->GetBoundNetLog().net_log()); | 54 EXPECT_FALSE(bindings_->GetNetLogWithSource().net_log()); |
55 | 55 |
56 ASSERT_EQ(1u, alerts_.size()); | 56 ASSERT_EQ(1u, alerts_.size()); |
57 EXPECT_EQ("alert", alerts_[0]); | 57 EXPECT_EQ("alert", alerts_[0]); |
58 ASSERT_EQ(1u, errors_.size()); | 58 ASSERT_EQ(1u, errors_.size()); |
59 EXPECT_EQ(-1, errors_[0].first); | 59 EXPECT_EQ(-1, errors_[0].first); |
60 EXPECT_EQ("error", errors_[0].second); | 60 EXPECT_EQ("error", errors_[0].second); |
61 } | 61 } |
62 | 62 |
63 } // namespace net | 63 } // namespace net |
OLD | NEW |