| 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/browsing_data_indexed_db_helper.h" | 8 #include "chrome/browser/browsing_data_indexed_db_helper.h" |
| 9 #include "chrome/test/testing_browser_process_test.h" |
| 9 #include "chrome/test/testing_profile.h" | 10 #include "chrome/test/testing_profile.h" |
| 10 | 11 |
| 11 namespace { | 12 namespace { |
| 12 TEST(CannedBrowsingDataIndexedDBHelperTest, Empty) { | 13 |
| 14 typedef TestingBrowserProcessTest CannedBrowsingDataIndexedDBHelperTest; |
| 15 |
| 16 TEST_F(CannedBrowsingDataIndexedDBHelperTest, Empty) { |
| 13 TestingProfile profile; | 17 TestingProfile profile; |
| 14 | 18 |
| 15 const GURL origin("http://host1:1/"); | 19 const GURL origin("http://host1:1/"); |
| 16 const string16 description(ASCIIToUTF16("description")); | 20 const string16 description(ASCIIToUTF16("description")); |
| 17 | 21 |
| 18 scoped_refptr<CannedBrowsingDataIndexedDBHelper> helper( | 22 scoped_refptr<CannedBrowsingDataIndexedDBHelper> helper( |
| 19 new CannedBrowsingDataIndexedDBHelper(&profile)); | 23 new CannedBrowsingDataIndexedDBHelper(&profile)); |
| 20 | 24 |
| 21 ASSERT_TRUE(helper->empty()); | 25 ASSERT_TRUE(helper->empty()); |
| 22 helper->AddIndexedDB(origin, description); | 26 helper->AddIndexedDB(origin, description); |
| 23 ASSERT_FALSE(helper->empty()); | 27 ASSERT_FALSE(helper->empty()); |
| 24 helper->Reset(); | 28 helper->Reset(); |
| 25 ASSERT_TRUE(helper->empty()); | 29 ASSERT_TRUE(helper->empty()); |
| 26 } | 30 } |
| 31 |
| 27 } // namespace | 32 } // namespace |
| OLD | NEW |