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

Issue 9706012: Add abstractions that let embedders drive tests of WebContents. (Closed)

Created:
8 years, 9 months ago by Jói
Modified:
8 years, 9 months ago
Reviewers:
jam
CC:
chromium-reviews, jam, sadrul, nkostylev+watch_chromium.org, tburkard+watch_chromium.org, dhollowa+watch_chromium.org, mihaip+watch_chromium.org, dcheng, ajwong+watch_chromium.org, stevenjb+watch_chromium.org, yusukes+watch_chromium.org, GeorgeY, cbentzel+watch_chromium.org, ben+watch_chromium.org, Ilya Sherman, achuith+watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org, Andrei, Avi (use Gerrit), jennb, creis+watch_chromium.org, dyu1, kkania, penghuang+watch_chromium.org, jianli, Dmitry Lomov (no reviews), tfarina, Dmitry Titov, Aaron Boodman, dominich+watch_chromium.org, robertshield, davemoore+watch_chromium.org, rdsmith+dwatch_chromium.org, James Su, mmenke
Visibility:
Public.

Description

Add abstractions that let embedders drive tests of WebContents, without exposing the internals of content/. A separate WebContentsTester interface is used. For reasons this approach was chosen, see comments on the interface. As part of this work, removed a bunch of references to TabContents from Chrome, some of which were true usages (leaked to Chrome via the test_tab_contents.h header), others of which were just forward declarations and never used. Also removed a chunk of code from autofill_manager.cc that isn't called from anywhere that referenced TabContents. TBR=ben@chromium.org BUG=98716 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=128198

Patch Set 1 : . #

Patch Set 2 : Merge to LKGR. #

Patch Set 3 : Fix copyright headers. #

Patch Set 4 : Merge to head, LKGR was too old. #

Patch Set 5 : Fix Win compile issue, merge to head again (conflict). #

Patch Set 6 : Fix ChromeOS compile issue. #

Patch Set 7 : Fix Win build? #

Patch Set 8 : Merge to head for commit. #

Patch Set 9 : Merge to head for commit. #

