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

Unified Diff: net/ftp/ftp_directory_listing_parser_netware_unittest.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_netware.cc ('k') | net/ftp/ftp_directory_listing_parser_os2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ftp/ftp_directory_listing_parser_netware_unittest.cc
diff --git a/net/ftp/ftp_directory_listing_parser_netware_unittest.cc b/net/ftp/ftp_directory_listing_parser_netware_unittest.cc
deleted file mode 100644
index 11c695f80f878a8e33dd26a69256cf56a1c4fa5e..0000000000000000000000000000000000000000
--- a/net/ftp/ftp_directory_listing_parser_netware_unittest.cc
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/ftp/ftp_directory_listing_parser_unittest.h"
-
-#include "base/format_macros.h"
-#include "base/strings/string_util.h"
-#include "base/strings/stringprintf.h"
-#include "base/strings/utf_string_conversions.h"
-#include "net/ftp/ftp_directory_listing_parser_netware.h"
-
-namespace net {
-
-namespace {
-
-typedef FtpDirectoryListingParserTest FtpDirectoryListingParserNetwareTest;
-
-TEST_F(FtpDirectoryListingParserNetwareTest, Good) {
- const struct SingleLineTestData good_cases[] = {
- { "d [RWCEAFMS] ftpadmin 512 Jan 29 2004 pub",
- FtpDirectoryListingEntry::DIRECTORY, "pub", -1,
- 2004, 1, 29, 0, 0 },
- { "- [RW------] ftpadmin 123 Nov 11 18:25 afile",
- FtpDirectoryListingEntry::FILE, "afile", 123,
- 1994, 11, 11, 18, 25 },
- { "d [RWCEAFMS] daniel 512 May 17 2010 NVP anyagok",
- FtpDirectoryListingEntry::DIRECTORY, "NVP anyagok", -1,
- 2010, 5, 17, 0, 0 },
- };
- for (size_t i = 0; i < arraysize(good_cases); i++) {
- SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "]: %s", i,
- good_cases[i].input));
-
- std::vector<base::string16> lines(
- GetSingleLineTestCase(good_cases[i].input));
-
- // The parser requires a "total n" line before accepting regular input.
- lines.insert(lines.begin(), base::ASCIIToUTF16("total 1"));
-
- std::vector<FtpDirectoryListingEntry> entries;
- EXPECT_TRUE(ParseFtpDirectoryListingNetware(lines,
- GetMockCurrentTime(),
- &entries));
- VerifySingleLineTestCase(good_cases[i], entries);
- }
-}
-
-TEST_F(FtpDirectoryListingParserNetwareTest, Bad) {
- const char* const bad_cases[] = {
- " foo",
- "garbage",
- "d [] ftpadmin 512 Jan 29 2004 pub",
- "d [XGARBAGE] ftpadmin 512 Jan 29 2004 pub",
- "d [RWCEAFMS] 512 Jan 29 2004 pub",
- "d [RWCEAFMS] ftpadmin -1 Jan 29 2004 pub",
- "l [RW------] ftpadmin 512 Jan 29 2004 pub",
- };
- for (size_t i = 0; i < arraysize(bad_cases); i++) {
- SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "]: %s", i,
- bad_cases[i]));
-
- std::vector<base::string16> lines(GetSingleLineTestCase(bad_cases[i]));
-
- // The parser requires a "total n" line before accepting regular input.
- lines.insert(lines.begin(), base::ASCIIToUTF16("total 1"));
-
- std::vector<FtpDirectoryListingEntry> entries;
- EXPECT_FALSE(ParseFtpDirectoryListingNetware(lines,
- GetMockCurrentTime(),
- &entries));
- }
-}
-
-} // namespace
-
-} // namespace net
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_netware.cc ('k') | net/ftp/ftp_directory_listing_parser_os2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698