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

Side by Side Diff: content/test/content_browser_test_utils_internal.cc

Issue 2080223002: Revert of Fixing renderer's access to a file from HTTP POST (after a xsite transfer). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 "content/test/content_browser_test_utils_internal.h" 5 #include "content/test/content_browser_test_utils_internal.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
11 #include <set> 11 #include <set>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/strings/stringprintf.h" 14 #include "base/strings/stringprintf.h"
15 #include "base/test/test_timeouts.h" 15 #include "base/test/test_timeouts.h"
16 #include "base/threading/thread_task_runner_handle.h" 16 #include "base/threading/thread_task_runner_handle.h"
17 #include "cc/surfaces/surface.h" 17 #include "cc/surfaces/surface.h"
18 #include "cc/surfaces/surface_manager.h" 18 #include "cc/surfaces/surface_manager.h"
19 #include "content/browser/compositor/surface_utils.h" 19 #include "content/browser/compositor/surface_utils.h"
20 #include "content/browser/frame_host/cross_process_frame_connector.h" 20 #include "content/browser/frame_host/cross_process_frame_connector.h"
21 #include "content/browser/frame_host/frame_tree_node.h" 21 #include "content/browser/frame_host/frame_tree_node.h"
22 #include "content/browser/frame_host/navigator.h" 22 #include "content/browser/frame_host/navigator.h"
23 #include "content/browser/frame_host/render_frame_proxy_host.h" 23 #include "content/browser/frame_host/render_frame_proxy_host.h"
24 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" 24 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
25 #include "content/browser/renderer_host/delegated_frame_host.h" 25 #include "content/browser/renderer_host/delegated_frame_host.h"
26 #include "content/browser/renderer_host/render_widget_host_view_base.h" 26 #include "content/browser/renderer_host/render_widget_host_view_base.h"
27 #include "content/public/browser/render_frame_host.h"
28 #include "content/public/browser/resource_dispatcher_host.h" 27 #include "content/public/browser/resource_dispatcher_host.h"
29 #include "content/public/browser/resource_throttle.h" 28 #include "content/public/browser/resource_throttle.h"
30 #include "content/public/browser/web_contents.h" 29 #include "content/public/browser/web_contents.h"
31 #include "content/public/common/file_chooser_file_info.h"
32 #include "content/public/common/file_chooser_params.h"
33 #include "content/public/test/browser_test_utils.h" 30 #include "content/public/test/browser_test_utils.h"
34 #include "content/public/test/content_browser_test_utils.h" 31 #include "content/public/test/content_browser_test_utils.h"
35 #include "content/shell/browser/shell.h" 32 #include "content/shell/browser/shell.h"
36 #include "content/shell/browser/shell_javascript_dialog_manager.h" 33 #include "content/shell/browser/shell_javascript_dialog_manager.h"
37 #include "content/test/test_frame_navigation_observer.h" 34 #include "content/test/test_frame_navigation_observer.h"
38 #include "net/url_request/url_request.h" 35 #include "net/url_request/url_request.h"
39 36
40 namespace content { 37 namespace content {
41 38
42 namespace { 39 namespace {
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 if (loop_runner_) 417 if (loop_runner_)
421 loop_runner_->Quit(); 418 loop_runner_->Quit();
422 } 419 }
423 420
424 void TestNavigationManager::OnWillStartRequest() { 421 void TestNavigationManager::OnWillStartRequest() {
425 navigation_paused_ = true; 422 navigation_paused_ = true;
426 if (loop_runner_) 423 if (loop_runner_)
427 loop_runner_->Quit(); 424 loop_runner_->Quit();
428 } 425 }
429 426
430 FileChooserDelegate::FileChooserDelegate(const base::FilePath& file)
431 : file_(file), file_chosen_(false) {}
432
433 void FileChooserDelegate::RunFileChooser(RenderFrameHost* render_frame_host,
434 const FileChooserParams& params) {
435 // Send the selected file to the renderer process.
436 FileChooserFileInfo file_info;
437 file_info.file_path = file_;
438 std::vector<FileChooserFileInfo> files;
439 files.push_back(file_info);
440 render_frame_host->FilesSelectedInChooser(files, FileChooserParams::Open);
441
442 file_chosen_ = true;
443 }
444
445 } // namespace content 427 } // namespace content
OLDNEW
« no previous file with comments | « content/test/content_browser_test_utils_internal.h ('k') | content/test/data/form_that_posts_cross_site.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698