OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/base/ui_test_utils.h" | 8 #include "chrome/test/base/ui_test_utils.h" |
9 #include "net/base/mock_host_resolver.h" | 9 #include "net/base/mock_host_resolver.h" |
10 | 10 |
11 // Disabled, http://crbug.com/91058. | 11 // Disabled, http://crbug.com/91058. |
12 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_WebSocket) { | 12 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_WebSocket) { |
13 FilePath websocket_root_dir; | 13 // Gets layout tests root. For the current git workflow, this is |
14 PathService::Get(chrome::DIR_TEST_DATA, &websocket_root_dir); | 14 // third_party/WebKit/LayoutTests |
15 websocket_root_dir = websocket_root_dir.AppendASCII("layout_tests") | 15 // On svn workflow (including build machines) and older git workflow, this is |
16 .AppendASCII("LayoutTests"); | 16 // chrome/test/data/layout_tests/LayoutTests |
17 FilePath webkit_layout_tests; | |
18 PathService::Get(base::DIR_SOURCE_ROOT, &webkit_layout_tests); | |
Paweł Hajdan Jr.
2011/11/22 13:48:52
Check the return value, here and below.
Takashi Toyoshima
2011/11/22 13:56:59
Done.
| |
19 webkit_layout_tests = webkit_layout_tests.AppendASCII("third_party"); | |
20 webkit_layout_tests = webkit_layout_tests.AppendASCII("WebKit"); | |
21 webkit_layout_tests = webkit_layout_tests.AppendASCII("LayoutTests"); | |
22 if (!file_util::DirectoryExists(webkit_layout_tests)) { | |
23 PathService::Get(chrome::DIR_TEST_DATA, &webkit_layout_tests); | |
24 webkit_layout_tests = webkit_layout_tests.AppendASCII("layout_tests"); | |
25 webkit_layout_tests = webkit_layout_tests.AppendASCII("LayoutTests"); | |
26 } | |
27 | |
17 ui_test_utils::TestWebSocketServer server; | 28 ui_test_utils::TestWebSocketServer server; |
18 ASSERT_TRUE(server.Start(websocket_root_dir)); | 29 ASSERT_TRUE(server.Start(webkit_layout_tests)); |
19 ASSERT_TRUE(RunExtensionTest("websocket")) << message_; | 30 ASSERT_TRUE(RunExtensionTest("websocket")) << message_; |
20 } | 31 } |
OLD | NEW |