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

Side by Side Diff: base/mac_util_unittest.cc

Issue 159668: First cut at Safari Import - Home Page & History Only. (Closed)
Patch Set: Fix Stuart's comments. Created 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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/mac_util.h" 5 #include "base/mac_util.h"
6 6
7 #include <ApplicationServices/ApplicationServices.h> 7 #include <ApplicationServices/ApplicationServices.h>
8 8
9 #include "base/file_path.h"
9 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
10 #include "testing/platform_test.h" 11 #include "testing/platform_test.h"
11 12
12 typedef PlatformTest MacUtilTest; 13 typedef PlatformTest MacUtilTest;
13 14
14 TEST_F(MacUtilTest, TestFSRef) { 15 TEST_F(MacUtilTest, TestFSRef) {
15 FSRef ref; 16 FSRef ref;
16 std::string path("/System/Library"); 17 std::string path("/System/Library");
17 18
18 ASSERT_TRUE(mac_util::FSRefFromPath(path, &ref)); 19 ASSERT_TRUE(mac_util::FSRefFromPath(path, &ref));
19 EXPECT_EQ(path, mac_util::PathFromFSRef(ref)); 20 EXPECT_EQ(path, mac_util::PathFromFSRef(ref));
20 } 21 }
22
23 TEST_F(MacUtilTest, TestLibraryPath) {
24 FilePath library_dir = mac_util::GetUserLibraryPath();
25 // Make sure the string isn't empty.
26 EXPECT_FALSE(library_dir.value().empty());
27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698