| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/cookies_tree_model.h" | 5 #include "chrome/browser/cookies_tree_model.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "chrome/browser/mock_browsing_data_database_helper.h" | 10 #include "chrome/browser/mock_browsing_data_database_helper.h" |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 GetDisplayedLocalStorages(cookies_model.get())); | 210 GetDisplayedLocalStorages(cookies_model.get())); |
| 211 EXPECT_EQ(19, cookies_model->GetRoot()->GetTotalNodeCount()); | 211 EXPECT_EQ(19, cookies_model->GetRoot()->GetTotalNodeCount()); |
| 212 } | 212 } |
| 213 | 213 |
| 214 DeleteStoredObjects(cookies_model->GetRoot()->GetChild(2)); | 214 DeleteStoredObjects(cookies_model->GetRoot()->GetChild(2)); |
| 215 { | 215 { |
| 216 SCOPED_TRACE("First database origin removed"); | 216 SCOPED_TRACE("First database origin removed"); |
| 217 EXPECT_STREQ("B,C", GetMonsterCookies(monster).c_str()); | 217 EXPECT_STREQ("B,C", GetMonsterCookies(monster).c_str()); |
| 218 EXPECT_STREQ("B,C", GetDisplayedCookies(cookies_model.get()).c_str()); | 218 EXPECT_STREQ("B,C", GetDisplayedCookies(cookies_model.get()).c_str()); |
| 219 EXPECT_EQ("db2", GetDisplayedDatabases(cookies_model.get())); | 219 EXPECT_EQ("db2", GetDisplayedDatabases(cookies_model.get())); |
| 220 EXPECT_EQ("origin1,origin2", GetDisplayedLocalStorages(cookies_model.get()))
; | 220 EXPECT_EQ("origin1,origin2", |
| 221 GetDisplayedLocalStorages(cookies_model.get())); |
| 221 EXPECT_EQ(16, cookies_model->GetRoot()->GetTotalNodeCount()); | 222 EXPECT_EQ(16, cookies_model->GetRoot()->GetTotalNodeCount()); |
| 222 } | 223 } |
| 223 | 224 |
| 224 DeleteStoredObjects(cookies_model->GetRoot()->GetChild(3)); | 225 DeleteStoredObjects(cookies_model->GetRoot()->GetChild(3)); |
| 225 { | 226 { |
| 226 SCOPED_TRACE("First local storage origin removed"); | 227 SCOPED_TRACE("First local storage origin removed"); |
| 227 EXPECT_STREQ("B,C", GetMonsterCookies(monster).c_str()); | 228 EXPECT_STREQ("B,C", GetMonsterCookies(monster).c_str()); |
| 228 EXPECT_STREQ("B,C", GetDisplayedCookies(cookies_model.get()).c_str()); | 229 EXPECT_STREQ("B,C", GetDisplayedCookies(cookies_model.get()).c_str()); |
| 229 EXPECT_EQ("db2", GetDisplayedDatabases(cookies_model.get())); | 230 EXPECT_EQ("db2", GetDisplayedDatabases(cookies_model.get())); |
| 230 EXPECT_EQ("origin2", GetDisplayedLocalStorages(cookies_model.get())); | 231 EXPECT_EQ("origin2", GetDisplayedLocalStorages(cookies_model.get())); |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 { | 450 { |
| 450 SCOPED_TRACE("Second origin removed"); | 451 SCOPED_TRACE("Second origin removed"); |
| 451 EXPECT_STREQ("D,A,C,F,B,G,H", GetMonsterCookies(monster).c_str()); | 452 EXPECT_STREQ("D,A,C,F,B,G,H", GetMonsterCookies(monster).c_str()); |
| 452 EXPECT_STREQ("F,C,B,A,G,D,H", GetDisplayedCookies(&cookies_model).c_str()); | 453 EXPECT_STREQ("F,C,B,A,G,D,H", GetDisplayedCookies(&cookies_model).c_str()); |
| 453 } | 454 } |
| 454 } | 455 } |
| 455 | 456 |
| 456 | 457 |
| 457 | 458 |
| 458 } // namespace | 459 } // namespace |
| OLD | NEW |