summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-11 01:29:39 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-11 01:29:39 +0000
commit7258924d59592745795ec1c12eafb20a30625826 (patch)
tree5227f23676d7deb43d461bcca617a13ab41a15ed /chrome/common
parent178f127ef64fb51620cee821156d7258c8719f01 (diff)
downloadchromium_src-7258924d59592745795ec1c12eafb20a30625826.zip
chromium_src-7258924d59592745795ec1c12eafb20a30625826.tar.gz
chromium_src-7258924d59592745795ec1c12eafb20a30625826.tar.bz2
Unittest gardening on MacOS X:
- base/gfx/rect_unittest.cc had a typo - base/waitable_event_watcher_unittest.cc enabled - chrome/common/pref_member_unittest.cc enabled - chrome/common/json_value_serializer_unittest.cc had a Windows-only bit which currently works fine on Mac. - These worked once an anonymous namespace was cleared up: chrome/browser/history/query_parser_unittest.cc chrome/browser/history/url_database_unittest.cc chrome/common/json_value_serializer_unittest.cc Some required minor editting to remove anonymous namespaces for test classes. Review URL: http://codereview.chromium.org/20241 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9539 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/json_value_serializer_unittest.cc47
1 files changed, 21 insertions, 26 deletions
diff --git a/chrome/common/json_value_serializer_unittest.cc b/chrome/common/json_value_serializer_unittest.cc
index 30f6320..1fc9e97 100644
--- a/chrome/common/json_value_serializer_unittest.cc
+++ b/chrome/common/json_value_serializer_unittest.cc
@@ -221,31 +221,27 @@ TEST(JSONValueSerializerTest, JSONReaderComments) {
ASSERT_FALSE(root.get());
}
-namespace {
- class JSONFileValueSerializerTest : public testing::Test {
- protected:
- virtual void SetUp() {
- // Name a subdirectory of the temp directory.
- ASSERT_TRUE(PathService::Get(base::DIR_TEMP, &test_dir_));
- file_util::AppendToPath(&test_dir_, L"JSONFileValueSerializerTest");
-
- // Create a fresh, empty copy of this directory.
- file_util::Delete(test_dir_, true);
- file_util::CreateDirectory(test_dir_);
- }
- virtual void TearDown() {
- // Clean up test directory
- ASSERT_TRUE(file_util::Delete(test_dir_, false));
- ASSERT_FALSE(file_util::PathExists(test_dir_));
- }
-
- // the path to temporary directory used to contain the test operations
- std::wstring test_dir_;
- };
-} // anonymous namespace
-
-// TODO(port): Enable these when PathService::Get with DIR_TEST_DATA is ported.
-#if defined(OS_WIN)
+class JSONFileValueSerializerTest : public testing::Test {
+protected:
+ virtual void SetUp() {
+ // Name a subdirectory of the temp directory.
+ ASSERT_TRUE(PathService::Get(base::DIR_TEMP, &test_dir_));
+ file_util::AppendToPath(&test_dir_, L"JSONFileValueSerializerTest");
+
+ // Create a fresh, empty copy of this directory.
+ file_util::Delete(test_dir_, true);
+ file_util::CreateDirectory(test_dir_);
+ }
+ virtual void TearDown() {
+ // Clean up test directory
+ ASSERT_TRUE(file_util::Delete(test_dir_, false));
+ ASSERT_FALSE(file_util::PathExists(test_dir_));
+ }
+
+ // the path to temporary directory used to contain the test operations
+ std::wstring test_dir_;
+};
+
TEST_F(JSONFileValueSerializerTest, Roundtrip) {
std::wstring original_file_path;
ASSERT_TRUE(
@@ -332,4 +328,3 @@ TEST_F(JSONFileValueSerializerTest, NoWhitespace) {
root.reset(serializer.Deserialize(NULL));
ASSERT_TRUE(root.get());
}
-#endif // defined(OS_WIN)