Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4005)

Unified Diff: chrome/browser/geolocation/geolocation_exceptions_table_model_unittest.cc

Issue 2838037: Introduce RemoveRowTableModel interface, let GeolocationExceptionsTableModel derive from it. (Closed)
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/geolocation/geolocation_exceptions_table_model_unittest.cc
diff --git a/chrome/browser/geolocation/geolocation_exceptions_table_model_unittest.cc b/chrome/browser/geolocation/geolocation_exceptions_table_model_unittest.cc
index 62b65c0bcf48d7eb803b37fa99608c003c9af038..d6d1f5e95d7d0acb94c21c77f42950663c634f10 100644
--- a/chrome/browser/geolocation/geolocation_exceptions_table_model_unittest.cc
+++ b/chrome/browser/geolocation/geolocation_exceptions_table_model_unittest.cc
@@ -71,7 +71,7 @@ TEST_F(GeolocationExceptionsTableModelTest, CanRemoveException) {
EXPECT_EQ(1, model_->RowCount());
GeolocationExceptionsTableModel::Rows rows;
rows.insert(0U);
- EXPECT_TRUE(model_->CanRemoveExceptions(rows));
+ EXPECT_TRUE(model_->CanRemoveRows(rows));
// Ensure an entry with children can't be removed.
@@ -80,13 +80,13 @@ TEST_F(GeolocationExceptionsTableModelTest, CanRemoveException) {
map->SetContentSetting(kUrl0, kUrl2, CONTENT_SETTING_BLOCK);
ResetModel();
EXPECT_EQ(3, model_->RowCount());
- EXPECT_FALSE(model_->CanRemoveExceptions(rows));
+ EXPECT_FALSE(model_->CanRemoveRows(rows));
// Ensure it can be removed if removing all children.
rows.clear();
rows.insert(1U);
rows.insert(2U);
- EXPECT_TRUE(model_->CanRemoveExceptions(rows));
+ EXPECT_TRUE(model_->CanRemoveRows(rows));
}
TEST_F(GeolocationExceptionsTableModelTest, RemoveExceptions) {
@@ -97,7 +97,7 @@ TEST_F(GeolocationExceptionsTableModelTest, RemoveExceptions) {
// Test removing parent exception.
GeolocationExceptionsTableModel::Rows rows;
rows.insert(0U);
- model_->RemoveExceptions(rows);
+ model_->RemoveRows(rows);
EXPECT_EQ(CONTENT_SETTING_ASK, map->GetContentSetting(kUrl0, kUrl0));
EXPECT_EQ(CONTENT_SETTING_ALLOW, map->GetContentSetting(kUrl0, kUrl1));
EXPECT_EQ(CONTENT_SETTING_ALLOW, map->GetContentSetting(kUrl0, kUrl2));
@@ -109,7 +109,7 @@ TEST_F(GeolocationExceptionsTableModelTest, RemoveExceptions) {
rows.clear();
rows.insert(1U);
rows.insert(2U);
- model_->RemoveExceptions(rows);
+ model_->RemoveRows(rows);
EXPECT_EQ(0, model_->RowCount());
EXPECT_EQ(CONTENT_SETTING_ASK, map->GetContentSetting(kUrl0, kUrl0));
EXPECT_EQ(CONTENT_SETTING_ASK, map->GetContentSetting(kUrl0, kUrl1));

Powered by Google App Engine
This is Rietveld 408576698