OLD | NEW |
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/string_util.h" | 5 #include "base/string_util.h" |
6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 8 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
9 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
10 #include "chrome/test/base/ui_test_utils.h" | 10 #include "chrome/test/base/ui_test_utils.h" |
11 #include "content/public/test/browser_test_utils.h" | 11 #include "content/public/test/browser_test_utils.h" |
12 #include "net/base/test_data_directory.h" | 12 #include "net/base/test_data_directory.h" |
13 #include "net/test/test_server.h" | 13 #include "net/test/test_server.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 class WebSocketBrowserTest : public InProcessBrowserTest { | 17 class WebSocketBrowserTest : public InProcessBrowserTest { |
18 public: | 18 public: |
19 WebSocketBrowserTest() | 19 WebSocketBrowserTest() |
20 : ws_server_(net::TestServer::TYPE_WS, | 20 : ws_server_(net::TestServer::TYPE_WS, |
21 net::TestServer::kLocalhost, | 21 net::TestServer::kLocalhost, |
22 net::GetWebSocketTestDataDirectory()), | 22 net::TestServer::GetSourceRelativePath( |
| 23 net::GetWebSocketTestDataDirectory())), |
23 wss_server_(net::TestServer::TYPE_WSS, | 24 wss_server_(net::TestServer::TYPE_WSS, |
24 SSLOptions(SSLOptions::CERT_OK), | 25 SSLOptions(SSLOptions::CERT_OK), |
25 net::GetWebSocketTestDataDirectory()) { | 26 net::TestServer::GetSourceRelativePath( |
| 27 net::GetWebSocketTestDataDirectory())) { |
26 } | 28 } |
27 | 29 |
28 protected: | 30 protected: |
29 net::TestServer ws_server_; | 31 net::TestServer ws_server_; |
30 net::TestServer wss_server_; | 32 net::TestServer wss_server_; |
31 | 33 |
32 private: | 34 private: |
33 typedef net::TestServer::SSLOptions SSLOptions; | 35 typedef net::TestServer::SSLOptions SSLOptions; |
34 | 36 |
35 DISALLOW_COPY_AND_ASSIGN(WebSocketBrowserTest); | 37 DISALLOW_COPY_AND_ASSIGN(WebSocketBrowserTest); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 ui_test_utils::NavigateToURL( | 81 ui_test_utils::NavigateToURL( |
80 browser(), | 82 browser(), |
81 wss_server_.GetURL( | 83 wss_server_.GetURL( |
82 "split_packet_check.html").ReplaceComponents(replacements)); | 84 "split_packet_check.html").ReplaceComponents(replacements)); |
83 | 85 |
84 const string16 result = watcher.WaitAndGetTitle(); | 86 const string16 result = watcher.WaitAndGetTitle(); |
85 EXPECT_TRUE(EqualsASCII(result, "PASS")); | 87 EXPECT_TRUE(EqualsASCII(result, "PASS")); |
86 } | 88 } |
87 | 89 |
88 } // namespace | 90 } // namespace |
OLD | NEW |