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

Unified Diff: ios/web/test/web_int_test.mm

Issue 2644223002: Integration tests for WebStateDelegate::OnAuthRequired callback. (Closed)
Patch Set: Addressed review comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/test/web_int_test.h ('k') | ios/web/web_state/http_auth_inttest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/test/web_int_test.mm
diff --git a/ios/web/test/web_int_test.mm b/ios/web/test/web_int_test.mm
index 365d2b0de8be99a6b653b7cc77a56763ee21211b..edd8ad3d7d0376ed2bcec709f4aa51adf4f7c78b 100644
--- a/ios/web/test/web_int_test.mm
+++ b/ios/web/test/web_int_test.mm
@@ -61,10 +61,9 @@ void WebIntTest::SetUp() {
RemoveWKWebViewCreatedData([WKWebsiteDataStore defaultDataStore],
[WKWebsiteDataStore allWebsiteDataTypes]);
- // Create the WebState and its WebStateObserver.
+ // Create the WebState.
web::WebState::CreateParams web_state_create_params(GetBrowserState());
web_state_ = web::WebState::Create(web_state_create_params);
- observer_ = base::WrapUnique(new IntTestWebStateObserver(web_state()));
// Resize the webview so that pages can be properly rendered.
web_state()->GetView().frame =
@@ -72,6 +71,8 @@ void WebIntTest::SetUp() {
// Enable web usage for the WebState.
web_state()->SetWebUsageEnabled(true);
+
+ web_state()->SetDelegate(&web_state_delegate_);
}
void WebIntTest::TearDown() {
@@ -92,6 +93,7 @@ id WebIntTest::ExecuteJavaScript(NSString* script) {
void WebIntTest::ExecuteBlockAndWaitForLoad(const GURL& url,
ProceduralBlock block) {
DCHECK(block);
+ observer_ = base::MakeUnique<IntTestWebStateObserver>(web_state());
observer_->ExpectPageLoad(url);
block();
base::test::ios::WaitUntilCondition(^bool {
« no previous file with comments | « ios/web/test/web_int_test.h ('k') | ios/web/web_state/http_auth_inttest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698