Commit f9370b19 authored by Rainhard Findling's avatar Rainhard Findling Committed by Commit Bot

Safety check Chrome cleaner: UI review string updates

Bug: 1087263
Change-Id: Iea65cdcf64691e6b97dac8c867d4aedf46c595f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2523037Reviewed-by: default avatarEsmael Elmoslimany <aee@chromium.org>
Commit-Queue: Rainhard Findling <rainhard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825451}
parent d4fa44a3
...@@ -1280,25 +1280,25 @@ ...@@ -1280,25 +1280,25 @@
Chrome can check your computer for harmful software Chrome can check your computer for harmful software
</message> </message>
<message name="IDS_SETTINGS_SAFETY_CHECK_CHROME_CLEANER_NO_UWS_WITH_TIMESTAMP_AFTER_SECONDS" desc="This text describes that Chrome did not find any known harmful software installed on the user's computer, and that it checked for harmful softwrae the last time a certain time ago."> <message name="IDS_SETTINGS_SAFETY_CHECK_CHROME_CLEANER_NO_UWS_WITH_TIMESTAMP_AFTER_SECONDS" desc="This text describes that Chrome did not find any known harmful software installed on the user's computer, and that it checked for harmful softwrae the last time a certain time ago.">
Chrome didn't find known harmful software on your computer. Last checked: a moment ago. Chrome didn't find harmful software on your computer • Checked just now
</message> </message>
<message name="IDS_SETTINGS_SAFETY_CHECK_CHROME_CLEANER_NO_UWS_WITH_TIMESTAMP_AFTER_MINUTES" desc="This text describes that Chrome did not find any known harmful software installed on the user's computer, and that it checked for harmful softwrae the last time a certain time ago."> <message name="IDS_SETTINGS_SAFETY_CHECK_CHROME_CLEANER_NO_UWS_WITH_TIMESTAMP_AFTER_MINUTES" desc="This text describes that Chrome did not find any known harmful software installed on the user's computer, and that it checked for harmful softwrae the last time a certain time ago.">
{NUM_MINS, plural, {NUM_MINS, plural,
=1 {Chrome didn't find known harmful software on your computer. Last checked: 1 minute ago.} =1 {Chrome didn't find harmful software on your computer • Checked 1 minute ago}
other {Chrome didn't find known harmful software on your computer. Last checked: {NUM_MINS} minutes ago.}} other {Chrome didn't find harmful software on your computer • Checked {NUM_MINS} minutes ago}}
</message> </message>
<message name="IDS_SETTINGS_SAFETY_CHECK_CHROME_CLEANER_NO_UWS_WITH_TIMESTAMP_AFTER_HOURS" desc="This text describes that Chrome did not find any known harmful software installed on the user's computer, and that it checked for harmful softwrae the last time a certain time ago."> <message name="IDS_SETTINGS_SAFETY_CHECK_CHROME_CLEANER_NO_UWS_WITH_TIMESTAMP_AFTER_HOURS" desc="This text describes that Chrome did not find any known harmful software installed on the user's computer, and that it checked for harmful softwrae the last time a certain time ago.">
{NUM_HOURS, plural, {NUM_HOURS, plural,
=1 {Chrome didn't find known harmful software on your computer. Last checked: 1 hour ago.} =1 {Chrome didn't find harmful software on your computer • Checked 1 hour ago}
other {Chrome didn't find known harmful software on your computer. Last checked: {NUM_HOURS} hours ago.}} other {Chrome didn't find harmful software on your computer • Checked {NUM_HOURS} hours ago}}
</message> </message>
<message name="IDS_SETTINGS_SAFETY_CHECK_CHROME_CLEANER_NO_UWS_WITH_TIMESTAMP_YESTERDAY" desc="This text describes that Chrome did not find any known harmful software installed on the user's computer, and that it checked for harmful softwrae the last time a certain time ago."> <message name="IDS_SETTINGS_SAFETY_CHECK_CHROME_CLEANER_NO_UWS_WITH_TIMESTAMP_YESTERDAY" desc="This text describes that Chrome did not find any known harmful software installed on the user's computer, and that it checked for harmful softwrae the last time a certain time ago.">
Chrome didn't find known harmful software on your computer. Last checked: yesterday. Chrome didn't find harmful software on your computer • Checked yesterday
</message> </message>
<message name="IDS_SETTINGS_SAFETY_CHECK_CHROME_CLEANER_NO_UWS_WITH_TIMESTAMP_AFTER_DAYS" desc="This text describes that Chrome did not find any known harmful software installed on the user's computer, and that it checked for harmful softwrae the last time a certain time ago."> <message name="IDS_SETTINGS_SAFETY_CHECK_CHROME_CLEANER_NO_UWS_WITH_TIMESTAMP_AFTER_DAYS" desc="This text describes that Chrome did not find any known harmful software installed on the user's computer, and that it checked for harmful softwrae the last time a certain time ago.">
{NUM_DAYS, plural, {NUM_DAYS, plural,
=1 {Chrome didn't find known harmful software on your computer. Last checked: 1 day ago.} =1 {Chrome didn't find harmful software on your computer • Checked 1 day ago}
other {Chrome didn't find known harmful software on your computer. Last checked: {NUM_DAYS} days ago.}} other {Chrome didn't find harmful software on your computer • Checked {NUM_DAYS} days ago}}
</message> </message>
<message name="IDS_SETTINGS_SAFETY_CHECK_CHROME_CLEANER_INFECTED" desc="This text describes that Chrome found harmful software on the computer."> <message name="IDS_SETTINGS_SAFETY_CHECK_CHROME_CLEANER_INFECTED" desc="This text describes that Chrome found harmful software on the computer.">
Chrome found harmful software on your computer Chrome found harmful software on your computer
...@@ -1310,10 +1310,10 @@ ...@@ -1310,10 +1310,10 @@
Chrome is removing harmful software from your computer... Chrome is removing harmful software from your computer...
</message> </message>
<message name="IDS_SETTINGS_SAFETY_CHECK_CHROME_CLEANER_DISABLED_BY_ADMIN" desc="This text describes that Chrome can't check for unwanted software because an administrator disabled the feature."> <message name="IDS_SETTINGS_SAFETY_CHECK_CHROME_CLEANER_DISABLED_BY_ADMIN" desc="This text describes that Chrome can't check for unwanted software because an administrator disabled the feature.">
<ph name="BEGIN_LINK">&lt;a target="_blank" href="$1"&gt;</ph>Your administrator<ph name="END_LINK">&lt;/a&gt;</ph> has disabled Chrome's check for harmful software <ph name="BEGIN_LINK">&lt;a target="_blank" href="$1"&gt;</ph>Your administrator<ph name="END_LINK">&lt;/a&gt;</ph> has turned off checking for harmful software
</message> </message>
<message name="IDS_SETTINGS_SAFETY_CHECK_CHROME_CLEANER_ERROR" desc="This text describes that Chrome can't check for unwanted software due to an error."> <message name="IDS_SETTINGS_SAFETY_CHECK_CHROME_CLEANER_ERROR" desc="This text describes that Chrome can't check for unwanted software due to an error.">
An error occurred while Chrome was checking your computer for harmful software Something went wrong. Click for more details.
</message> </message>
</if> </if>
......
370590410b1c53953ab725e52ca45f0a951ea7d6 90f455f5744fd37fe398ab57e53ef505f5aa4f6c
\ No newline at end of file \ No newline at end of file
ada4d7cf1185ea928da011337c8889f29e869621 41144fd6c22a8c10b7cc1d267cfadcc78c727147
\ No newline at end of file \ No newline at end of file
959fc545b668757d278eb46d38e1b9ed5e8d7b9e 3d4c3ebbc6017492d2ca963ea0243bbccf855169
\ No newline at end of file \ No newline at end of file
0b64c430d8a5984aaebe3e807ceae2500a8ee286 40af9b1e9bbc69c8ee745144366c07784db7e57f
\ No newline at end of file \ No newline at end of file
a66daac2b8a3120df84c0f6fa11bcbda796a9711 f3e09f69321fdcc7ebfdf5d89d6e69bb5219da86
\ No newline at end of file \ No newline at end of file
2eaddc8e12c1b4dcf385df29cdb25918ca600de8 a3421d121404b222789e63e9342841d1f03ec326
\ No newline at end of file \ No newline at end of file
bdd702a4151f52157dfcd78449ba188576d06133 bb74422e7cf1de229c0b4c1c51395ed613655309
\ No newline at end of file \ No newline at end of file
...@@ -1380,8 +1380,8 @@ INSTANTIATE_TEST_SUITE_P( ...@@ -1380,8 +1380,8 @@ INSTANTIATE_TEST_SUITE_P(
::testing::Values(std::make_tuple( ::testing::Values(std::make_tuple(
safe_browsing::ChromeCleanerController::IdleReason::kInitial, safe_browsing::ChromeCleanerController::IdleReason::kInitial,
SafetyCheckHandler::ChromeCleanerStatus::kNoUwsFoundWithTimestamp, SafetyCheckHandler::ChromeCleanerStatus::kNoUwsFoundWithTimestamp,
base::UTF8ToUTF16("Browser didn't find known harmful software on your " base::UTF8ToUTF16("Browser didn't find harmful software on your "
"computer. Last checked: a moment ago.")))); "computer • Checked just now"))));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(
CheckChromeCleaner_ReporterFoundNothing, CheckChromeCleaner_ReporterFoundNothing,
...@@ -1390,8 +1390,8 @@ INSTANTIATE_TEST_SUITE_P( ...@@ -1390,8 +1390,8 @@ INSTANTIATE_TEST_SUITE_P(
safe_browsing::ChromeCleanerController::IdleReason:: safe_browsing::ChromeCleanerController::IdleReason::
kReporterFoundNothing, kReporterFoundNothing,
SafetyCheckHandler::ChromeCleanerStatus::kNoUwsFoundWithTimestamp, SafetyCheckHandler::ChromeCleanerStatus::kNoUwsFoundWithTimestamp,
base::UTF8ToUTF16("Browser didn't find known harmful software on your " base::UTF8ToUTF16("Browser didn't find harmful software on your "
"computer. Last checked: a moment ago.")))); "computer • Checked just now"))));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(
CheckChromeCleaner_ReporterFailed, CheckChromeCleaner_ReporterFailed,
...@@ -1399,8 +1399,7 @@ INSTANTIATE_TEST_SUITE_P( ...@@ -1399,8 +1399,7 @@ INSTANTIATE_TEST_SUITE_P(
::testing::Values(std::make_tuple( ::testing::Values(std::make_tuple(
safe_browsing::ChromeCleanerController::IdleReason::kReporterFailed, safe_browsing::ChromeCleanerController::IdleReason::kReporterFailed,
SafetyCheckHandler::ChromeCleanerStatus::kError, SafetyCheckHandler::ChromeCleanerStatus::kError,
base::UTF8ToUTF16("An error occurred while Browser was checking your " base::UTF8ToUTF16("Something went wrong. Click for more details."))));
"computer for harmful software"))));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(
CheckChromeCleaner_ScanningFoundNothing, CheckChromeCleaner_ScanningFoundNothing,
...@@ -1409,8 +1408,8 @@ INSTANTIATE_TEST_SUITE_P( ...@@ -1409,8 +1408,8 @@ INSTANTIATE_TEST_SUITE_P(
safe_browsing::ChromeCleanerController::IdleReason:: safe_browsing::ChromeCleanerController::IdleReason::
kScanningFoundNothing, kScanningFoundNothing,
SafetyCheckHandler::ChromeCleanerStatus::kNoUwsFoundWithTimestamp, SafetyCheckHandler::ChromeCleanerStatus::kNoUwsFoundWithTimestamp,
base::UTF8ToUTF16("Browser didn't find known harmful software on your " base::UTF8ToUTF16("Browser didn't find harmful software on your "
"computer. Last checked: a moment ago.")))); "computer • Checked just now"))));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(
CheckChromeCleaner_ScanningFailed, CheckChromeCleaner_ScanningFailed,
...@@ -1418,8 +1417,7 @@ INSTANTIATE_TEST_SUITE_P( ...@@ -1418,8 +1417,7 @@ INSTANTIATE_TEST_SUITE_P(
::testing::Values(std::make_tuple( ::testing::Values(std::make_tuple(
safe_browsing::ChromeCleanerController::IdleReason::kScanningFailed, safe_browsing::ChromeCleanerController::IdleReason::kScanningFailed,
SafetyCheckHandler::ChromeCleanerStatus::kError, SafetyCheckHandler::ChromeCleanerStatus::kError,
base::UTF8ToUTF16("An error occurred while Browser was checking your " base::UTF8ToUTF16("Something went wrong. Click for more details."))));
"computer for harmful software"))));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(
CheckChromeCleaner_ConnectionLost, CheckChromeCleaner_ConnectionLost,
...@@ -1444,8 +1442,7 @@ INSTANTIATE_TEST_SUITE_P( ...@@ -1444,8 +1442,7 @@ INSTANTIATE_TEST_SUITE_P(
::testing::Values(std::make_tuple( ::testing::Values(std::make_tuple(
safe_browsing::ChromeCleanerController::IdleReason::kCleaningFailed, safe_browsing::ChromeCleanerController::IdleReason::kCleaningFailed,
SafetyCheckHandler::ChromeCleanerStatus::kError, SafetyCheckHandler::ChromeCleanerStatus::kError,
base::UTF8ToUTF16("An error occurred while Browser was checking your " base::UTF8ToUTF16("Something went wrong. Click for more details."))));
"computer for harmful software"))));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(
CheckChromeCleaner_CleaningSucceed, CheckChromeCleaner_CleaningSucceed,
...@@ -1453,8 +1450,8 @@ INSTANTIATE_TEST_SUITE_P( ...@@ -1453,8 +1450,8 @@ INSTANTIATE_TEST_SUITE_P(
::testing::Values(std::make_tuple( ::testing::Values(std::make_tuple(
safe_browsing::ChromeCleanerController::IdleReason::kCleaningSucceeded, safe_browsing::ChromeCleanerController::IdleReason::kCleaningSucceeded,
SafetyCheckHandler::ChromeCleanerStatus::kNoUwsFoundWithTimestamp, SafetyCheckHandler::ChromeCleanerStatus::kNoUwsFoundWithTimestamp,
base::UTF8ToUTF16("Browser didn't find known harmful software on your " base::UTF8ToUTF16("Browser didn't find harmful software on your "
"computer. Last checked: a moment ago.")))); "computer • Checked just now"))));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(
CheckChromeCleaner_CleanerDownloadFailed, CheckChromeCleaner_CleanerDownloadFailed,
...@@ -1463,8 +1460,7 @@ INSTANTIATE_TEST_SUITE_P( ...@@ -1463,8 +1460,7 @@ INSTANTIATE_TEST_SUITE_P(
safe_browsing::ChromeCleanerController::IdleReason:: safe_browsing::ChromeCleanerController::IdleReason::
kCleanerDownloadFailed, kCleanerDownloadFailed,
SafetyCheckHandler::ChromeCleanerStatus::kError, SafetyCheckHandler::ChromeCleanerStatus::kError,
base::UTF8ToUTF16("An error occurred while Browser was checking your " base::UTF8ToUTF16("Something went wrong. Click for more details."))));
"computer for harmful software"))));
class SafetyCheckHandlerChromeCleanerNonIdleTest class SafetyCheckHandlerChromeCleanerNonIdleTest
: public SafetyCheckHandlerTest, : public SafetyCheckHandlerTest,
...@@ -1570,7 +1566,7 @@ TEST_F(SafetyCheckHandlerTest, CheckChromeCleaner_DisabledByAdmin) { ...@@ -1570,7 +1566,7 @@ TEST_F(SafetyCheckHandlerTest, CheckChromeCleaner_DisabledByAdmin) {
event, event,
"<a target=\"_blank\" " "<a target=\"_blank\" "
"href=\"https://support.google.com/chrome?p=your_administrator\">Your " "href=\"https://support.google.com/chrome?p=your_administrator\">Your "
"administrator</a> has disabled Browser's check for harmful software"); "administrator</a> has turned off checking for harmful software");
} }
TEST_F(SafetyCheckHandlerTest, CheckChromeCleaner_ObserverUpdateLogging) { TEST_F(SafetyCheckHandlerTest, CheckChromeCleaner_ObserverUpdateLogging) {
...@@ -1658,20 +1654,20 @@ TEST_F(SafetyCheckHandlerTest, CheckChromeCleanerRanDisplayString) { ...@@ -1658,20 +1654,20 @@ TEST_F(SafetyCheckHandlerTest, CheckChromeCleanerRanDisplayString) {
base::TimeDelta::FromSeconds(1); base::TimeDelta::FromSeconds(1);
// Display strings for given time deltas in seconds. // Display strings for given time deltas in seconds.
std::vector<std::tuple<std::string, int>> tuples{ std::vector<std::tuple<std::string, int>> tuples{
std::make_tuple("a moment ago.", 1), std::make_tuple("just now", 1),
std::make_tuple("a moment ago.", 59), std::make_tuple("just now", 59),
std::make_tuple("1 minute ago.", 60), std::make_tuple("1 minute ago", 60),
std::make_tuple("2 minutes ago.", 60 * 2), std::make_tuple("2 minutes ago", 60 * 2),
std::make_tuple("59 minutes ago.", 60 * 60 - 1), std::make_tuple("59 minutes ago", 60 * 60 - 1),
std::make_tuple("1 hour ago.", 60 * 60), std::make_tuple("1 hour ago", 60 * 60),
std::make_tuple("2 hours ago.", 60 * 60 * 2), std::make_tuple("2 hours ago", 60 * 60 * 2),
std::make_tuple("23 hours ago.", 60 * 60 * 23), std::make_tuple("23 hours ago", 60 * 60 * 23),
std::make_tuple("yesterday.", 60 * 60 * 24), std::make_tuple("yesterday", 60 * 60 * 24),
std::make_tuple("yesterday.", 60 * 60 * 24 * 2 - 1), std::make_tuple("yesterday", 60 * 60 * 24 * 2 - 1),
std::make_tuple("2 days ago.", 60 * 60 * 24 * 2), std::make_tuple("2 days ago", 60 * 60 * 24 * 2),
std::make_tuple("2 days ago.", 60 * 60 * 24 * 3 - 1), std::make_tuple("2 days ago", 60 * 60 * 24 * 3 - 1),
std::make_tuple("3 days ago.", 60 * 60 * 24 * 3), std::make_tuple("3 days ago", 60 * 60 * 24 * 3),
std::make_tuple("3 days ago.", 60 * 60 * 24 * 4 - 1)}; std::make_tuple("3 days ago", 60 * 60 * 24 * 4 - 1)};
// Test that above time deltas produce the corresponding display strings. // Test that above time deltas produce the corresponding display strings.
for (auto tuple : tuples) { for (auto tuple : tuples) {
const base::Time time = const base::Time time =
...@@ -1680,8 +1676,8 @@ TEST_F(SafetyCheckHandlerTest, CheckChromeCleanerRanDisplayString) { ...@@ -1680,8 +1676,8 @@ TEST_F(SafetyCheckHandlerTest, CheckChromeCleanerRanDisplayString) {
safety_check_->GetStringForChromeCleanerRan(time, system_time); safety_check_->GetStringForChromeCleanerRan(time, system_time);
ReplaceBrowserName(&display_string); ReplaceBrowserName(&display_string);
EXPECT_EQ(base::UTF8ToUTF16( EXPECT_EQ(base::UTF8ToUTF16(
base::StrCat({"Browser didn't find known harmful software on " base::StrCat({"Browser didn't find harmful software on "
"your computer. Last checked: ", "your computer • Checked ",
std::get<0>(tuple)})), std::get<0>(tuple)})),
display_string); display_string);
} }
......
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