Chromium Code Reviews| Index: chrome/browser/extensions/api/socket/socket_apitest.cc |
| diff --git a/chrome/browser/extensions/api/socket/socket_apitest.cc b/chrome/browser/extensions/api/socket/socket_apitest.cc |
| index 2124eb3c3e4ba24da76446032f18c0cd44f47c22..2e8d3f3a582d484bfe1dc86cc553d0f14c03cb64 100644 |
| --- a/chrome/browser/extensions/api/socket/socket_apitest.cc |
| +++ b/chrome/browser/extensions/api/socket/socket_apitest.cc |
| @@ -12,6 +12,7 @@ |
| #include "chrome/browser/extensions/extension_service.h" |
| #include "chrome/browser/extensions/extension_test_message_listener.h" |
| #include "chrome/browser/ui/browser.h" |
| +#include "chrome/common/chrome_switches.h" |
| #include "chrome/test/base/in_process_browser_test.h" |
| #include "chrome/test/base/ui_test_utils.h" |
| #include "net/base/mock_host_resolver.h" |
| @@ -26,13 +27,21 @@ namespace { |
| const std::string kHostname = "127.0.0.1"; |
| const int kPort = 8888; |
| -class SocketApiTest : public PlatformAppApiTest { |
| +class SocketApiTest : public ExtensionApiTest { |
| public: |
| SocketApiTest() : resolver_event_(true, false), |
| resolver_creator_( |
| new extensions::MockHostResolverCreator()) { |
| } |
| + // We need this while the socket.{listen,accept} methods require the |
| + // enable-experimental-extension-apis flag. After that we should remote it, |
|
miket_OOO
2012/10/15 21:38:26
remove (spelling, not imperative)
|
| + // as well as the "experimental" permission in the test apps' manifests. |
| + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| + ExtensionApiTest::SetUpCommandLine(command_line); |
| + command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); |
| + } |
| + |
| void SetUpOnMainThread() OVERRIDE { |
| extensions::HostResolverWrapper::GetInstance()->SetHostResolverForTesting( |
| resolver_creator_->CreateMockHostResolver()); |