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

Side by Side Diff: content/browser/blob_storage/blob_data_builder_unittest.cc

Issue 2339933004: [BlobStorage] BlobMemoryController & tests (Closed)
Patch Set: histograms and windows fix Created 4 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "storage/browser/blob/blob_data_builder.h"
6
7 #include <string>
8
9 #include "base/logging.h"
10 #include "storage/common/data_element.h"
11 #include "testing/gtest/include/gtest/gtest.h"
12
13 namespace storage {
14
15 TEST(BlobDataBuilderTest, TestFutureFiles) {
16 const std::string kId = "id";
17
18 DataElement element;
19 element.SetToFilePath(BlobDataBuilder::GetFutureFileItemPath(0));
20 EXPECT_TRUE(BlobDataBuilder::IsFutureFileItem(element));
21 EXPECT_EQ(0ull, BlobDataBuilder::GetFutureFileID(element));
22
23 BlobDataBuilder builder(kId);
24 builder.AppendFutureFile(0, 10, 0);
25 EXPECT_TRUE(
26 BlobDataBuilder::IsFutureFileItem(builder.items_[0]->data_element()));
27 EXPECT_EQ(0ull, BlobDataBuilder::GetFutureFileID(
28 builder.items_[0]->data_element()));
29 }
30
31 } // namespace storage
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698