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

Side by Side Diff: chrome/browser/extensions/api/socket/socket_apitest.cc

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 years, 7 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 "base/memory/ref_counted.h" 5 #include "base/memory/ref_counted.h"
6 #include "base/stringprintf.h" 6 #include "base/stringprintf.h"
7 #include "chrome/browser/extensions/api/socket/socket_api.h" 7 #include "chrome/browser/extensions/api/socket/socket_api.h"
8 #include "chrome/browser/extensions/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "chrome/browser/extensions/extension_function_test_utils.h" 9 #include "chrome/browser/extensions/extension_function_test_utils.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
11 #include "chrome/browser/extensions/extension_test_message_listener.h" 11 #include "chrome/browser/extensions/extension_test_message_listener.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/test/base/in_process_browser_test.h" 13 #include "chrome/test/base/in_process_browser_test.h"
14 #include "chrome/test/base/ui_test_utils.h" 14 #include "chrome/test/base/ui_test_utils.h"
15 #include "net/test/test_server.h" 15 #include "net/test/test_server.h"
16 16
17 using extensions::Extension;
18
17 namespace utils = extension_function_test_utils; 19 namespace utils = extension_function_test_utils;
18 20
19 namespace { 21 namespace {
20 22
21 const std::string kHostname = "127.0.0.1"; 23 const std::string kHostname = "127.0.0.1";
22 const int kPort = 8888; 24 const int kPort = 8888;
23 25
24 class SocketApiTest : public PlatformAppApiTest { 26 class SocketApiTest : public PlatformAppApiTest {
25 public: 27 public:
26 static std::string GenerateCreateFunctionArgs(const std::string& protocol, 28 static std::string GenerateCreateFunctionArgs(const std::string& protocol,
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 129
128 ExtensionTestMessageListener listener("info_please", true); 130 ExtensionTestMessageListener listener("info_please", true);
129 131
130 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("socket/api"))); 132 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("socket/api")));
131 EXPECT_TRUE(listener.WaitUntilSatisfied()); 133 EXPECT_TRUE(listener.WaitUntilSatisfied());
132 listener.Reply( 134 listener.Reply(
133 base::StringPrintf("tcp:%s:%d", host_port_pair.host().c_str(), port)); 135 base::StringPrintf("tcp:%s:%d", host_port_pair.host().c_str(), port));
134 136
135 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 137 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
136 } 138 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698