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() {
status_ = Status::CANCELLED;
notification_->set_type(message_center::NOTIFICATION_TYPE_SIMPLE);
notification_->set_accent_color(ash::kSystemNotificationColorNormal);
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();
NotificationDisplayService::GetForProfile(profile_)->Close(
NotificationHandler::Type::TRANSIENT, notification_->id());
}
void CrostiniExportImportNotification::SetStatusFailed() {
......
......@@ -289,8 +289,8 @@ TEST_F(CrostiniExportImportTest, TestExportCancelled) {
// CANCELLED:
SendExportProgress(
vm_tools::cicerone::ExportLxdContainerProgressSignal_Status_CANCELLED);
EXPECT_EQ(notification->status(),
CrostiniExportImportNotification::Status::CANCELLED);
EXPECT_FALSE(
crostini_export_import_->GetNotificationForTesting(container_id_));
thread_bundle_.RunUntilIdle();
EXPECT_FALSE(base::PathExists(tarball_));
}
......@@ -317,8 +317,8 @@ TEST_F(CrostiniExportImportTest, TestExportDoneBeforeCancelled) {
// DONE: Completed before cancel processed, file should be deleted.
SendExportProgress(
vm_tools::cicerone::ExportLxdContainerProgressSignal_Status_DONE);
EXPECT_EQ(notification->status(),
CrostiniExportImportNotification::Status::CANCELLED);
EXPECT_FALSE(
crostini_export_import_->GetNotificationForTesting(container_id_));
thread_bundle_.RunUntilIdle();
EXPECT_FALSE(base::PathExists(tarball_));
}
......@@ -416,8 +416,8 @@ TEST_F(CrostiniExportImportTest, TestImportCancelled) {
// CANCELLED:
SendImportProgress(
vm_tools::cicerone::ImportLxdContainerProgressSignal_Status_CANCELLED);
EXPECT_EQ(notification->status(),
CrostiniExportImportNotification::Status::CANCELLED);
EXPECT_FALSE(
crostini_export_import_->GetNotificationForTesting(container_id_));
}
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