Patch Set 10 : Remove CONTENT_EXPORT on statically linked functions. Merge to head for commit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+493 lines, -360 lines) Patch
M chrome/browser/autocomplete_history_manager_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/autofill/autofill_manager.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -76 lines 0 comments Download
M chrome/browser/autofill/autofill_manager_unittest.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/autofill/autofill_metrics_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/automation/automation_provider.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/automation/automation_provider_observers.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/automation/automation_tab_helper_unittest.cc View 1 2 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/background/background_contents_service.h View 1 2 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_utils.h View 1 2 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/chromeos/offline/offline_load_page_unittest.cc View 3 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/content_settings/tab_specific_content_settings_unittest.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/download/download_request_limiter_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_tab_util.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_webnavigation_unittest.cc View 1 2 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/external_tab_container_win.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/favicon/favicon_handler.h View 1 2 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/favicon/favicon_handler_unittest.cc View 1 2 4 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/instant/instant_controller.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/instant/instant_loader.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/notifications/desktop_notification_service.h View 1 2 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/oom_priority_manager.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/password_manager/password_manager_unittest.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/prefs/pref_service_unittest.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/prerender/prerender_manager.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc View 1 2 4 chunks +9 lines, -5 lines 0 comments Download
M chrome/browser/safe_browsing/client_side_detection_host_unittest.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/malware_details_unittest.cc View 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc View 3 chunks +12 lines, -5 lines 0 comments Download
M chrome/browser/sessions/tab_restore_service_browsertest.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/tabs/tab_strip_model.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/tabs/tab_strip_model_delegate.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/translate/translate_manager_browsertest.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/blocked_content/blocked_content_container.h View 1 2 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/ui/browser_dialogs.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/browser_window.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.h View 1 2 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/content_settings/collected_cookies_mac_unittest.mm View 1 2 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/tab_contents/sad_tab_controller_unittest.mm View 1 2 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/web_intent_sheet_controller_unittest.mm View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/content_settings/content_setting_image_model_unittest.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/find_bar/find_backend_unittest.cc View 3 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/ui/fullscreen_controller.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/browser_titlebar.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.h View 1 2 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/ui/gtk/html_dialog_gtk.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/tabs/dragged_view_gtk.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/web_intent_picker_gtk.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/media_stream_infobar_delegate.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/panels/base_panel_browser_test.cc View 2 chunks +9 lines, -2 lines 0 comments Download
M chrome/browser/ui/prefs/prefs_tab_helper_unittest.cc View 1 2 4 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/select_file_dialog.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h View 1 2 2 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/ui/tab_contents/test_tab_contents_wrapper.cc View 1 2 3 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc View 1 2 3 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/ash/launcher/launcher_updater_unittest.cc View 1 2 3 4 5 6 7 19 chunks +24 lines, -25 lines 0 comments Download
M chrome/browser/ui/views/browser_dialogs.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/views/collected_cookies_views.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/content_setting_image_view.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_views.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_win.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/views/stubs_aura.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/html_dialog_tab_contents_delegate_unittest.cc View 1 2 4 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_ui_unittest.cc View 6 chunks +11 lines, -23 lines 0 comments Download
M chrome/browser/ui/webui/sync_internals_ui_unittest.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/web_ui_unittest.cc View 6 chunks +18 lines, -26 lines 0 comments Download
M chrome/browser/webdata/web_database_migration_unittest.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/test/base/chrome_render_view_host_test_harness.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/test/base/chrome_render_view_host_test_harness.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/debugger/devtools_manager_unittest.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/download/save_package_unittest.cc View 1 2 5 chunks +6 lines, -6 lines 0 comments Download
M content/browser/intents/internal_web_intents_dispatcher_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac_unittest.mm View 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/test_render_view_host.h View 1 2 3 2 chunks +6 lines, -6 lines 0 comments Download
M content/browser/renderer_host/test_render_view_host.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/site_instance_impl_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/browser/tab_contents/navigation_controller_impl_unittest.cc View 1 2 3 4 5 6 7 4 chunks +8 lines, -4 lines 0 comments Download
M content/browser/tab_contents/render_view_host_manager_unittest.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/tab_contents/tab_contents_unittest.cc View 1 2 3 4 5 6 7 3 chunks +7 lines, -5 lines 0 comments Download
M content/browser/tab_contents/test_tab_contents.h View 5 chunks +20 lines, -33 lines 0 comments Download
M content/browser/tab_contents/test_tab_contents.cc View 1 2 3 4 5 6 7 2 chunks +9 lines, -0 lines 0 comments Download
M content/browser/tab_contents/web_drag_dest_mac_unittest.mm View 1 2 3 4 5 6 7 2 chunks +4 lines, -2 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M content/test/test_renderer_host.h View 1 2 3 4 5 6 7 5 chunks +12 lines, -9 lines 0 comments Download
M content/test/test_renderer_host.cc View 1 2 3 4 5 6 7 5 chunks +10 lines, -8 lines 0 comments Download
A content/test/web_contents_tester.h View 1 2 3 4 5 6 7 8 9 1 chunk +118 lines, -0 lines 0 comments Download
A content/test/web_contents_tester.cc View 1 2 3 4 5 6 7 8 9 1 chunk +81 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
Jói
Ended up with the same approach as for TestRenderViewHost, for similar reasons, see comments on ...
8 years, 9 months ago (2012-03-14 15:52:15 UTC) #1
jam
lgtm
8 years, 9 months ago (2012-03-14 16:58:21 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/9706012/4003
8 years, 9 months ago (2012-03-15 13:19:02 UTC) #3
commit-bot: I haz the power
Can't apply patch for file chrome/browser/ui/webui/sync_internals_ui_unittest.cc. While running patch -p1 --forward --force; patching file chrome/browser/ui/webui/sync_internals_ui_unittest.cc ...
8 years, 9 months ago (2012-03-15 13:19:25 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/9706012/2095
8 years, 9 months ago (2012-03-15 13:28:14 UTC) #5
commit-bot: I haz the power
Try job failure for 9706012-2095 (retry) on win for step "compile" (clobber build). It's a ...
8 years, 9 months ago (2012-03-15 14:29:04 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/9706012/4005
8 years, 9 months ago (2012-03-15 15:46:00 UTC) #7
commit-bot: I haz the power
Try job failure for 9706012-4005 (retry) on linux_chromeos for step "compile" (clobber build). It's a ...
8 years, 9 months ago (2012-03-15 16:09:25 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/9706012/103
8 years, 9 months ago (2012-03-15 18:21:58 UTC) #9
commit-bot: I haz the power
Try job failure for 9706012-103 (retry) on win for step "compile" (clobber build). It's a ...
8 years, 9 months ago (2012-03-15 20:50:42 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/9706012/5010
8 years, 9 months ago (2012-03-15 21:53:49 UTC) #11
commit-bot: I haz the power
Can't apply patch for file chrome/browser/content_settings/tab_specific_content_settings_unittest.cc. While running patch -p1 --forward --force; patching file chrome/browser/content_settings/tab_specific_content_settings_unittest.cc ...
8 years, 9 months ago (2012-03-15 21:54:07 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/9706012/15034
8 years, 9 months ago (2012-03-21 13:20:36 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/9706012/17005
8 years, 9 months ago (2012-03-21 14:18:35 UTC) #14
commit-bot: I haz the power
8 years, 9 months ago (2012-03-21 16:49:23 UTC) #15
Try job failure for 9706012-17005 (retry) on win_rel for step "ui_tests"
(clobber build).
It's a second try, previously, step "compile" failed.
http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&nu...

Powered by Google App Engine
This is Rietveld 408576698