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

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

Issue 2339933004: [BlobStorage] BlobMemoryController & tests (Closed)
Patch Set: Comments, and made task base class for hopefully more simplicity 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_async_builder_host.h"
6
7 #include <stdint.h>
8 #include <string>
9
10 #include "base/logging.h"
11 #include "storage/browser/blob/blob_data_builder.h"
12 #include "storage/common/data_element.h"
13 #include "testing/gtest/include/gtest/gtest.h"
14
15 namespace storage {
16
17 TEST(BlobDataBuilderTest, TestFutureFiles) {
18 const std::string kId = "id";
19
20 DataElement element;
21 element.SetToFilePath(BlobDataBuilder::GetFutureFileItemPath(0));
22 EXPECT_TRUE(BlobDataBuilder::IsFutureFileItem(element));
23 EXPECT_EQ(0ull, BlobDataBuilder::GetFutureFileID(element));
24
25 BlobDataBuilder builder(kId);
26 builder.AppendFutureFile(0, 10, 0);
27 EXPECT_TRUE(
28 BlobDataBuilder::IsFutureFileItem(builder.items_[0]->data_element()));
29 EXPECT_EQ(0ull, BlobDataBuilder::GetFutureFileID(
30 builder.items_[0]->data_element()));
31 }
32
33 } // namespace storage
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698