Commit af44f46e authored by Xi Cheng's avatar Xi Cheng Committed by Commit Bot

Add test coverage for NotificationActivator::Activate in notification_helper

We introduce notification_helper_launches_chrome_unittest, which is evolution
of notification_helper_process_unittest. In addition to testing the launch of
notification_helper by the OS which is notification_helper_process_unittest
all about, the new unit test also tests if chrome.exe can be successfully
launched by notification_helper.exe via the NotificationActivator::Activate
function.

This new unit test is compiled into unit_tests.exe under chrome rather than
notification_helper_unittests.exe. This is because unit_tests.exe has data
dependency on chrome.exe which is required by this new unit test, and it's
undesired to make notification_helper_unittests.exe have data dependency on
chrome.exe.

Bug: 734095
Change-Id: I07ac90a84d7f885a359867f79ce613a194e0bb64
Reviewed-on: https://chromium-review.googlesource.com/1002132
Commit-Queue: Xi Cheng <chengx@chromium.org>
Reviewed-by: default avatarGreg Thompson <grt@chromium.org>
Reviewed-by: default avatarPeter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551540}
parent 95a072a8
...@@ -14,6 +14,7 @@ per-file *_mac*=rsesek@chromium.org ...@@ -14,6 +14,7 @@ per-file *_mac*=rsesek@chromium.org
# Windows files # Windows files
per-file *_win*=finnur@chromium.org per-file *_win*=finnur@chromium.org
per-file notification_template_builder*=finnur@chromium.org per-file notification_template_builder*=finnur@chromium.org
per-file notification_helper_launches_chrome_unittest.cc=file://notification_helper/OWNERS
per-file *permission_context*=file://chrome/browser/permissions/PERMISSIONS_OWNERS per-file *permission_context*=file://chrome/browser/permissions/PERMISSIONS_OWNERS
......
...@@ -63,6 +63,8 @@ static_library("test_support") { ...@@ -63,6 +63,8 @@ static_library("test_support") {
"base/dialog_test_browser_window.h", "base/dialog_test_browser_window.h",
"base/find_in_page_observer.cc", "base/find_in_page_observer.cc",
"base/find_in_page_observer.h", "base/find_in_page_observer.h",
"base/process_inspector_win.cc",
"base/process_inspector_win.h",
"base/scoped_browser_locale.cc", "base/scoped_browser_locale.cc",
"base/scoped_browser_locale.h", "base/scoped_browser_locale.h",
"base/scoped_bundle_swizzler_mac.h", "base/scoped_bundle_swizzler_mac.h",
...@@ -3151,9 +3153,14 @@ test("unit_tests") { ...@@ -3151,9 +3153,14 @@ test("unit_tests") {
if (is_win) { if (is_win) {
sources += [ sources += [
"../browser/notifications/notification_helper_launches_chrome_unittest.cc",
"../browser/notifications/notification_launch_id_unittest.cc", "../browser/notifications/notification_launch_id_unittest.cc",
"../browser/notifications/notification_platform_bridge_win_unittest.cc", "../browser/notifications/notification_platform_bridge_win_unittest.cc",
] ]
deps += [ "//chrome/installer/util:with_no_strings" ]
data_deps += [ "//notification_helper" ]
} }
} }
...@@ -4616,8 +4623,6 @@ if (!is_android) { ...@@ -4616,8 +4623,6 @@ if (!is_android) {
"base/interactive_test_utils_mac.mm", "base/interactive_test_utils_mac.mm",
"base/interactive_test_utils_win.cc", "base/interactive_test_utils_win.cc",
"base/interactive_ui_tests_main.cc", "base/interactive_ui_tests_main.cc",
"base/process_inspector_win.cc",
"base/process_inspector_win.h",
"base/save_desktop_snapshot_win.cc", "base/save_desktop_snapshot_win.cc",
"base/save_desktop_snapshot_win.h", "base/save_desktop_snapshot_win.h",
"base/view_event_test_platform_part.h", "base/view_event_test_platform_part.h",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment