extension_websocket_apitest.cc revision 3345a6884c488ff3a535c2c9acdd33d74b37e311
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
3// found in the LICENSE file.
4
5#include "base/path_service.h"
6#include "chrome/browser/extensions/extension_apitest.h"
7#include "chrome/common/chrome_paths.h"
8#include "chrome/test/ui_test_utils.h"
9#include "net/base/mock_host_resolver.h"
10
11#if defined(OS_MACOSX)
12// WebSocket test started timing out - suspect webkit roll from 67965->68051.
13// http://crbug.com/56596
14#define MAYBE_WebSocket DISABLED_WebSocket
15#else
16#define MAYBE_WebSocket WebSocket
17#endif
18IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_WebSocket) {
19  FilePath websocket_root_dir;
20  PathService::Get(chrome::DIR_TEST_DATA, &websocket_root_dir);
21  websocket_root_dir = websocket_root_dir.AppendASCII("layout_tests")
22      .AppendASCII("LayoutTests");
23  ui_test_utils::TestWebSocketServer server(websocket_root_dir);
24  ASSERT_TRUE(RunExtensionTest("websocket")) << message_;
25}
26