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

Side by Side Diff: chrome/browser/browsing_data_indexed_db_helper_unittest.cc

Issue 7692016: Delete indexedDBs from the cookie tree ui. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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
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 "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/base/testing_browser_process_test.h" 9 #include "chrome/test/base/testing_browser_process_test.h"
10 #include "chrome/test/base/testing_profile.h"
11 10
12 namespace { 11 namespace {
13 12
14 typedef TestingBrowserProcessTest CannedBrowsingDataIndexedDBHelperTest; 13 typedef TestingBrowserProcessTest CannedBrowsingDataIndexedDBHelperTest;
15 14
16 TEST_F(CannedBrowsingDataIndexedDBHelperTest, Empty) { 15 TEST_F(CannedBrowsingDataIndexedDBHelperTest, Empty) {
17 TestingProfile profile;
18
19 const GURL origin("http://host1:1/"); 16 const GURL origin("http://host1:1/");
20 const string16 description(ASCIIToUTF16("description")); 17 const string16 description(ASCIIToUTF16("description"));
21 18
22 scoped_refptr<CannedBrowsingDataIndexedDBHelper> helper( 19 scoped_refptr<CannedBrowsingDataIndexedDBHelper> helper(
23 new CannedBrowsingDataIndexedDBHelper(&profile)); 20 new CannedBrowsingDataIndexedDBHelper());
24 21
25 ASSERT_TRUE(helper->empty()); 22 ASSERT_TRUE(helper->empty());
26 helper->AddIndexedDB(origin, description); 23 helper->AddIndexedDB(origin, description);
27 ASSERT_FALSE(helper->empty()); 24 ASSERT_FALSE(helper->empty());
28 helper->Reset(); 25 helper->Reset();
29 ASSERT_TRUE(helper->empty()); 26 ASSERT_TRUE(helper->empty());
30 } 27 }
31 28
32 } // namespace 29 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698