| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 main_db_->GetVisitsForURL(row.id(), &visits); | 375 main_db_->GetVisitsForURL(row.id(), &visits); |
| 376 EXPECT_EQ(0U, visits.size()); | 376 EXPECT_EQ(0U, visits.size()); |
| 377 | 377 |
| 378 // Thumbnail should be gone. | 378 // Thumbnail should be gone. |
| 379 // TODO(sky): fix this, see comment in HasThumbnail. | 379 // TODO(sky): fix this, see comment in HasThumbnail. |
| 380 // EXPECT_FALSE(HasThumbnail(row.id())); | 380 // EXPECT_FALSE(HasThumbnail(row.id())); |
| 381 | 381 |
| 382 bool found_delete_notification = false; | 382 bool found_delete_notification = false; |
| 383 for (size_t i = 0; i < notifications_.size(); i++) { | 383 for (size_t i = 0; i < notifications_.size(); i++) { |
| 384 if (notifications_[i].first == chrome::NOTIFICATION_HISTORY_URLS_DELETED) { | 384 if (notifications_[i].first == chrome::NOTIFICATION_HISTORY_URLS_DELETED) { |
| 385 const history::URLRows& rows(reinterpret_cast<URLsDeletedDetails*>( | 385 URLsDeletedDetails* details = reinterpret_cast<URLsDeletedDetails*>( |
| 386 notifications_[i].second)->rows); | 386 notifications_[i].second); |
| 387 EXPECT_FALSE(details->archived); |
| 388 const history::URLRows& rows(details->rows); |
| 387 if (std::find_if(rows.begin(), rows.end(), | 389 if (std::find_if(rows.begin(), rows.end(), |
| 388 history::URLRow::URLRowHasURL(row.url())) != rows.end()) { | 390 history::URLRow::URLRowHasURL(row.url())) != rows.end()) { |
| 389 found_delete_notification = true; | 391 found_delete_notification = true; |
| 390 } | 392 } |
| 391 } else { | 393 } else { |
| 392 EXPECT_NE(notifications_[i].first, | 394 EXPECT_NE(notifications_[i].first, |
| 393 chrome::NOTIFICATION_HISTORY_URL_VISITED); | 395 chrome::NOTIFICATION_HISTORY_URL_VISITED); |
| 394 EXPECT_NE(notifications_[i].first, | 396 EXPECT_NE(notifications_[i].first, |
| 395 chrome::NOTIFICATION_HISTORY_URLS_MODIFIED); | 397 chrome::NOTIFICATION_HISTORY_URLS_MODIFIED); |
| 396 } | 398 } |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 953 main_db_->GetVisitsForURL(url_id, &archived_visits); | 955 main_db_->GetVisitsForURL(url_id, &archived_visits); |
| 954 EXPECT_EQ(0U, archived_visits.size()); | 956 EXPECT_EQ(0U, archived_visits.size()); |
| 955 } | 957 } |
| 956 | 958 |
| 957 // TODO(brettw) add some visits with no URL to make sure everything is updated | 959 // TODO(brettw) add some visits with no URL to make sure everything is updated |
| 958 // properly. Have the visits also refer to nonexistent FTS rows. | 960 // properly. Have the visits also refer to nonexistent FTS rows. |
| 959 // | 961 // |
| 960 // Maybe also refer to invalid favicons. | 962 // Maybe also refer to invalid favicons. |
| 961 | 963 |
| 962 } // namespace history | 964 } // namespace history |
| OLD | NEW |