• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_util.h"
6 #include "chrome/browser/first_run/first_run.h"
7 #include "testing/gtest/include/gtest/gtest.h"
8 
9 class FirstRunTest : public testing::Test {
10  protected:
SetUp()11   virtual void SetUp() {
12     FirstRun::GetFirstRunSentinelFilePath(&sentinel_path_);
13   }
14 
15   FilePath sentinel_path_;
16 };
17 
TEST_F(FirstRunTest,RemoveSentinel)18 TEST_F(FirstRunTest, RemoveSentinel) {
19   EXPECT_TRUE(FirstRun::CreateSentinel());
20   EXPECT_TRUE(file_util::PathExists(sentinel_path_));
21 
22   EXPECT_TRUE(FirstRun::RemoveSentinel());
23   EXPECT_FALSE(file_util::PathExists(sentinel_path_));
24 }
25