OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/path_service.h" | 5 #include "base/path_service.h" |
6 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
7 #include "chrome/common/chrome_paths.h" | 7 #include "chrome/common/chrome_paths.h" |
8 #include "chrome/test/ui_test_utils.h" | 8 #include "chrome/test/ui_test_utils.h" |
9 #include "net/base/mock_host_resolver.h" | 9 #include "net/base/mock_host_resolver.h" |
10 | 10 |
11 #if defined(OS_MACOSX) | 11 #if defined(OS_MACOSX) |
12 // WebSocket test started timing out - suspect webkit roll from 67965->68051. | 12 // WebSocket test started timing out - suspect webkit roll from 67965->68051. |
13 // http://crbug.com/56596 | 13 // http://crbug.com/56596 |
14 #define MAYBE_WebSocket DISABLED_WebSocket | 14 #define MAYBE_WebSocket DISABLED_WebSocket |
15 #else | 15 #else |
16 #define MAYBE_WebSocket WebSocket | 16 #define MAYBE_WebSocket WebSocket |
17 #endif | 17 #endif |
18 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_WebSocket) { | 18 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_WebSocket) { |
19 FilePath websocket_root_dir; | 19 FilePath websocket_root_dir; |
20 PathService::Get(chrome::DIR_TEST_DATA, &websocket_root_dir); | 20 PathService::Get(chrome::DIR_TEST_DATA, &websocket_root_dir); |
21 websocket_root_dir = websocket_root_dir.AppendASCII("layout_tests") | 21 websocket_root_dir = websocket_root_dir.AppendASCII("layout_tests") |
22 .AppendASCII("LayoutTests"); | 22 .AppendASCII("LayoutTests"); |
23 ui_test_utils::TestWebSocketServer server(websocket_root_dir); | 23 ui_test_utils::TestWebSocketServer server; |
| 24 ASSERT_TRUE(server.Start(websocket_root_dir)); |
24 ASSERT_TRUE(RunExtensionTest("websocket")) << message_; | 25 ASSERT_TRUE(RunExtensionTest("websocket")) << message_; |
25 } | 26 } |
OLD | NEW |