Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: content/browser/browser_plugin/browser_plugin_host_browsertest.cc

Issue 16268017: GTTF: convert some tests in chrome to use EmbeddedTestServer patch nr 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 // Handles |request| by serving a redirect response. 726 // Handles |request| by serving a redirect response.
727 scoped_ptr<net::test_server::HttpResponse> RedirectResponseHandler( 727 scoped_ptr<net::test_server::HttpResponse> RedirectResponseHandler(
728 const std::string& path, 728 const std::string& path,
729 const GURL& redirect_target, 729 const GURL& redirect_target,
730 const net::test_server::HttpRequest& request) { 730 const net::test_server::HttpRequest& request) {
731 if (!StartsWithASCII(path, request.relative_url, true)) 731 if (!StartsWithASCII(path, request.relative_url, true))
732 return scoped_ptr<net::test_server::HttpResponse>(); 732 return scoped_ptr<net::test_server::HttpResponse>();
733 733
734 scoped_ptr<net::test_server::BasicHttpResponse> http_response( 734 scoped_ptr<net::test_server::BasicHttpResponse> http_response(
735 new net::test_server::BasicHttpResponse); 735 new net::test_server::BasicHttpResponse);
736 http_response->set_code(net::test_server::MOVED); 736 http_response->set_code(net::HTTP_MOVED_PERMANENTLY);
737 http_response->AddCustomHeader("Location", redirect_target.spec()); 737 http_response->AddCustomHeader("Location", redirect_target.spec());
738 return http_response.PassAs<net::test_server::HttpResponse>(); 738 return http_response.PassAs<net::test_server::HttpResponse>();
739 } 739 }
740 740
741 } // namespace 741 } // namespace
742 742
743 IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, LoadAbort) { 743 IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, LoadAbort) {
744 const char kEmbedderURL[] = "/browser_plugin_embedder.html"; 744 const char kEmbedderURL[] = "/browser_plugin_embedder.html";
745 StartBrowserPluginTest(kEmbedderURL, "about:blank", true, std::string()); 745 StartBrowserPluginTest(kEmbedderURL, "about:blank", true, std::string());
746 746
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1308 // in the guest. 1308 // in the guest.
1309 IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, VerifyInputMethodActive) { 1309 IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, VerifyInputMethodActive) {
1310 const char* kEmbedderURL = "/browser_plugin_embedder.html"; 1310 const char* kEmbedderURL = "/browser_plugin_embedder.html";
1311 StartBrowserPluginTest(kEmbedderURL, kHTMLForGuest, true, std::string()); 1311 StartBrowserPluginTest(kEmbedderURL, kHTMLForGuest, true, std::string());
1312 RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>( 1312 RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>(
1313 test_guest()->web_contents()->GetRenderViewHost()); 1313 test_guest()->web_contents()->GetRenderViewHost());
1314 EXPECT_TRUE(rvh->input_method_active()); 1314 EXPECT_TRUE(rvh->input_method_active());
1315 } 1315 }
1316 1316
1317 } // namespace content 1317 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698