diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-23 00:06:08 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-23 00:06:08 +0000 |
commit | e3b2bdf416fb07b9ca80f7182e9f6a97eabb30a2 (patch) | |
tree | 339fd96df42f6344c1926f2326a8cac2d5661305 /chrome/browser/upload_list_unittest.cc | |
parent | 83f67b4efa01fc775e8d67f968f4e35d0a351036 (diff) | |
download | chromium_src-e3b2bdf416fb07b9ca80f7182e9f6a97eabb30a2.zip chromium_src-e3b2bdf416fb07b9ca80f7182e9f6a97eabb30a2.tar.gz chromium_src-e3b2bdf416fb07b9ca80f7182e9f6a97eabb30a2.tar.bz2 |
Move UploadList class to base/
I want to move CrashUploadList to components/breakpad. However, since
other classes in chrome/ also inherit from UploadList, I need to move it
to a "neutral" location.
BUG=247431
R=mark@chromium.org
Review URL: https://chromiumcodereview.appspot.com/19955002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213003 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/upload_list_unittest.cc')
-rw-r--r-- | chrome/browser/upload_list_unittest.cc | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/chrome/browser/upload_list_unittest.cc b/chrome/browser/upload_list_unittest.cc deleted file mode 100644 index 153f9db..0000000 --- a/chrome/browser/upload_list_unittest.cc +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2013 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 <string> - -#include "base/files/file_path.h" -#include "base/memory/ref_counted.h" -#include "base/strings/string_number_conversions.h" -#include "base/time/time.h" -#include "chrome/browser/upload_list.h" -#include "testing/gtest/include/gtest/gtest.h" - -// Test that UploadList can parse a vector of log entry strings to a vector of -// UploadInfo objects. See the UploadList declaration for a description of the -// log entry string format. -TEST(UploadListTest, ParseLogEntries) { - const char kTestTime[] = "1234567890"; - const char kTestID[] = "0123456789abcdef"; - std::string test_entry = kTestTime; - test_entry += ","; - test_entry.append(kTestID, sizeof(kTestID)); - - scoped_refptr<UploadList> upload_list = - new UploadList(NULL, base::FilePath()); - - // 1 entry. - std::vector<std::string> log_entries; - log_entries.push_back(test_entry); - upload_list->ParseLogEntries(log_entries); - EXPECT_EQ(1u, upload_list->uploads_.size()); - double time_double = upload_list->uploads_[0].time.ToDoubleT(); - EXPECT_STREQ(kTestTime, base::DoubleToString(time_double).c_str()); - EXPECT_STREQ(kTestID, upload_list->uploads_[0].id.c_str()); - - // Add 3 more entries. - log_entries.push_back(test_entry); - log_entries.push_back(test_entry); - upload_list->ParseLogEntries(log_entries); - EXPECT_EQ(4u, upload_list->uploads_.size()); - time_double = upload_list->uploads_[3].time.ToDoubleT(); - EXPECT_STREQ(kTestTime, base::DoubleToString(time_double).c_str()); - EXPECT_STREQ(kTestID, upload_list->uploads_[3].id.c_str()); -} |