OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/memory/ref_counted.h" | 5 #include "base/memory/ref_counted.h" |
6 #include "base/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
7 #include "extensions/browser/api/system_network/system_network_api.h" | 7 #include "extensions/browser/api/system_network/system_network_api.h" |
8 #include "extensions/browser/api_test_utils.h" | 8 #include "extensions/browser/api_test_utils.h" |
9 #include "extensions/common/test_util.h" | 9 #include "extensions/common/test_util.h" |
10 #include "extensions/shell/test/shell_apitest.h" | 10 #include "extensions/shell/test/shell_apitest.h" |
11 #include "extensions/test/extension_test_message_listener.h" | 11 #include "extensions/test/extension_test_message_listener.h" |
12 | 12 |
13 using extensions::Extension; | 13 using extensions::Extension; |
14 using extensions::api_test_utils::RunFunctionAndReturnSingleResult; | 14 using extensions::api_test_utils::RunFunctionAndReturnSingleResult; |
15 using extensions::core_api::SystemNetworkGetNetworkInterfacesFunction; | 15 using extensions::api::SystemNetworkGetNetworkInterfacesFunction; |
16 using extensions::core_api::system_network::NetworkInterface; | 16 using extensions::api::system_network::NetworkInterface; |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 class SystemNetworkApiTest : public extensions::ShellApiTest {}; | 20 class SystemNetworkApiTest : public extensions::ShellApiTest {}; |
21 | 21 |
22 } // namespace | 22 } // namespace |
23 | 23 |
24 IN_PROC_BROWSER_TEST_F(SystemNetworkApiTest, SystemNetworkExtension) { | 24 IN_PROC_BROWSER_TEST_F(SystemNetworkApiTest, SystemNetworkExtension) { |
25 ASSERT_TRUE(RunAppTest("system/network")) << message_; | 25 ASSERT_TRUE(RunAppTest("system/network")) << message_; |
26 } | 26 } |
(...skipping 25 matching lines...) Expand all Loading... |
52 &network_interface)); | 52 &network_interface)); |
53 | 53 |
54 LOG(INFO) << "Network interface: address=" << network_interface.address | 54 LOG(INFO) << "Network interface: address=" << network_interface.address |
55 << ", name=" << network_interface.name | 55 << ", name=" << network_interface.name |
56 << ", prefix length=" << network_interface.prefix_length; | 56 << ", prefix length=" << network_interface.prefix_length; |
57 ASSERT_NE(std::string(), network_interface.address); | 57 ASSERT_NE(std::string(), network_interface.address); |
58 ASSERT_NE(std::string(), network_interface.name); | 58 ASSERT_NE(std::string(), network_interface.name); |
59 ASSERT_LE(0, network_interface.prefix_length); | 59 ASSERT_LE(0, network_interface.prefix_length); |
60 } | 60 } |
61 } | 61 } |
OLD | NEW |