| 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/memory/singleton.h" | 6 #include "base/memory/singleton.h" |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/strings/string_split.h" | 8 #include "base/strings/string_split.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 // Handles |request| by serving a redirect response. | 865 // Handles |request| by serving a redirect response. |
| 866 scoped_ptr<net::test_server::HttpResponse> RedirectResponseHandler( | 866 scoped_ptr<net::test_server::HttpResponse> RedirectResponseHandler( |
| 867 const std::string& path, | 867 const std::string& path, |
| 868 const GURL& redirect_target, | 868 const GURL& redirect_target, |
| 869 const net::test_server::HttpRequest& request) { | 869 const net::test_server::HttpRequest& request) { |
| 870 if (!StartsWithASCII(path, request.relative_url, true)) | 870 if (!StartsWithASCII(path, request.relative_url, true)) |
| 871 return scoped_ptr<net::test_server::HttpResponse>(); | 871 return scoped_ptr<net::test_server::HttpResponse>(); |
| 872 | 872 |
| 873 scoped_ptr<net::test_server::BasicHttpResponse> http_response( | 873 scoped_ptr<net::test_server::BasicHttpResponse> http_response( |
| 874 new net::test_server::BasicHttpResponse); | 874 new net::test_server::BasicHttpResponse); |
| 875 http_response->set_code(net::test_server::MOVED); | 875 http_response->set_code(net::HTTP_MOVED_PERMANENTLY); |
| 876 http_response->AddCustomHeader("Location", redirect_target.spec()); | 876 http_response->AddCustomHeader("Location", redirect_target.spec()); |
| 877 return http_response.PassAs<net::test_server::HttpResponse>(); | 877 return http_response.PassAs<net::test_server::HttpResponse>(); |
| 878 } | 878 } |
| 879 | 879 |
| 880 } // namespace | 880 } // namespace |
| 881 | 881 |
| 882 IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, LoadAbort) { | 882 IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, LoadAbort) { |
| 883 const char kEmbedderURL[] = "/browser_plugin_embedder.html"; | 883 const char kEmbedderURL[] = "/browser_plugin_embedder.html"; |
| 884 StartBrowserPluginTest(kEmbedderURL, "about:blank", true, std::string()); | 884 StartBrowserPluginTest(kEmbedderURL, "about:blank", true, std::string()); |
| 885 | 885 |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1470 // in the guest. | 1470 // in the guest. |
| 1471 IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, VerifyInputMethodActive) { | 1471 IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, VerifyInputMethodActive) { |
| 1472 const char* kEmbedderURL = "/browser_plugin_embedder.html"; | 1472 const char* kEmbedderURL = "/browser_plugin_embedder.html"; |
| 1473 StartBrowserPluginTest(kEmbedderURL, kHTMLForGuest, true, std::string()); | 1473 StartBrowserPluginTest(kEmbedderURL, kHTMLForGuest, true, std::string()); |
| 1474 RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>( | 1474 RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>( |
| 1475 test_guest()->web_contents()->GetRenderViewHost()); | 1475 test_guest()->web_contents()->GetRenderViewHost()); |
| 1476 EXPECT_TRUE(rvh->input_method_active()); | 1476 EXPECT_TRUE(rvh->input_method_active()); |
| 1477 } | 1477 } |
| 1478 | 1478 |
| 1479 } // namespace content | 1479 } // namespace content |
| OLD | NEW |