Commit 8acca942 authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

Minor code / comment fixes for drive_sync_handler_unittest

 - update the comments to match what the actually code does
 - check progress center item state like other unittests do

No change in test behavior.

Bug: 907964
Tbr: slangley
No-try: true
Change-Id: I8f307b699d5005cbdefe346d838088610c9f88cf
Reviewed-on: https://chromium-review.googlesource.com/c/1352072Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611065}
parent 2c2156f5
......@@ -118,7 +118,7 @@ function testUniqueErrorIds() {
fileUrl: '',
});
// Check that this created second item.
// Check that this created a second item.
assertEquals(2, progressCenter.getItemCount());
}
......@@ -139,7 +139,7 @@ function testErrorDedupe() {
fileUrl: '',
});
// Check that this created second item.
// Check that this did not create a second item.
assertEquals(1, progressCenter.getItemCount());
}
......@@ -157,14 +157,16 @@ function testOffline() {
// Check that this created one item.
assertEquals(1, progressCenter.getItemCount());
assertEquals(
ProgressItemState.PROGRESSING, progressCenter.items['drive-sync'].state);
var item = progressCenter.items['drive-sync'];
assertEquals(ProgressItemState.PROGRESSING, item.state);
assertTrue(driveSyncHandler.syncing);
// Go offline.
chrome.fileManagerPrivate.onDriveConnectionStatusChanged.listener_();
// Check that this item was cancelled.
assertEquals(1, progressCenter.getItemCount());
assertEquals(
ProgressItemState.CANCELED, progressCenter.items['drive-sync'].state);
item = progressCenter.items['drive-sync'];
assertEquals(ProgressItemState.CANCELED, item.state);
assertFalse(driveSyncHandler.syncing);
}
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