| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| 11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/browser/ui/login/login_handler.h" | 12 #include "chrome/browser/ui/login/login_handler.h" |
| 13 #include "chrome/browser/ui/login/login_handler_test_utils.h" | 13 #include "chrome/browser/ui/login/login_handler_test_utils.h" |
| 14 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 14 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 15 #include "chrome/test/base/in_process_browser_test.h" | 15 #include "chrome/test/base/in_process_browser_test.h" |
| 16 #include "chrome/test/base/ui_test_utils.h" | 16 #include "chrome/test/base/ui_test_utils.h" |
| 17 #include "content/public/browser/navigation_controller.h" | 17 #include "content/public/browser/navigation_controller.h" |
| 18 #include "content/public/browser/notification_details.h" | 18 #include "content/public/browser/notification_details.h" |
| 19 #include "content/public/browser/notification_registrar.h" | 19 #include "content/public/browser/notification_registrar.h" |
| 20 #include "content/public/browser/notification_source.h" | 20 #include "content/public/browser/notification_source.h" |
| 21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
| 22 #include "content/public/test/browser_test_utils.h" | 22 #include "content/public/test/browser_test_utils.h" |
| 23 #include "net/base/test_data_directory.h" | |
| 24 #include "net/test/embedded_test_server/embedded_test_server.h" | 23 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 25 #include "net/test/spawned_test_server/spawned_test_server.h" | 24 #include "net/test/spawned_test_server/spawned_test_server.h" |
| 25 #include "net/test/test_data_directory.h" |
| 26 #include "url/gurl.h" | 26 #include "url/gurl.h" |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 class WebSocketBrowserTest : public InProcessBrowserTest { | 30 class WebSocketBrowserTest : public InProcessBrowserTest { |
| 31 public: | 31 public: |
| 32 WebSocketBrowserTest() | 32 WebSocketBrowserTest() |
| 33 : ws_server_(net::SpawnedTestServer::TYPE_WS, | 33 : ws_server_(net::SpawnedTestServer::TYPE_WS, |
| 34 net::SpawnedTestServer::kLocalhost, | 34 net::SpawnedTestServer::kLocalhost, |
| 35 net::GetWebSocketTestDataDirectory()), | 35 net::GetWebSocketTestDataDirectory()), |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 // disallows connections to unencrypted WebSockets from encrypted pages. | 347 // disallows connections to unencrypted WebSockets from encrypted pages. |
| 348 GURL http_url = | 348 GURL http_url = |
| 349 http_server.GetURL("/websocket/check-hsts.html#" + ws_url.spec()); | 349 http_server.GetURL("/websocket/check-hsts.html#" + ws_url.spec()); |
| 350 | 350 |
| 351 ui_test_utils::NavigateToURL(browser(), http_url); | 351 ui_test_utils::NavigateToURL(browser(), http_url); |
| 352 | 352 |
| 353 EXPECT_EQ("PASS", WaitAndGetTitle()); | 353 EXPECT_EQ("PASS", WaitAndGetTitle()); |
| 354 } | 354 } |
| 355 | 355 |
| 356 } // namespace | 356 } // namespace |
| OLD | NEW |