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

Side by Side Diff: ios/web/web_state/ui/crw_web_controller_unittest.mm

Issue 1171203004: Correct iOS build for latest Xcode beta. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 5 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 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/web/web_state/ui/crw_web_controller.h" 5 #import "ios/web/web_state/ui/crw_web_controller.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 #import <WebKit/WebKit.h> 8 #import <WebKit/WebKit.h>
9 9
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 // correct arguments if WKWebView fails to load a page with bad SSL cert. 832 // correct arguments if WKWebView fails to load a page with bad SSL cert.
833 TEST_F(CRWWKWebViewWebControllerTest, SSLError) { 833 TEST_F(CRWWKWebViewWebControllerTest, SSLError) {
834 CR_TEST_REQUIRES_WK_WEB_VIEW(); 834 CR_TEST_REQUIRES_WK_WEB_VIEW();
835 835
836 ASSERT_FALSE([mockDelegate_ SSLInfo].is_valid()); 836 ASSERT_FALSE([mockDelegate_ SSLInfo].is_valid());
837 837
838 NSError* error = 838 NSError* error =
839 [NSError errorWithDomain:NSURLErrorDomain 839 [NSError errorWithDomain:NSURLErrorDomain
840 code:NSURLErrorServerCertificateHasUnknownRoot 840 code:NSURLErrorServerCertificateHasUnknownRoot
841 userInfo:nil]; 841 userInfo:nil];
842 [static_cast<id<WKNavigationDelegate>>(webController_.get()) webView:nil 842 WKWebView* webView = static_cast<WKWebView*>([webController_ webView]);
843 [static_cast<id<WKNavigationDelegate>>(webController_.get()) webView:webView
843 didFailProvisionalNavigation:nil 844 didFailProvisionalNavigation:nil
844 withError:error]; 845 withError:error];
845 846
846 // Verify correctness of delegate's method arguments. 847 // Verify correctness of delegate's method arguments.
847 EXPECT_TRUE([mockDelegate_ SSLInfo].is_valid()); 848 EXPECT_TRUE([mockDelegate_ SSLInfo].is_valid());
848 EXPECT_EQ(net::CERT_STATUS_INVALID, [mockDelegate_ SSLInfo].cert_status); 849 EXPECT_EQ(net::CERT_STATUS_INVALID, [mockDelegate_ SSLInfo].cert_status);
849 EXPECT_EQ(net::CERT_STATUS_INVALID, [mockDelegate_ SSLStatus].cert_status); 850 EXPECT_EQ(net::CERT_STATUS_INVALID, [mockDelegate_ SSLStatus].cert_status);
850 EXPECT_EQ(web::SECURITY_STYLE_AUTHENTICATION_BROKEN, 851 EXPECT_EQ(web::SECURITY_STYLE_AUTHENTICATION_BROKEN,
851 [mockDelegate_ SSLStatus].security_style); 852 [mockDelegate_ SSLStatus].security_style);
852 EXPECT_FALSE([mockDelegate_ recoverable]); 853 EXPECT_FALSE([mockDelegate_ recoverable]);
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
1475 // https://bugs.webkit.org/show_bug.cgi?id=140203 1476 // https://bugs.webkit.org/show_bug.cgi?id=140203
1476 VLOG(1) << "Script has been flushed."; 1477 VLOG(1) << "Script has been flushed.";
1477 }]; 1478 }];
1478 // -evaluateJavaScript:stringResultHandler: is asynchronous so JavaScript 1479 // -evaluateJavaScript:stringResultHandler: is asynchronous so JavaScript
1479 // evaluation will not happen until TearDown, which deallocates 1480 // evaluation will not happen until TearDown, which deallocates
1480 // CRWWebController, which in its turn will deallocate WKWebView to create a 1481 // CRWWebController, which in its turn will deallocate WKWebView to create a
1481 // crashy condition. 1482 // crashy condition.
1482 }; 1483 };
1483 1484
1484 } // namespace 1485 } // namespace
OLDNEW
« no previous file with comments | « ios/web/web_state/ui/crw_web_controller_container_view.mm ('k') | ios/web/web_state/ui/crw_wk_web_view_crash_detector.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698