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

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_apitest.cc

Issue 1376593007: SSL in EmbeddedTestServer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing RunLoop and check. Created 5 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/guest_view/web_view/web_view_apitest.h" 5 #include "extensions/browser/guest_view/web_view/web_view_apitest.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 const char kRedirectResponsePath[] = "/server-redirect"; 43 const char kRedirectResponsePath[] = "/server-redirect";
44 const char kRedirectResponseFullPath[] = "/guest_redirect.html"; 44 const char kRedirectResponseFullPath[] = "/guest_redirect.html";
45 const char kUserAgentRedirectResponsePath[] = "/detect-user-agent"; 45 const char kUserAgentRedirectResponsePath[] = "/detect-user-agent";
46 const char kTestDataDirectory[] = "testDataDirectory"; 46 const char kTestDataDirectory[] = "testDataDirectory";
47 const char kTestServerPort[] = "testServer.port"; 47 const char kTestServerPort[] = "testServer.port";
48 const char kTestWebSocketPort[] = "testWebSocketPort"; 48 const char kTestWebSocketPort[] = "testWebSocketPort";
49 const char kSitePerProcess[] = "sitePerProcess"; 49 const char kSitePerProcess[] = "sitePerProcess";
50 50
51 class EmptyHttpResponse : public net::test_server::HttpResponse { 51 class EmptyHttpResponse : public net::test_server::HttpResponse {
52 public: 52 public:
53 std::string ToResponseString() const override { return std::string(); } 53 void SendResponse(
54 const net::test_server::SendBytesCallback& send,
55 const net::test_server::SendCompleteCallback& done) override {
56 send.Run("", done);
57 }
54 }; 58 };
55 59
56 // Handles |request| by serving a redirect response if the |User-Agent| is 60 // Handles |request| by serving a redirect response if the |User-Agent| is
57 // foobar. 61 // foobar.
58 static scoped_ptr<net::test_server::HttpResponse> UserAgentResponseHandler( 62 static scoped_ptr<net::test_server::HttpResponse> UserAgentResponseHandler(
59 const std::string& path, 63 const std::string& path,
60 const GURL& redirect_target, 64 const GURL& redirect_target,
61 const net::test_server::HttpRequest& request) { 65 const net::test_server::HttpRequest& request) {
62 if (!base::StartsWith(path, request.relative_url, 66 if (!base::StartsWith(path, request.relative_url,
63 base::CompareCase::SENSITIVE)) 67 base::CompareCase::SENSITIVE))
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 RunTest("testWebRequestAPIGoogleProperty", "web_view/apitest"); 733 RunTest("testWebRequestAPIGoogleProperty", "web_view/apitest");
730 } 734 }
731 735
732 // This test verifies that webview.contentWindow works inside an iframe 736 // This test verifies that webview.contentWindow works inside an iframe
733 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestWebViewInsideFrame) { 737 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestWebViewInsideFrame) {
734 LaunchApp("web_view/inside_iframe"); 738 LaunchApp("web_view/inside_iframe");
735 } 739 }
736 740
737 741
738 } // namespace extensions 742 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698