Commit bed3bc2d authored by Julian Watson's avatar Julian Watson Committed by Commit Bot

crostini: remove backup and restore cancelled notifications

BUG=993656

Change-Id: I820f71f0063c89bf57c06c08fb1faa94ef9a32f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1752275
Auto-Submit: Julian Watson <juwa@google.com>
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Reviewed-by: default avatarJoel Hockey <joelhockey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#686735}
parent 36cba543
...@@ -155,17 +155,8 @@ void CrostiniExportImportNotification::SetStatusCancelled() { ...@@ -155,17 +155,8 @@ void CrostiniExportImportNotification::SetStatusCancelled() {
status_ = Status::CANCELLED; status_ = Status::CANCELLED;
notification_->set_type(message_center::NOTIFICATION_TYPE_SIMPLE); NotificationDisplayService::GetForProfile(profile_)->Close(
notification_->set_accent_color(ash::kSystemNotificationColorNormal); NotificationHandler::Type::TRANSIENT, notification_->id());
notification_->set_title(l10n_util::GetStringUTF16(
type_ == ExportImportType::EXPORT
? IDS_CROSTINI_EXPORT_NOTIFICATION_TITLE_CANCELLED
: IDS_CROSTINI_IMPORT_NOTIFICATION_TITLE_CANCELLED));
notification_->set_message({});
notification_->set_buttons({});
notification_->set_never_timeout(false);
ForceRedisplay();
} }
void CrostiniExportImportNotification::SetStatusFailed() { void CrostiniExportImportNotification::SetStatusFailed() {
......
...@@ -289,8 +289,8 @@ TEST_F(CrostiniExportImportTest, TestExportCancelled) { ...@@ -289,8 +289,8 @@ TEST_F(CrostiniExportImportTest, TestExportCancelled) {
// CANCELLED: // CANCELLED:
SendExportProgress( SendExportProgress(
vm_tools::cicerone::ExportLxdContainerProgressSignal_Status_CANCELLED); vm_tools::cicerone::ExportLxdContainerProgressSignal_Status_CANCELLED);
EXPECT_EQ(notification->status(), EXPECT_FALSE(
CrostiniExportImportNotification::Status::CANCELLED); crostini_export_import_->GetNotificationForTesting(container_id_));
thread_bundle_.RunUntilIdle(); thread_bundle_.RunUntilIdle();
EXPECT_FALSE(base::PathExists(tarball_)); EXPECT_FALSE(base::PathExists(tarball_));
} }
...@@ -317,8 +317,8 @@ TEST_F(CrostiniExportImportTest, TestExportDoneBeforeCancelled) { ...@@ -317,8 +317,8 @@ TEST_F(CrostiniExportImportTest, TestExportDoneBeforeCancelled) {
// DONE: Completed before cancel processed, file should be deleted. // DONE: Completed before cancel processed, file should be deleted.
SendExportProgress( SendExportProgress(
vm_tools::cicerone::ExportLxdContainerProgressSignal_Status_DONE); vm_tools::cicerone::ExportLxdContainerProgressSignal_Status_DONE);
EXPECT_EQ(notification->status(), EXPECT_FALSE(
CrostiniExportImportNotification::Status::CANCELLED); crostini_export_import_->GetNotificationForTesting(container_id_));
thread_bundle_.RunUntilIdle(); thread_bundle_.RunUntilIdle();
EXPECT_FALSE(base::PathExists(tarball_)); EXPECT_FALSE(base::PathExists(tarball_));
} }
...@@ -416,8 +416,8 @@ TEST_F(CrostiniExportImportTest, TestImportCancelled) { ...@@ -416,8 +416,8 @@ TEST_F(CrostiniExportImportTest, TestImportCancelled) {
// CANCELLED: // CANCELLED:
SendImportProgress( SendImportProgress(
vm_tools::cicerone::ImportLxdContainerProgressSignal_Status_CANCELLED); vm_tools::cicerone::ImportLxdContainerProgressSignal_Status_CANCELLED);
EXPECT_EQ(notification->status(), EXPECT_FALSE(
CrostiniExportImportNotification::Status::CANCELLED); crostini_export_import_->GetNotificationForTesting(container_id_));
} }
TEST_F(CrostiniExportImportTest, TestImportDoneBeforeCancelled) { TEST_F(CrostiniExportImportTest, TestImportDoneBeforeCancelled) {
......
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