| 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/time.h" | 8 #include "base/time.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "webkit/blob/blob_data.h" | 10 #include "webkit/common/blob/blob_data.h" |
| 11 #include "webkit/blob/blob_storage_controller.h" | 11 #include "webkit/browser/blob/blob_storage_controller.h" |
| 12 | 12 |
| 13 namespace webkit_blob { | 13 namespace webkit_blob { |
| 14 | 14 |
| 15 TEST(BlobStorageControllerTest, RegisterBlobUrl) { | 15 TEST(BlobStorageControllerTest, RegisterBlobUrl) { |
| 16 // Setup a set of blob data for testing. | 16 // Setup a set of blob data for testing. |
| 17 base::Time time1, time2; | 17 base::Time time1, time2; |
| 18 base::Time::FromString("Tue, 15 Nov 1994, 12:45:26 GMT", &time1); | 18 base::Time::FromString("Tue, 15 Nov 1994, 12:45:26 GMT", &time1); |
| 19 base::Time::FromString("Mon, 14 Nov 1994, 11:30:49 GMT", &time2); | 19 base::Time::FromString("Mon, 14 Nov 1994, 11:30:49 GMT", &time2); |
| 20 | 20 |
| 21 scoped_refptr<BlobData> blob_data1(new BlobData()); | 21 scoped_refptr<BlobData> blob_data1(new BlobData()); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 ASSERT_TRUE(blob_data_found != NULL); | 68 ASSERT_TRUE(blob_data_found != NULL); |
| 69 EXPECT_TRUE(*blob_data_found == *blob_data1); | 69 EXPECT_TRUE(*blob_data_found == *blob_data1); |
| 70 | 70 |
| 71 // Test unregistering a blob URL. | 71 // Test unregistering a blob URL. |
| 72 blob_storage_controller.RemoveBlob(blob_url3); | 72 blob_storage_controller.RemoveBlob(blob_url3); |
| 73 blob_data_found = blob_storage_controller.GetBlobDataFromUrl(blob_url3); | 73 blob_data_found = blob_storage_controller.GetBlobDataFromUrl(blob_url3); |
| 74 EXPECT_TRUE(!blob_data_found); | 74 EXPECT_TRUE(!blob_data_found); |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace webkit_blob | 77 } // namespace webkit_blob |
| OLD | NEW |