chromeos: bluetooth: tie Proxy lifetime to object, not observer
[chromium-blink-merge.git] / chrome / browser / browsing_data_database_helper_unittest.cc
blobcda759140183a6f74b032c0c922f9857846a01ea
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
3 // found in the LICENSE file.
5 #include "chrome/browser/browsing_data_database_helper.h"
7 #include "base/file_util.h"
8 #include "chrome/test/base/testing_profile.h"
9 #include "testing/gtest/include/gtest/gtest.h"
11 namespace {
13 typedef testing::Test CannedBrowsingDataDatabaseTest;
15 TEST_F(CannedBrowsingDataDatabaseTest, Empty) {
16 TestingProfile profile;
18 const GURL origin("http://host1:1/");
19 const char db[] = "db1";
21 scoped_refptr<CannedBrowsingDataDatabaseHelper> helper(
22 new CannedBrowsingDataDatabaseHelper(&profile));
24 ASSERT_TRUE(helper->empty());
25 helper->AddDatabase(origin, db, "");
26 ASSERT_FALSE(helper->empty());
27 helper->Reset();
28 ASSERT_TRUE(helper->empty());
31 } // namespace