OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 #include "content/browser/fileapi/blob_storage_host.h" | 11 #include "content/browser/fileapi/blob_storage_host.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 #include "webkit/browser/blob/blob_data_handle.h" | 13 #include "storage/browser/blob/blob_data_handle.h" |
14 #include "webkit/browser/blob/blob_storage_context.h" | 14 #include "storage/browser/blob/blob_storage_context.h" |
15 | 15 |
16 using webkit_blob::BlobDataHandle; | 16 using storage::BlobDataHandle; |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
20 namespace { | 20 namespace { |
21 void SetupBasicBlob(BlobStorageHost* host, const std::string& id) { | 21 void SetupBasicBlob(BlobStorageHost* host, const std::string& id) { |
22 EXPECT_TRUE(host->StartBuildingBlob(id)); | 22 EXPECT_TRUE(host->StartBuildingBlob(id)); |
23 BlobData::Item item; | 23 BlobData::Item item; |
24 item.SetToBytes("1", 1); | 24 item.SetToBytes("1", 1); |
25 EXPECT_TRUE(host->AppendBlobDataItem(id, item)); | 25 EXPECT_TRUE(host->AppendBlobDataItem(id, item)); |
26 EXPECT_TRUE(host->FinishBuildingBlob(id, "text/plain")); | 26 EXPECT_TRUE(host->FinishBuildingBlob(id, "text/plain")); |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 EXPECT_FALSE(host.FinishBuildingBlob(kId, "text/plain")); | 228 EXPECT_FALSE(host.FinishBuildingBlob(kId, "text/plain")); |
229 EXPECT_FALSE(host.RegisterPublicBlobURL(kUrl, kId)); | 229 EXPECT_FALSE(host.RegisterPublicBlobURL(kUrl, kId)); |
230 EXPECT_FALSE(host.IncrementBlobRefCount(kId)); | 230 EXPECT_FALSE(host.IncrementBlobRefCount(kId)); |
231 EXPECT_FALSE(host.DecrementBlobRefCount(kId)); | 231 EXPECT_FALSE(host.DecrementBlobRefCount(kId)); |
232 EXPECT_FALSE(host.RevokePublicBlobURL(kUrl)); | 232 EXPECT_FALSE(host.RevokePublicBlobURL(kUrl)); |
233 } | 233 } |
234 | 234 |
235 // TODO(michaeln): tests for the depcrecated url stuff | 235 // TODO(michaeln): tests for the depcrecated url stuff |
236 | 236 |
237 } // namespace content | 237 } // namespace content |
OLD | NEW |