| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "chrome/browser/first_run.h" | 6 #include "chrome/browser/first_run/first_run.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 | 8 |
| 9 class FirstRunTest : public testing::Test { | 9 class FirstRunTest : public testing::Test { |
| 10 protected: | 10 protected: |
| 11 virtual void SetUp() { | 11 virtual void SetUp() { |
| 12 FirstRun::GetFirstRunSentinelFilePath(&sentinel_path_); | 12 FirstRun::GetFirstRunSentinelFilePath(&sentinel_path_); |
| 13 } | 13 } |
| 14 | 14 |
| 15 FilePath sentinel_path_; | 15 FilePath sentinel_path_; |
| 16 }; | 16 }; |
| 17 | 17 |
| 18 TEST_F(FirstRunTest, RemoveSentinel) { | 18 TEST_F(FirstRunTest, RemoveSentinel) { |
| 19 EXPECT_TRUE(FirstRun::CreateSentinel()); | 19 EXPECT_TRUE(FirstRun::CreateSentinel()); |
| 20 EXPECT_TRUE(file_util::PathExists(sentinel_path_)); | 20 EXPECT_TRUE(file_util::PathExists(sentinel_path_)); |
| 21 | 21 |
| 22 EXPECT_TRUE(FirstRun::RemoveSentinel()); | 22 EXPECT_TRUE(FirstRun::RemoveSentinel()); |
| 23 EXPECT_FALSE(file_util::PathExists(sentinel_path_)); | 23 EXPECT_FALSE(file_util::PathExists(sentinel_path_)); |
| 24 } | 24 } |
| OLD | NEW |