OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 helper->StartFetching( | 38 helper->StartFetching( |
39 base::Bind(&TestCompletionCallback::callback, | 39 base::Bind(&TestCompletionCallback::callback, |
40 base::Unretained(&callback))); | 40 base::Unretained(&callback))); |
41 | 41 |
42 std::list<content::IndexedDBInfo> result = | 42 std::list<content::IndexedDBInfo> result = |
43 callback.result(); | 43 callback.result(); |
44 | 44 |
45 ASSERT_EQ(2U, result.size()); | 45 ASSERT_EQ(2U, result.size()); |
46 std::list<content::IndexedDBInfo>::iterator info = | 46 std::list<content::IndexedDBInfo>::iterator info = |
47 result.begin(); | 47 result.begin(); |
48 EXPECT_EQ(origin1, info->origin); | 48 EXPECT_EQ(origin1, info->origin_); |
49 info++; | 49 info++; |
50 EXPECT_EQ(origin2, info->origin); | 50 EXPECT_EQ(origin2, info->origin_); |
51 } | 51 } |
52 | 52 |
53 IN_PROC_BROWSER_TEST_F(BrowsingDataIndexedDBHelperTest, CannedUnique) { | 53 IN_PROC_BROWSER_TEST_F(BrowsingDataIndexedDBHelperTest, CannedUnique) { |
54 const GURL origin("http://host1:1/"); | 54 const GURL origin("http://host1:1/"); |
55 const string16 description(ASCIIToUTF16("description")); | 55 const string16 description(ASCIIToUTF16("description")); |
56 | 56 |
57 scoped_refptr<CannedBrowsingDataIndexedDBHelper> helper( | 57 scoped_refptr<CannedBrowsingDataIndexedDBHelper> helper( |
58 new CannedBrowsingDataIndexedDBHelper()); | 58 new CannedBrowsingDataIndexedDBHelper()); |
59 helper->AddIndexedDB(origin, description); | 59 helper->AddIndexedDB(origin, description); |
60 helper->AddIndexedDB(origin, description); | 60 helper->AddIndexedDB(origin, description); |
61 | 61 |
62 TestCompletionCallback callback; | 62 TestCompletionCallback callback; |
63 helper->StartFetching( | 63 helper->StartFetching( |
64 base::Bind(&TestCompletionCallback::callback, | 64 base::Bind(&TestCompletionCallback::callback, |
65 base::Unretained(&callback))); | 65 base::Unretained(&callback))); |
66 | 66 |
67 std::list<content::IndexedDBInfo> result = | 67 std::list<content::IndexedDBInfo> result = |
68 callback.result(); | 68 callback.result(); |
69 | 69 |
70 ASSERT_EQ(1U, result.size()); | 70 ASSERT_EQ(1U, result.size()); |
71 EXPECT_EQ(origin, result.begin()->origin); | 71 EXPECT_EQ(origin, result.begin()->origin_); |
72 } | 72 } |
73 } // namespace | 73 } // namespace |
OLD | NEW |