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 "apps/ui/native_app_window.h" | 5 #include "apps/ui/native_app_window.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/browser/apps/app_browsertest_util.h" | 10 #include "chrome/browser/apps/app_browsertest_util.h" |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 content::WebContentsDelegate* orig_delegate) | 227 content::WebContentsDelegate* orig_delegate) |
228 : orig_delegate_(orig_delegate), | 228 : orig_delegate_(orig_delegate), |
229 waiting_for_decision_(false), | 229 waiting_for_decision_(false), |
230 expect_allow_(false), | 230 expect_allow_(false), |
231 decision_made_(false), | 231 decision_made_(false), |
232 last_download_allowed_(false) {} | 232 last_download_allowed_(false) {} |
233 virtual ~MockDownloadWebContentsDelegate() {} | 233 virtual ~MockDownloadWebContentsDelegate() {} |
234 | 234 |
235 virtual void CanDownload( | 235 virtual void CanDownload( |
236 content::RenderViewHost* render_view_host, | 236 content::RenderViewHost* render_view_host, |
237 int request_id, | 237 const GURL& url, |
238 const std::string& request_method, | 238 const std::string& request_method, |
239 const base::Callback<void(bool)>& callback) OVERRIDE { | 239 const base::Callback<void(bool)>& callback) OVERRIDE { |
240 orig_delegate_->CanDownload( | 240 orig_delegate_->CanDownload( |
241 render_view_host, request_id, request_method, | 241 render_view_host, url, request_method, |
242 base::Bind(&MockDownloadWebContentsDelegate::DownloadDecided, | 242 base::Bind(&MockDownloadWebContentsDelegate::DownloadDecided, |
243 base::Unretained(this))); | 243 base::Unretained(this))); |
244 } | 244 } |
245 | 245 |
246 void WaitForCanDownload(bool expect_allow) { | 246 void WaitForCanDownload(bool expect_allow) { |
247 EXPECT_FALSE(waiting_for_decision_); | 247 EXPECT_FALSE(waiting_for_decision_); |
248 waiting_for_decision_ = true; | 248 waiting_for_decision_ = true; |
249 | 249 |
250 if (decision_made_) { | 250 if (decision_made_) { |
251 EXPECT_EQ(expect_allow, last_download_allowed_); | 251 EXPECT_EQ(expect_allow, last_download_allowed_); |
(...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2124 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestFindAPI_findupdate) { | 2124 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestFindAPI_findupdate) { |
2125 TestHelper("testFindAPI_findupdate", "web_view/shim", NO_TEST_SERVER); | 2125 TestHelper("testFindAPI_findupdate", "web_view/shim", NO_TEST_SERVER); |
2126 } | 2126 } |
2127 | 2127 |
2128 // <webview> screenshot capture fails with ubercomp. | 2128 // <webview> screenshot capture fails with ubercomp. |
2129 // See http://crbug.com/327035. | 2129 // See http://crbug.com/327035. |
2130 IN_PROC_BROWSER_TEST_F(WebViewCaptureTest, | 2130 IN_PROC_BROWSER_TEST_F(WebViewCaptureTest, |
2131 DISABLED_Shim_ScreenshotCapture) { | 2131 DISABLED_Shim_ScreenshotCapture) { |
2132 TestHelper("testScreenshotCapture", "web_view/shim", NO_TEST_SERVER); | 2132 TestHelper("testScreenshotCapture", "web_view/shim", NO_TEST_SERVER); |
2133 } | 2133 } |
OLD | NEW |