| OLD | NEW |
| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 namespace { | 108 namespace { |
| 109 const char kEmptyResponsePath[] = "/close-socket"; | 109 const char kEmptyResponsePath[] = "/close-socket"; |
| 110 const char kRedirectResponsePath[] = "/server-redirect"; | 110 const char kRedirectResponsePath[] = "/server-redirect"; |
| 111 const char kUserAgentRedirectResponsePath[] = "/detect-user-agent"; | 111 const char kUserAgentRedirectResponsePath[] = "/detect-user-agent"; |
| 112 const char kCacheResponsePath[] = "/cache-control-response"; | 112 const char kCacheResponsePath[] = "/cache-control-response"; |
| 113 const char kRedirectResponseFullPath[] = | 113 const char kRedirectResponseFullPath[] = |
| 114 "/extensions/platform_apps/web_view/shim/guest_redirect.html"; | 114 "/extensions/platform_apps/web_view/shim/guest_redirect.html"; |
| 115 | 115 |
| 116 class EmptyHttpResponse : public net::test_server::HttpResponse { | 116 class EmptyHttpResponse : public net::test_server::HttpResponse { |
| 117 public: | 117 public: |
| 118 std::string ToResponseString() const override { return std::string(); } | 118 void SendResponse(net::test_server::SendBytesCallback send, |
| 119 net::test_server::SendCompleteCallback done) override { |
| 120 send.Run("", done); |
| 121 } |
| 119 }; | 122 }; |
| 120 | 123 |
| 121 class TestInterstitialPageDelegate : public content::InterstitialPageDelegate { | 124 class TestInterstitialPageDelegate : public content::InterstitialPageDelegate { |
| 122 public: | 125 public: |
| 123 TestInterstitialPageDelegate() { | 126 TestInterstitialPageDelegate() { |
| 124 } | 127 } |
| 125 ~TestInterstitialPageDelegate() override {} | 128 ~TestInterstitialPageDelegate() override {} |
| 126 std::string GetHTMLContents() override { return std::string(); } | 129 std::string GetHTMLContents() override { return std::string(); } |
| 127 }; | 130 }; |
| 128 | 131 |
| (...skipping 2841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2970 // 4 tasks expected. The order is arbitrary. | 2973 // 4 tasks expected. The order is arbitrary. |
| 2971 // Tab: about:blank, | 2974 // Tab: about:blank, |
| 2972 // Background Page: <webview> task manager test, | 2975 // Background Page: <webview> task manager test, |
| 2973 // App: <webview> task manager test, | 2976 // App: <webview> task manager test, |
| 2974 // Webview: WebViewed test content. | 2977 // Webview: WebViewed test content. |
| 2975 EXPECT_EQ(4U, task_manager.tasks().size()); | 2978 EXPECT_EQ(4U, task_manager.tasks().size()); |
| 2976 EXPECT_TRUE(HasExpectedGuestTask(task_manager, guest_contents)); | 2979 EXPECT_TRUE(HasExpectedGuestTask(task_manager, guest_contents)); |
| 2977 } | 2980 } |
| 2978 | 2981 |
| 2979 #endif // defined(ENABLE_TASK_MANAGER) | 2982 #endif // defined(ENABLE_TASK_MANAGER) |
| OLD | NEW |