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

Side by Side Diff: chrome/browser/plugin_exceptions_table_model_unittest.cc

Issue 6609008: Change other usages of .size() to .empty() when applicable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter nits Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/auto_reset.h" 5 #include "base/auto_reset.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/mock_plugin_exceptions_table_model.h" 8 #include "chrome/browser/mock_plugin_exceptions_table_model.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "chrome/test/testing_pref_service.h" 10 #include "chrome/test/testing_pref_service.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } else { 130 } else {
131 // Plugin IDs are ascending one by one. 131 // Plugin IDs are ascending one by one.
132 EXPECT_EQ(last_plugin+1, it->plugin_id); 132 EXPECT_EQ(last_plugin+1, it->plugin_id);
133 133
134 // Consecutive runs of plugins with id |x| are |row_counts[x]| long. 134 // Consecutive runs of plugins with id |x| are |row_counts[x]| long.
135 EXPECT_EQ(count, row_counts[last_plugin]); 135 EXPECT_EQ(count, row_counts[last_plugin]);
136 count = 1; 136 count = 1;
137 last_plugin = it->plugin_id; 137 last_plugin = it->plugin_id;
138 } 138 }
139 } 139 }
140 if (row_counts.size() > 0) 140 if (!row_counts.empty())
141 EXPECT_EQ(count, row_counts[last_plugin]); 141 EXPECT_EQ(count, row_counts[last_plugin]);
142 } 142 }
143 143
144 protected: 144 protected:
145 MessageLoop message_loop_; 145 MessageLoop message_loop_;
146 BrowserThread ui_thread_; 146 BrowserThread ui_thread_;
147 147
148 scoped_ptr<TestingProfile> profile_; 148 scoped_ptr<TestingProfile> profile_;
149 scoped_ptr<MockPluginExceptionsTableModel> table_model_; 149 scoped_ptr<MockPluginExceptionsTableModel> table_model_;
150 150
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 plugin_test_internal::MockTableModelObserver observer(table_model_.get()); 209 plugin_test_internal::MockTableModelObserver observer(table_model_.get());
210 table_model_->SetObserver(&observer); 210 table_model_->SetObserver(&observer);
211 211
212 EXPECT_CALL(observer, OnModelChanged()); 212 EXPECT_CALL(observer, OnModelChanged());
213 table_model_->RemoveAll(); 213 table_model_->RemoveAll();
214 EXPECT_EQ(0, table_model_->RowCount()); 214 EXPECT_EQ(0, table_model_->RowCount());
215 EXPECT_EQ(0, static_cast<int>(table_model_->GetGroups().size())); 215 EXPECT_EQ(0, static_cast<int>(table_model_->GetGroups().size()));
216 CheckInvariants(); 216 CheckInvariants();
217 table_model_->SetObserver(NULL); 217 table_model_->SetObserver(NULL);
218 } 218 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_store_mac.cc ('k') | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698