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

Side by Side Diff: content/browser/fileapi/blob_storage_context_unittest.cc

Issue 231923002: Move blob_storage_host from webkit/ to content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/fileapi/blob_storage_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/browser/fileapi/blob_storage_host.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 #include "webkit/browser/blob/blob_data_handle.h" 12 #include "webkit/browser/blob/blob_data_handle.h"
12 #include "webkit/browser/blob/blob_storage_context.h" 13 #include "webkit/browser/blob/blob_storage_context.h"
13 #include "webkit/browser/blob/blob_storage_host.h"
14 14
15 namespace webkit_blob { 15 using webkit_blob::BlobDataHandle;
16
17 namespace content {
16 18
17 namespace { 19 namespace {
18 void SetupBasicBlob(BlobStorageHost* host, const std::string& id) { 20 void SetupBasicBlob(BlobStorageHost* host, const std::string& id) {
19 EXPECT_TRUE(host->StartBuildingBlob(id)); 21 EXPECT_TRUE(host->StartBuildingBlob(id));
20 BlobData::Item item; 22 BlobData::Item item;
21 item.SetToBytes("1", 1); 23 item.SetToBytes("1", 1);
22 EXPECT_TRUE(host->AppendBlobDataItem(id, item)); 24 EXPECT_TRUE(host->AppendBlobDataItem(id, item));
23 EXPECT_TRUE(host->FinishBuildingBlob(id, "text/plain")); 25 EXPECT_TRUE(host->FinishBuildingBlob(id, "text/plain"));
24 EXPECT_FALSE(host->StartBuildingBlob(id)); 26 EXPECT_FALSE(host->StartBuildingBlob(id));
25 } 27 }
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 EXPECT_FALSE(host.AppendBlobDataItem(kId, item)); 200 EXPECT_FALSE(host.AppendBlobDataItem(kId, item));
199 EXPECT_FALSE(host.FinishBuildingBlob(kId, "text/plain")); 201 EXPECT_FALSE(host.FinishBuildingBlob(kId, "text/plain"));
200 EXPECT_FALSE(host.RegisterPublicBlobURL(kUrl, kId)); 202 EXPECT_FALSE(host.RegisterPublicBlobURL(kUrl, kId));
201 EXPECT_FALSE(host.IncrementBlobRefCount(kId)); 203 EXPECT_FALSE(host.IncrementBlobRefCount(kId));
202 EXPECT_FALSE(host.DecrementBlobRefCount(kId)); 204 EXPECT_FALSE(host.DecrementBlobRefCount(kId));
203 EXPECT_FALSE(host.RevokePublicBlobURL(kUrl)); 205 EXPECT_FALSE(host.RevokePublicBlobURL(kUrl));
204 } 206 }
205 207
206 // TODO(michaeln): tests for the depcrecated url stuff 208 // TODO(michaeln): tests for the depcrecated url stuff
207 209
208 } // namespace webkit_blob 210 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/fileapi/blob_storage_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698