From 4b63fd381cfd2d050ba1d89704d3ca728bf43db4 Mon Sep 17 00:00:00 2001 From: "tzik@chromium.org" Date: Mon, 5 Nov 2012 05:42:10 +0000 Subject: Revert 165900 - Move chrome/test/data/chromeos/gdata to chrome/test/data/gdata to use it in tests for non-ChromeOS platform. BUG=149788 Review URL: https://codereview.chromium.org/11293005 TBR=tzik@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165901 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/google_apis/gdata_wapi_parser_unittest.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'chrome/browser/google_apis/gdata_wapi_parser_unittest.cc') diff --git a/chrome/browser/google_apis/gdata_wapi_parser_unittest.cc b/chrome/browser/google_apis/gdata_wapi_parser_unittest.cc index e2420b6..c428eb1 100644 --- a/chrome/browser/google_apis/gdata_wapi_parser_unittest.cc +++ b/chrome/browser/google_apis/gdata_wapi_parser_unittest.cc @@ -28,8 +28,12 @@ namespace google_apis { class GDataWAPIParserTest : public testing::Test { protected: static DocumentEntry* LoadDocumentEntryFromXml(const std::string& filename) { - FilePath path = test_util::GetTestFilePath(filename); + FilePath path; std::string error; + PathService::Get(chrome::DIR_TEST_DATA, &path); + path = path.AppendASCII("chromeos") + .AppendASCII("gdata") + .AppendASCII(filename.c_str()); EXPECT_TRUE(file_util::PathExists(path)) << "Couldn't find " << path.value(); std::string contents; @@ -50,6 +54,9 @@ class GDataWAPIParserTest : public testing::Test { } }; +// TODO(nhiroki): Make it possible to run these tests on any platforms after +// moving json files to out of 'chromeos' directory (http://crbug.com/149788). +#if defined(OS_CHROMEOS) // Test document feed parsing. TEST_F(GDataWAPIParserTest, DocumentFeedJsonParser) { std::string error; @@ -182,7 +189,7 @@ TEST_F(GDataWAPIParserTest, DocumentFeedJsonParser) { // Test document feed parsing. TEST_F(GDataWAPIParserTest, DocumentEntryXmlParser) { - scoped_ptr entry(LoadDocumentEntryFromXml("gdata/entry.xml")); + scoped_ptr entry(LoadDocumentEntryFromXml("entry.xml")); ASSERT_TRUE(entry.get()); EXPECT_EQ(ENTRY_KIND_FILE, entry->kind()); @@ -329,6 +336,7 @@ TEST_F(GDataWAPIParserTest, AccountMetadataFeedParser) { EXPECT_EQ(1U, second_app->primary_extensions().size()); EXPECT_EQ(0U, second_app->secondary_extensions().size()); } +#endif // OS_CHROMEOS // Test file extension checking in DocumentEntry::HasDocumentExtension(). TEST_F(GDataWAPIParserTest, DocumentEntryHasDocumentExtension) { -- cgit v1.1