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 "chrome/browser/browsing_data/cookies_tree_model.h" | 5 #include "chrome/browser/browsing_data/cookies_tree_model.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 | 409 |
410 // Make sure the nodes are also deleted from the model's cache. | 410 // Make sure the nodes are also deleted from the model's cache. |
411 // http://crbug.com/43249 | 411 // http://crbug.com/43249 |
412 cookies_model->UpdateSearchResults(string16()); | 412 cookies_model->UpdateSearchResults(string16()); |
413 | 413 |
414 { | 414 { |
415 // 2 nodes - root and app | 415 // 2 nodes - root and app |
416 SCOPED_TRACE("After removing"); | 416 SCOPED_TRACE("After removing"); |
417 EXPECT_EQ(1, cookies_model->GetRoot()->GetTotalNodeCount()); | 417 EXPECT_EQ(1, cookies_model->GetRoot()->GetTotalNodeCount()); |
418 EXPECT_EQ(0, cookies_model->GetRoot()->child_count()); | 418 EXPECT_EQ(0, cookies_model->GetRoot()->child_count()); |
419 EXPECT_EQ(std::string(""), GetDisplayedCookies(cookies_model.get())); | 419 EXPECT_EQ(std::string(), GetDisplayedCookies(cookies_model.get())); |
420 EXPECT_TRUE(mock_browsing_data_cookie_helper_->AllDeleted()); | 420 EXPECT_TRUE(mock_browsing_data_cookie_helper_->AllDeleted()); |
421 EXPECT_TRUE(mock_browsing_data_database_helper_->AllDeleted()); | 421 EXPECT_TRUE(mock_browsing_data_database_helper_->AllDeleted()); |
422 EXPECT_TRUE(mock_browsing_data_local_storage_helper_->AllDeleted()); | 422 EXPECT_TRUE(mock_browsing_data_local_storage_helper_->AllDeleted()); |
423 EXPECT_FALSE(mock_browsing_data_session_storage_helper_->AllDeleted()); | 423 EXPECT_FALSE(mock_browsing_data_session_storage_helper_->AllDeleted()); |
424 EXPECT_TRUE(mock_browsing_data_indexed_db_helper_->AllDeleted()); | 424 EXPECT_TRUE(mock_browsing_data_indexed_db_helper_->AllDeleted()); |
425 EXPECT_TRUE(mock_browsing_data_file_system_helper_->AllDeleted()); | 425 EXPECT_TRUE(mock_browsing_data_file_system_helper_->AllDeleted()); |
426 EXPECT_TRUE(mock_browsing_data_server_bound_cert_helper_->AllDeleted()); | 426 EXPECT_TRUE(mock_browsing_data_server_bound_cert_helper_->AllDeleted()); |
427 EXPECT_TRUE(mock_browsing_data_flash_lso_helper_->AllDeleted()); | 427 EXPECT_TRUE(mock_browsing_data_flash_lso_helper_->AllDeleted()); |
428 } | 428 } |
429 } | 429 } |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1192 EXPECT_EQ("A,C", GetDisplayedCookies(&cookies_model)); | 1192 EXPECT_EQ("A,C", GetDisplayedCookies(&cookies_model)); |
1193 | 1193 |
1194 cookies_model.UpdateSearchResults(string16(ASCIIToUTF16("foo3"))); | 1194 cookies_model.UpdateSearchResults(string16(ASCIIToUTF16("foo3"))); |
1195 EXPECT_EQ("D", GetDisplayedCookies(&cookies_model)); | 1195 EXPECT_EQ("D", GetDisplayedCookies(&cookies_model)); |
1196 | 1196 |
1197 cookies_model.UpdateSearchResults(string16()); | 1197 cookies_model.UpdateSearchResults(string16()); |
1198 EXPECT_EQ("A,B,C,D", GetDisplayedCookies(&cookies_model)); | 1198 EXPECT_EQ("A,B,C,D", GetDisplayedCookies(&cookies_model)); |
1199 } | 1199 } |
1200 | 1200 |
1201 } // namespace | 1201 } // namespace |
OLD | NEW |