OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "base/file_path.h" |
| 6 #include "base/file_util.h" |
| 7 #include "chrome/installer/test/alternate_version_generator.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 |
| 10 namespace { |
| 11 const wchar_t kMiniInstallerExe[] = L"mini_installer.exe"; |
| 12 } // namespace |
| 13 |
| 14 // Boilerplate for a future upgrade scenario test. |
| 15 class UpgradeTest : public testing::Test { |
| 16 public: |
| 17 // Generate a newer version of mini_installer.exe. |
| 18 static void SetUpTestCase() { |
| 19 ASSERT_TRUE(file_util::CreateTemporaryFile(&next_mini_installer_path_)); |
| 20 ASSERT_TRUE( |
| 21 upgrade_test::GenerateNextVersion(FilePath(&kMiniInstallerExe[0]), |
| 22 next_mini_installer_path_)); |
| 23 } |
| 24 |
| 25 // Clean up by deleting the created newer version of mini_installer.exe. |
| 26 static void TearDownTestCase() { |
| 27 EXPECT_TRUE(file_util::Delete(next_mini_installer_path_, false)); |
| 28 } |
| 29 private: |
| 30 static FilePath next_mini_installer_path_; |
| 31 }; // class UpgradeTest |
| 32 |
| 33 FilePath UpgradeTest::next_mini_installer_path_; |
| 34 |
| 35 TEST_F(UpgradeTest, DoNothing) { |
| 36 } |
OLD | NEW |