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

Side by Side Diff: ios/chrome/browser/passwords/password_controller_unittest.mm

Issue 2614443004: [ios] Moved all web mocks to ios/web/public/test/fakes. (Closed)
Patch Set: Moved test_redirect_observer back Created 3 years, 11 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #import "ios/chrome/browser/passwords/password_controller.h" 5 #import "ios/chrome/browser/passwords/password_controller.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 12 matching lines...) Expand all
23 #include "components/password_manager/core/browser/stub_password_manager_client. h" 23 #include "components/password_manager/core/browser/stub_password_manager_client. h"
24 #include "components/password_manager/core/common/password_manager_pref_names.h" 24 #include "components/password_manager/core/common/password_manager_pref_names.h"
25 #include "components/prefs/pref_registry_simple.h" 25 #include "components/prefs/pref_registry_simple.h"
26 #include "components/prefs/testing_pref_service.h" 26 #include "components/prefs/testing_pref_service.h"
27 #import "ios/chrome/browser/autofill/form_input_accessory_view_controller.h" 27 #import "ios/chrome/browser/autofill/form_input_accessory_view_controller.h"
28 #import "ios/chrome/browser/autofill/form_suggestion_controller.h" 28 #import "ios/chrome/browser/autofill/form_suggestion_controller.h"
29 #include "ios/chrome/browser/browser_state/test_chrome_browser_state.h" 29 #include "ios/chrome/browser/browser_state/test_chrome_browser_state.h"
30 #import "ios/chrome/browser/passwords/js_password_manager.h" 30 #import "ios/chrome/browser/passwords/js_password_manager.h"
31 #import "ios/web/public/navigation_item.h" 31 #import "ios/web/public/navigation_item.h"
32 #import "ios/web/public/navigation_manager.h" 32 #import "ios/web/public/navigation_manager.h"
33 #include "ios/web/public/ssl_status.h"
34 #import "ios/web/public/test/fakes/test_web_state.h"
35 #import "ios/web/public/test/web_test_with_web_state.h"
33 #import "ios/web/public/web_state/web_state.h" 36 #import "ios/web/public/web_state/web_state.h"
34 #include "ios/web/public/ssl_status.h"
35 #import "ios/web/public/test/web_test_with_web_state.h"
36 #import "ios/web/public/test/test_web_state.h"
37 #include "testing/gmock/include/gmock/gmock.h" 37 #include "testing/gmock/include/gmock/gmock.h"
38 #include "testing/gtest/include/gtest/gtest.h" 38 #include "testing/gtest/include/gtest/gtest.h"
39 #include "testing/gtest_mac.h" 39 #include "testing/gtest_mac.h"
40 #import "third_party/ocmock/OCMock/OCMock.h" 40 #import "third_party/ocmock/OCMock/OCMock.h"
41 #import "third_party/ocmock/OCMock/OCPartialMockObject.h" 41 #import "third_party/ocmock/OCMock/OCPartialMockObject.h"
42 #include "url/gurl.h" 42 #include "url/gurl.h"
43 43
44 #if !defined(__has_feature) || !__has_feature(objc_arc) 44 #if !defined(__has_feature) || !__has_feature(objc_arc)
45 #error "This file requires ARC support." 45 #error "This file requires ARC support."
46 #endif 46 #endif
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 // Tests that an HTTPS page with a password field does not update the SSL status 1330 // Tests that an HTTPS page with a password field does not update the SSL status
1331 // to indicate DISPLAYED_PASSWORD_FIELD_ON_HTTP. 1331 // to indicate DISPLAYED_PASSWORD_FIELD_ON_HTTP.
1332 TEST_F(PasswordControllerTest, HTTPSPassword) { 1332 TEST_F(PasswordControllerTest, HTTPSPassword) {
1333 LoadHtml(kHtmlWithPasswordForm, GURL("https://chromium.test")); 1333 LoadHtml(kHtmlWithPasswordForm, GURL("https://chromium.test"));
1334 1334
1335 web::SSLStatus ssl_status = 1335 web::SSLStatus ssl_status =
1336 web_state()->GetNavigationManager()->GetLastCommittedItem()->GetSSL(); 1336 web_state()->GetNavigationManager()->GetLastCommittedItem()->GetSSL();
1337 EXPECT_FALSE(ssl_status.content_status & 1337 EXPECT_FALSE(ssl_status.content_status &
1338 web::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP); 1338 web::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP);
1339 } 1339 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698