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

Side by Side Diff: chrome/browser/password_manager/native_backend_gnome_x_unittest.cc

Issue 7980014: Use DISABLE_RUNNABLE_METHOD_REFCOUNT macro in several places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <stdarg.h> 5 #include <stdarg.h>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 mock_keyring_items.clear(); 268 mock_keyring_items.clear();
269 mock_keyring_reject_local_ids = false; 269 mock_keyring_reject_local_ids = false;
270 return true; 270 return true;
271 } 271 }
272 }; 272 };
273 273
274 } // anonymous namespace 274 } // anonymous namespace
275 275
276 // NativeBackendGnome isn't reference counted, but in these unit tests that 276 // NativeBackendGnome isn't reference counted, but in these unit tests that
277 // won't be a problem as it always outlives the threads we post tasks to. 277 // won't be a problem as it always outlives the threads we post tasks to.
278 template<> 278 DISABLE_RUNNABLE_METHOD_REFCOUNT(NativeBackendGnome);
279 struct RunnableMethodTraits<NativeBackendGnome> {
280 void RetainCallee(NativeBackendGnome*) {}
281 void ReleaseCallee(NativeBackendGnome*) {}
282 };
283 279
284 class NativeBackendGnomeTest : public testing::Test { 280 class NativeBackendGnomeTest : public testing::Test {
285 protected: 281 protected:
286 NativeBackendGnomeTest() 282 NativeBackendGnomeTest()
287 : ui_thread_(BrowserThread::UI, &message_loop_), 283 : ui_thread_(BrowserThread::UI, &message_loop_),
288 db_thread_(BrowserThread::DB) { 284 db_thread_(BrowserThread::DB) {
289 } 285 }
290 286
291 virtual void SetUp() { 287 virtual void SetUp() {
292 ASSERT_TRUE(db_thread_.Start()); 288 ASSERT_TRUE(db_thread_.Start());
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 RunBothThreads(); 888 RunBothThreads();
893 889
894 // The other two copies of the password in different profiles should remain. 890 // The other two copies of the password in different profiles should remain.
895 EXPECT_EQ(2u, mock_keyring_items.size()); 891 EXPECT_EQ(2u, mock_keyring_items.size());
896 if (mock_keyring_items.size() > 0) 892 if (mock_keyring_items.size() > 0)
897 CheckMockKeyringItem(&mock_keyring_items[0], form_google_, "chrome"); 893 CheckMockKeyringItem(&mock_keyring_items[0], form_google_, "chrome");
898 if (mock_keyring_items.size() > 1) 894 if (mock_keyring_items.size() > 1)
899 CheckMockKeyringItem(&mock_keyring_items[1], form_google_, "chrome-42"); 895 CheckMockKeyringItem(&mock_keyring_items[1], form_google_, "chrome-42");
900 } 896 }
901 } 897 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698