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

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 and move init to end 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 [static_cast<id<WKNavigationDelegate>>(webController_.get())
843 didFailProvisionalNavigation:nil 843 webView:static_cast<WKWebView*>(
sdefresne 2015/06/10 16:57:28 nit: this is ugly, can you use temporary variables
justincohen 2015/06/10 17:06:48 Done.
844 withError:error]; 844 [webController_ webView])
845 didFailProvisionalNavigation:nil
846 withError:error];
845 847
846 // Verify correctness of delegate's method arguments. 848 // Verify correctness of delegate's method arguments.
847 EXPECT_TRUE([mockDelegate_ SSLInfo].is_valid()); 849 EXPECT_TRUE([mockDelegate_ SSLInfo].is_valid());
848 EXPECT_EQ(net::CERT_STATUS_INVALID, [mockDelegate_ SSLInfo].cert_status); 850 EXPECT_EQ(net::CERT_STATUS_INVALID, [mockDelegate_ SSLInfo].cert_status);
849 EXPECT_EQ(net::CERT_STATUS_INVALID, [mockDelegate_ SSLStatus].cert_status); 851 EXPECT_EQ(net::CERT_STATUS_INVALID, [mockDelegate_ SSLStatus].cert_status);
850 EXPECT_EQ(web::SECURITY_STYLE_AUTHENTICATION_BROKEN, 852 EXPECT_EQ(web::SECURITY_STYLE_AUTHENTICATION_BROKEN,
851 [mockDelegate_ SSLStatus].security_style); 853 [mockDelegate_ SSLStatus].security_style);
852 EXPECT_FALSE([mockDelegate_ recoverable]); 854 EXPECT_FALSE([mockDelegate_ recoverable]);
853 EXPECT_FALSE([mockDelegate_ shouldContinueCallback]); 855 EXPECT_FALSE([mockDelegate_ shouldContinueCallback]);
854 } 856 }
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
1475 // https://bugs.webkit.org/show_bug.cgi?id=140203 1477 // https://bugs.webkit.org/show_bug.cgi?id=140203
1476 VLOG(1) << "Script has been flushed."; 1478 VLOG(1) << "Script has been flushed.";
1477 }]; 1479 }];
1478 // -evaluateJavaScript:stringResultHandler: is asynchronous so JavaScript 1480 // -evaluateJavaScript:stringResultHandler: is asynchronous so JavaScript
1479 // evaluation will not happen until TearDown, which deallocates 1481 // evaluation will not happen until TearDown, which deallocates
1480 // CRWWebController, which in its turn will deallocate WKWebView to create a 1482 // CRWWebController, which in its turn will deallocate WKWebView to create a
1481 // crashy condition. 1483 // crashy condition.
1482 }; 1484 };
1483 1485
1484 } // namespace 1486 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698