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

Side by Side Diff: chrome/browser/apps/guest_view/web_view_browsertest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <queue> 5 #include <queue>
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/process/process.h" 9 #include "base/process/process.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 namespace { 109 namespace {
110 const char kEmptyResponsePath[] = "/close-socket"; 110 const char kEmptyResponsePath[] = "/close-socket";
111 const char kRedirectResponsePath[] = "/server-redirect"; 111 const char kRedirectResponsePath[] = "/server-redirect";
112 const char kUserAgentRedirectResponsePath[] = "/detect-user-agent"; 112 const char kUserAgentRedirectResponsePath[] = "/detect-user-agent";
113 const char kCacheResponsePath[] = "/cache-control-response"; 113 const char kCacheResponsePath[] = "/cache-control-response";
114 const char kRedirectResponseFullPath[] = 114 const char kRedirectResponseFullPath[] =
115 "/extensions/platform_apps/web_view/shim/guest_redirect.html"; 115 "/extensions/platform_apps/web_view/shim/guest_redirect.html";
116 116
117 class EmptyHttpResponse : public net::test_server::HttpResponse { 117 class EmptyHttpResponse : public net::test_server::HttpResponse {
118 public: 118 public:
119 std::string ToResponseString() const override { return std::string(); } 119 void SendResponse(
120 const net::test_server::SendBytesCallback& send,
121 const net::test_server::SendCompleteCallback& done) override {
122 send.Run("", done);
123 }
120 }; 124 };
mmenke 2015/10/22 19:28:27 optional: Maybe just use CustomHttpResponse("", "
svaldez 2015/10/22 20:00:17 Done.
121 125
122 class TestInterstitialPageDelegate : public content::InterstitialPageDelegate { 126 class TestInterstitialPageDelegate : public content::InterstitialPageDelegate {
123 public: 127 public:
124 TestInterstitialPageDelegate() { 128 TestInterstitialPageDelegate() {
125 } 129 }
126 ~TestInterstitialPageDelegate() override {} 130 ~TestInterstitialPageDelegate() override {}
127 std::string GetHTMLContents() override { return std::string(); } 131 std::string GetHTMLContents() override { return std::string(); }
128 }; 132 };
129 133
130 class WebContentsHiddenObserver : public content::WebContentsObserver { 134 class WebContentsHiddenObserver : public content::WebContentsObserver {
(...skipping 2844 matching lines...) Expand 10 before | Expand all | Expand 10 after
2975 // 4 tasks expected. The order is arbitrary. 2979 // 4 tasks expected. The order is arbitrary.
2976 // Tab: about:blank, 2980 // Tab: about:blank,
2977 // Background Page: <webview> task manager test, 2981 // Background Page: <webview> task manager test,
2978 // App: <webview> task manager test, 2982 // App: <webview> task manager test,
2979 // Webview: WebViewed test content. 2983 // Webview: WebViewed test content.
2980 EXPECT_EQ(4U, task_manager.tasks().size()); 2984 EXPECT_EQ(4U, task_manager.tasks().size());
2981 EXPECT_TRUE(HasExpectedGuestTask(task_manager, guest_contents)); 2985 EXPECT_TRUE(HasExpectedGuestTask(task_manager, guest_contents));
2982 } 2986 }
2983 2987
2984 #endif // defined(ENABLE_TASK_MANAGER) 2988 #endif // defined(ENABLE_TASK_MANAGER)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698