Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5861)

Unified Diff: chrome/installer/mac/app/testing/Unpacker_test.mm

Issue 2293923005: General comment cleaning / refactoring for Mac Installer (Closed)
Patch Set: Ivan fixes Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/installer/mac/app/testing/Unpacker_test.mm
diff --git a/chrome/installer/mac/app/testing/Unpacker_test.mm b/chrome/installer/mac/app/testing/Unpacker_test.mm
index 3f6d6326b7cf85b6de7f1aba1a4b752835401edf..b447623c5cc0f8e31ddd7b040c2e9f02962fbaca 100644
--- a/chrome/installer/mac/app/testing/Unpacker_test.mm
+++ b/chrome/installer/mac/app/testing/Unpacker_test.mm
@@ -74,12 +74,12 @@
namespace {
TEST(UnpackerTest, IntegrationTest) {
- // create objects and semaphore
+ // Create objects and semaphore
Unpacker* unpack = [[Unpacker alloc] init];
TestDelegate* test_delegate = [[TestDelegate alloc] init];
unpack.delegate = test_delegate;
- // get a disk image to use to test
+ // Get a disk image to use to test
base::FilePath originalPath;
PathService::Get(base::DIR_SOURCE_ROOT, &originalPath);
originalPath = originalPath.AppendASCII("chrome/test/data/mac_installer/");
@@ -88,22 +88,25 @@ TEST(UnpackerTest, IntegrationTest) {
(originalPath.AppendASCII("test-dmg.dmg")).value());
NSString* diskImageCopiedPath = base::SysUTF8ToNSString(
(originalPath.AppendASCII("test-dmg2.dmg")).value());
+ // The unpacker moves (not copies) a downloaded disk image directly into its
+ // own temporary directory, so if the below copy didn't happen, `test-dmg.dmg`
+ // would disappear every time this test was run
[[NSFileManager defaultManager] copyItemAtPath:diskImageOriginalPath
toPath:diskImageCopiedPath
error:nil];
NSURL* dmgURL = [NSURL fileURLWithPath:diskImageCopiedPath isDirectory:NO];
- // start mount step
+ // Start mount step
[unpack mountDMGFromURL:dmgURL];
[test_delegate wait];
- // is the disk image mounted?
+ // Is the disk image mounted?
ASSERT_TRUE([test_delegate pass]);
- // start unmount step
+ // Start unmount step
[unpack unmountDMG];
[test_delegate wait];
- // is the disk image gone?
+ // Is the disk image gone?
EXPECT_TRUE([test_delegate pass]);
}
« chrome/installer/mac/app/copy_to_disk.sh ('K') | « chrome/installer/mac/app/copy_to_disk.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698