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

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

Issue 11000016: Move forms/ out of webkit/. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Response to review Created 8 years, 2 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
OLDNEW
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 "testing/gmock/include/gmock/gmock.h" 5 #include "testing/gmock/include/gmock/gmock.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/scoped_temp_dir.h" 11 #include "base/scoped_temp_dir.h"
12 #include "base/stl_util.h" 12 #include "base/stl_util.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "chrome/browser/password_manager/password_store_consumer.h" 15 #include "chrome/browser/password_manager/password_store_consumer.h"
16 #include "chrome/browser/password_manager/password_store_mac.h" 16 #include "chrome/browser/password_manager/password_store_mac.h"
17 #include "chrome/browser/password_manager/password_store_mac_internal.h" 17 #include "chrome/browser/password_manager/password_store_mac_internal.h"
18 #include "chrome/common/chrome_paths.h" 18 #include "chrome/common/chrome_paths.h"
19 #include "content/public/test/test_browser_thread.h" 19 #include "content/public/test/test_browser_thread.h"
20 #include "crypto/mock_apple_keychain.h" 20 #include "crypto/mock_apple_keychain.h"
21 21
22 using content::BrowserThread; 22 using content::BrowserThread;
23 using crypto::MockAppleKeychain; 23 using crypto::MockAppleKeychain;
24 using webkit::forms::PasswordForm; 24 using content::PasswordForm;
25 using testing::_; 25 using testing::_;
26 using testing::DoAll; 26 using testing::DoAll;
27 using testing::WithArg; 27 using testing::WithArg;
28 28
29 namespace { 29 namespace {
30 30
31 class MockPasswordStoreConsumer : public PasswordStoreConsumer { 31 class MockPasswordStoreConsumer : public PasswordStoreConsumer {
32 public: 32 public:
33 MOCK_METHOD2(OnPasswordStoreRequestDone, 33 MOCK_METHOD2(OnPasswordStoreRequestDone,
34 void(CancelableRequestProvider::Handle, 34 void(CancelableRequestProvider::Handle,
35 const std::vector<webkit::forms::PasswordForm*>&)); 35 const std::vector<content::PasswordForm*>&));
36 }; 36 };
37 37
38 ACTION(STLDeleteElements0) { 38 ACTION(STLDeleteElements0) {
39 STLDeleteContainerPointers(arg0.begin(), arg0.end()); 39 STLDeleteContainerPointers(arg0.begin(), arg0.end());
40 } 40 }
41 41
42 ACTION(QuitUIMessageLoop) { 42 ACTION(QuitUIMessageLoop) {
43 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 43 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
44 MessageLoop::current()->Quit(); 44 MessageLoop::current()->Quit();
45 } 45 }
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 EXPECT_EQ(0U, matching_items.size()) << "iteration " << i; 1019 EXPECT_EQ(0U, matching_items.size()) << "iteration " << i;
1020 } 1020 }
1021 STLDeleteElements(&matching_items); 1021 STLDeleteElements(&matching_items);
1022 1022
1023 login_db_->GetLogins(*query_form, &matching_items); 1023 login_db_->GetLogins(*query_form, &matching_items);
1024 EXPECT_EQ(updates[i].password ? 1U : 0U, matching_items.size()) 1024 EXPECT_EQ(updates[i].password ? 1U : 0U, matching_items.size())
1025 << "iteration " << i; 1025 << "iteration " << i;
1026 STLDeleteElements(&matching_items); 1026 STLDeleteElements(&matching_items);
1027 } 1027 }
1028 } 1028 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698