This will avoid copying navigation params from NavigationRequest to NavigationHandle, and make the NavigationThrottle architecture simpler since we'll be able do get rid of the callbacks.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fa5767c3ed5175983238f5ddf9e039db9993640f commit fa5767c3ed5175983238f5ddf9e039db9993640f Author: Camille Lamy <clamy@chromium.org> Date: Mon Jan 07 14:53:59 2019 Rework NavigationHandle test interface This CL removes many of the NavigationHandle test methods and introduces a MockNavigationHandle class to use in tests instead. This is a preparatory CL to have NavigationHandleImpl depend on NavigationRequest. Since NavigationRequest is not a class that is exposed outside content, the testing structure where content/ embedders create a NavigationHandle for testing cannot work anymore. Change-Id: I85dd600bbf54a67d54185ac7a3c21be74d9ee694 Bug: 916537 Reviewed-on: https://chromium-review.googlesource.com/c/1367647 Commit-Queue: Camille Lamy <clamy@chromium.org> Reviewed-by: Carlos Knippschild <carlosk@chromium.org> Reviewed-by: Devlin <rdevlin.cronin@chromium.org> Reviewed-by: Jan Krcal <jkrcal@chromium.org> Reviewed-by: Mounir Lamouri <mlamouri@chromium.org> Reviewed-by: Matt Menke <mmenke@chromium.org> Reviewed-by: Nicolas Ouellet-Payeur <nicolaso@chromium.org> Reviewed-by: François Doray <fdoray@chromium.org> Reviewed-by: Ryan Sturm <ryansturm@chromium.org> Reviewed-by: Dale Curtis <dalecurtis@chromium.org> Reviewed-by: Carlos IL <carlosil@chromium.org> Reviewed-by: Christopher Thompson <cthomp@chromium.org> Reviewed-by: Tommy Li <tommycli@chromium.org> Reviewed-by: Evan Stade <estade@chromium.org> Reviewed-by: Ben Greenstein <bengr@chromium.org> Reviewed-by: Nathan Parker <nparker@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#620318} [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/browser_switcher/browser_switcher_navigation_throttle_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/data_reduction_proxy/data_reduction_proxy_chrome_settings_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/extensions/api/declarative_content/declarative_content_css_condition_tracker_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/extensions/api/declarative_content/declarative_content_is_bookmarked_condition_tracker_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/extensions/api/declarative_content/declarative_content_page_url_condition_tracker_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/extensions/extension_navigation_throttle_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/extensions/user_script_listener_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/media/media_engagement_contents_observer_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/net/net_error_tab_helper_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/offline_pages/background_loader_offliner_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/plugins/pdf_iframe_navigation_throttle_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/previews/previews_ui_tab_helper_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/resource_coordinator/background_tab_navigation_throttle_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/resource_coordinator/local_site_characteristics_webcontents_observer_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/resource_coordinator/tab_manager_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/safe_browsing/chrome_password_protection_service_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/ssl/security_state_tab_helper_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/ssl/ssl_error_navigation_throttle_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/ssl/typed_navigation_timing_throttle_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/sync/sessions/sync_sessions_router_tab_helper_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/ui/autofill/local_card_migration_bubble_controller_impl_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/ui/autofill/save_card_bubble_controller_impl_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/ui/bloated_renderer/bloated_renderer_tab_helper_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/ui/passwords/manage_passwords_ui_controller_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/chrome/browser/ui/zoom/zoom_controller_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/components/autofill/content/browser/content_autofill_driver_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/components/dom_distiller/content/browser/web_contents_main_frame_observer_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/components/security_interstitials/content/security_interstitial_tab_helper_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/content/browser/frame_host/navigation_handle_impl.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/content/browser/frame_host/navigation_handle_impl.h [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/content/browser/presentation/presentation_service_impl_unittest.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/content/public/browser/navigation_handle.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/content/public/browser/navigation_handle.h [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/content/public/browser/navigation_throttle.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/content/public/browser/navigation_throttle.h [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/content/public/test/browser_test_utils.cc [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/content/public/test/browser_test_utils.h [add] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/content/public/test/mock_navigation_handle.cc [add] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/content/public/test/mock_navigation_handle.h [modify] https://crrev.com/fa5767c3ed5175983238f5ddf9e039db9993640f/content/test/BUILD.gn
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e0bde7a1178e3367df87ebcbe0928c61b249072c commit e0bde7a1178e3367df87ebcbe0928c61b249072c Author: Camille Lamy <clamy@chromium.org> Date: Tue Jan 08 17:17:33 2019 Only create NavigationHandles from NavigationRequests This CL removes the public method for NavigationHandleImpl::Create, and adds NavigationRequest as a friend of NavigationHandleImpl. This ensures that NavigationHandlesImpls are only created from NavigationRequests. This is a preliminary CL for making NavigationHandleImpl depend on NavigationRequest. Change-Id: Ic1c102a09e68a94e95a827dc9c0dc9ad2605a2e0 Bug: 916537 Reviewed-on: https://chromium-review.googlesource.com/c/1377855 Commit-Queue: Camille Lamy <clamy@chromium.org> Reviewed-by: Nasko Oskov <nasko@chromium.org> Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Cr-Commit-Position: refs/heads/master@{#620770} [delete] https://crrev.com/b80701cd410d43d4f513f499e51d3ac248739cd7/content/browser/frame_host/form_submission_throttle_browsertest.cc [add] https://crrev.com/e0bde7a1178e3367df87ebcbe0928c61b249072c/content/browser/frame_host/form_submission_throttle_unittest.cc [modify] https://crrev.com/e0bde7a1178e3367df87ebcbe0928c61b249072c/content/browser/frame_host/navigation_handle_impl.cc [modify] https://crrev.com/e0bde7a1178e3367df87ebcbe0928c61b249072c/content/browser/frame_host/navigation_handle_impl.h [modify] https://crrev.com/e0bde7a1178e3367df87ebcbe0928c61b249072c/content/browser/frame_host/navigation_handle_impl_unittest.cc [modify] https://crrev.com/e0bde7a1178e3367df87ebcbe0928c61b249072c/content/browser/frame_host/navigation_request.cc [modify] https://crrev.com/e0bde7a1178e3367df87ebcbe0928c61b249072c/content/browser/frame_host/origin_policy_throttle_unittest.cc [modify] https://crrev.com/e0bde7a1178e3367df87ebcbe0928c61b249072c/content/public/test/mock_navigation_handle.h [modify] https://crrev.com/e0bde7a1178e3367df87ebcbe0928c61b249072c/content/public/test/navigation_simulator.cc [modify] https://crrev.com/e0bde7a1178e3367df87ebcbe0928c61b249072c/content/public/test/navigation_simulator.h [modify] https://crrev.com/e0bde7a1178e3367df87ebcbe0928c61b249072c/content/test/BUILD.gn
Comment 1 by clamy@chromium.org
, Dec 19Labels: OS-Android OS-Chrome OS-Fuchsia OS-Linux OS-Mac OS-Windows