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

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

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

Powered by Google App Engine
This is Rietveld 408576698