| Index: components/history/core/browser/download_slice_info_unittest.cc
|
| diff --git a/components/history/core/browser/download_slice_info_unittest.cc b/components/history/core/browser/download_slice_info_unittest.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5a7f625558c21fc4ec3c0a8567e3d07ee7957e7a
|
| --- /dev/null
|
| +++ b/components/history/core/browser/download_slice_info_unittest.cc
|
| @@ -0,0 +1,22 @@
|
| +// Copyright 2017 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 "download_slice_info.h"
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +
|
| +namespace history {
|
| +
|
| +TEST(DownloadSliceInfoTest, CompareDownloadSliceInfo) {
|
| + DownloadSliceInfo info1(1, 500, 10);
|
| + DownloadSliceInfo info2(1, 500, 1000);
|
| + EXPECT_FALSE(info1 == info2);
|
| +
|
| + info1.received_bytes = 1000;
|
| + EXPECT_TRUE(info1 == info2);
|
| +
|
| + info1.offset = 1;
|
| + EXPECT_FALSE(info1 == info2);
|
| +}
|
| +
|
| +} // namespace history
|
|
|