OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "base/memory/ptr_util.h" | 5 #include "base/memory/ptr_util.h" |
6 #include "base/strings/sys_string_conversions.h" | 6 #include "base/strings/sys_string_conversions.h" |
7 #include "base/test/ios/wait_util.h" | 7 #include "base/test/ios/wait_util.h" |
8 #import "ios/web/public/navigation_manager.h" | 8 #import "ios/web/public/navigation_manager.h" |
9 #import "ios/web/public/test/http_server.h" | 9 #import "ios/web/public/test/http_server/http_auth_response_provider.h" |
10 #include "ios/web/public/test/http_server_util.h" | 10 #import "ios/web/public/test/http_server/http_server.h" |
11 #import "ios/web/public/test/response_providers/http_auth_response_provider.h" | 11 #include "ios/web/public/test/http_server/http_server_util.h" |
12 #import "ios/web/test/web_int_test.h" | 12 #import "ios/web/test/web_int_test.h" |
13 #import "testing/gtest_mac.h" | 13 #import "testing/gtest_mac.h" |
14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
15 | 15 |
16 namespace web { | 16 namespace web { |
17 | 17 |
18 using test::HttpServer; | 18 using test::HttpServer; |
19 | 19 |
20 // Test fixture for WebStateDelegate::OnAuthRequired integration tests. | 20 // Test fixture for WebStateDelegate::OnAuthRequired integration tests. |
21 class HttpAuthTest : public WebIntTest { | 21 class HttpAuthTest : public WebIntTest { |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 // Cancel authentication and make sure that the page is blank. | 113 // Cancel authentication and make sure that the page is blank. |
114 auth_request->auth_callback.Run(nil, nil); | 114 auth_request->auth_callback.Run(nil, nil); |
115 base::test::ios::WaitUntilCondition(^bool { | 115 base::test::ios::WaitUntilCondition(^bool { |
116 return !web_state()->IsLoading(); | 116 return !web_state()->IsLoading(); |
117 }); | 117 }); |
118 EXPECT_FALSE(ExecuteJavaScript(@"window.document")); | 118 EXPECT_FALSE(ExecuteJavaScript(@"window.document")); |
119 } | 119 } |
120 | 120 |
121 } // web | 121 } // web |
OLD | NEW |