src/base/fuchsia/time_zone_data_unittest.cc
TEST_F(TimeZoneDataTest, CompareSystemRevisionWithExpected) {
  if (!base::PathExists(base::FilePath(kRevisionFilePath))) {
    LOG(INFO) << "Skipped test because tzdata config is not present";
    return;
  }

  // ResetIcu() ensures that time zone data is loaded from the default location.

  ASSERT_TRUE(InitializeICU());
  std::string expected;
  ASSERT_TRUE(
      base::ReadFileToString(base::FilePath(kRevisionFilePath), &expected));
  std::string actual;
  GetActualRevision(&actual);
  EXPECT_EQ(expected, actual);
}
// Loads a file revision.txt from the actual underlying filesystem, which
// contains the tzdata version we expect to be able to load.  It then attempts
// to load this configuration from the default path and compares the version it
// obtained from the load with the expected version, failing on version
// mismatch.
//
// In Fuchsia build bot setup, we ensure that the file revision.txt exists, so
// that this test is not skipped. In Chromium build bot setup, this file may
// not be present, in which case we skip running this test.
Loads a file revision.txt from the actual underlying filesystem, which
contains the tzdata version we expect to be able to load.  It then attempts
to load this configuration from the default path and compares the version it
obtained from the load with the expected version, failing on version
mismatch.

In Fuchsia build bot setup, we ensure that the file revision.txt exists, so
that this test is not skipped. In Chromium build bot setup, this file may
not be present, in which case we skip running this test.
Loads a file revision . txt from the actual underlying filesystem which contains the tzdata version we expect to be able to load . It then attempts to load this configuration from the default path and compares the version it obtained from the load with the expected version failing on version mismatch . In Fuchsia build bot setup we ensure that the file revision . txt exists so that this test is not skipped . In Chromium build bot setup this file may not be present in which case we skip running this test .
TEST_F(TimeZoneDataTest, CompareSystemRevisionWithExpected) {
  if (!base::PathExists(base::FilePath(kRevisionFilePath))) {
    LOG(INFO) << "Skipped test because tzdata config is not present";
    return;
  }
  ASSERT_TRUE(InitializeICU());
  std::string expected;
  ASSERT_TRUE(
      base::ReadFileToString(base::FilePath(kRevisionFilePath), &expected));
  std::string actual;
  GetActualRevision(&actual);
  EXPECT_EQ(expected, actual);
}
TEST_F ( TimeZoneDataTest , CompareSystemRevisionWithExpected ) { if ( ! base :: PathExists ( base :: FilePath ( kRevisionFilePath ) ) ) { LOG ( INFO ) << " " ; return ; } ASSERT_TRUE ( InitializeICU ( ) ) ; std :: string expected ; ASSERT_TRUE ( base :: ReadFileToString ( base :: FilePath ( kRevisionFilePath ) , & expected ) ) ; std :: string actual ; GetActualRevision ( & actual ) ; EXPECT_EQ ( expected , actual ) ; }
Loads a file revision.txt from the actual underlying filesystem, which
contains the tzdata version we expect to be able to load.
Loads a file revision . txt from the actual underlying filesystem which contains the tzdata version we expect to be able to load .
// ResetIcu() ensures that time zone data is loaded from the default location.