Index: content/browser/blob_storage/blob_data_builder_unittest.cc |
diff --git a/content/browser/blob_storage/blob_data_builder_unittest.cc b/content/browser/blob_storage/blob_data_builder_unittest.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f1fc6a9a6a6b1be00c2a5445f9219ae53b5d0e57 |
--- /dev/null |
+++ b/content/browser/blob_storage/blob_data_builder_unittest.cc |
@@ -0,0 +1,31 @@ |
+// Copyright 2016 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 "storage/browser/blob/blob_data_builder.h" |
+ |
+#include <string> |
+ |
+#include "base/logging.h" |
+#include "storage/common/data_element.h" |
+#include "testing/gtest/include/gtest/gtest.h" |
+ |
+namespace storage { |
+ |
+TEST(BlobDataBuilderTest, TestFutureFiles) { |
+ const std::string kId = "id"; |
+ |
+ DataElement element; |
+ element.SetToFilePath(BlobDataBuilder::GetFutureFileItemPath(0)); |
+ EXPECT_TRUE(BlobDataBuilder::IsFutureFileItem(element)); |
+ EXPECT_EQ(0ull, BlobDataBuilder::GetFutureFileID(element)); |
+ |
+ BlobDataBuilder builder(kId); |
+ builder.AppendFutureFile(0, 10, 0); |
+ EXPECT_TRUE( |
+ BlobDataBuilder::IsFutureFileItem(builder.items_[0]->data_element())); |
+ EXPECT_EQ(0ull, BlobDataBuilder::GetFutureFileID( |
+ builder.items_[0]->data_element())); |
+} |
+ |
+} // namespace storage |