| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "webkit/blob/blob_data_handle.h" | 11 #include "webkit/browser/blob/blob_data_handle.h" |
| 12 #include "webkit/blob/blob_storage_context.h" | 12 #include "webkit/browser/blob/blob_storage_context.h" |
| 13 #include "webkit/blob/blob_storage_host.h" | 13 #include "webkit/browser/blob/blob_storage_host.h" |
| 14 | 14 |
| 15 namespace webkit_blob { | 15 namespace webkit_blob { |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 void SetupBasicBlob(BlobStorageHost* host, const std::string& id) { | 18 void SetupBasicBlob(BlobStorageHost* host, const std::string& id) { |
| 19 EXPECT_TRUE(host->StartBuildingBlob(id)); | 19 EXPECT_TRUE(host->StartBuildingBlob(id)); |
| 20 BlobData::Item item; | 20 BlobData::Item item; |
| 21 item.SetToBytes("1", 1); | 21 item.SetToBytes("1", 1); |
| 22 EXPECT_TRUE(host->AppendBlobDataItem(id, item)); | 22 EXPECT_TRUE(host->AppendBlobDataItem(id, item)); |
| 23 EXPECT_TRUE(host->FinishBuildingBlob(id, "text/plain")); | 23 EXPECT_TRUE(host->FinishBuildingBlob(id, "text/plain")); |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 item.SetToBytes("1", 1); | 197 item.SetToBytes("1", 1); |
| 198 EXPECT_FALSE(host.AppendBlobDataItem(kId, item)); | 198 EXPECT_FALSE(host.AppendBlobDataItem(kId, item)); |
| 199 EXPECT_FALSE(host.FinishBuildingBlob(kId, "text/plain")); | 199 EXPECT_FALSE(host.FinishBuildingBlob(kId, "text/plain")); |
| 200 EXPECT_FALSE(host.RegisterPublicBlobURL(kUrl, kId)); | 200 EXPECT_FALSE(host.RegisterPublicBlobURL(kUrl, kId)); |
| 201 EXPECT_FALSE(host.IncrementBlobRefCount(kId)); | 201 EXPECT_FALSE(host.IncrementBlobRefCount(kId)); |
| 202 EXPECT_FALSE(host.DecrementBlobRefCount(kId)); | 202 EXPECT_FALSE(host.DecrementBlobRefCount(kId)); |
| 203 EXPECT_FALSE(host.RevokePublicBlobURL(kUrl)); | 203 EXPECT_FALSE(host.RevokePublicBlobURL(kUrl)); |
| 204 } | 204 } |
| 205 | 205 |
| 206 } // namespace webkit_blob | 206 } // namespace webkit_blob |
| OLD | NEW |