OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <openssl/evp.h> | 5 #include <openssl/evp.h> |
6 #include <openssl/rsa.h> | 6 #include <openssl/rsa.h> |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 | 10 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 178 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
179 VLOG(1) << "Extension registered. Navigate to the test https page."; | 179 VLOG(1) << "Extension registered. Navigate to the test https page."; |
180 | 180 |
181 content::WebContents* const extension_contents = | 181 content::WebContents* const extension_contents = |
182 browser()->tab_strip_model()->GetActiveWebContents(); | 182 browser()->tab_strip_model()->GetActiveWebContents(); |
183 | 183 |
184 content::TestNavigationObserver navigation_observer( | 184 content::TestNavigationObserver navigation_observer( |
185 nullptr /* no WebContents */); | 185 nullptr /* no WebContents */); |
186 navigation_observer.StartWatchingNewWebContents(); | 186 navigation_observer.StartWatchingNewWebContents(); |
187 ui_test_utils::NavigateToURLWithDisposition( | 187 ui_test_utils::NavigateToURLWithDisposition( |
188 browser(), https_server.GetURL("client-cert"), NEW_FOREGROUND_TAB, | 188 browser(), https_server.GetURL("client-cert"), |
| 189 WindowOpenDisposition::NEW_FOREGROUND_TAB, |
189 ui_test_utils::BROWSER_TEST_NONE); | 190 ui_test_utils::BROWSER_TEST_NONE); |
190 | 191 |
191 content::WebContents* const https_contents = | 192 content::WebContents* const https_contents = |
192 browser()->tab_strip_model()->GetActiveWebContents(); | 193 browser()->tab_strip_model()->GetActiveWebContents(); |
193 | 194 |
194 VLOG(1) << "Wait for the extension to respond to the certificates request."; | 195 VLOG(1) << "Wait for the extension to respond to the certificates request."; |
195 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 196 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
196 | 197 |
197 VLOG(1) << "Wait for the extension to receive the sign request."; | 198 VLOG(1) << "Wait for the extension to receive the sign request."; |
198 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 199 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 base::RunLoop run_loop; | 261 base::RunLoop run_loop; |
261 const std::string code = "replyWithSignatureSecondTime();"; | 262 const std::string code = "replyWithSignatureSecondTime();"; |
262 bool result = false; | 263 bool result = false; |
263 extension_contents->GetMainFrame()->ExecuteJavaScriptForTests( | 264 extension_contents->GetMainFrame()->ExecuteJavaScriptForTests( |
264 base::ASCIIToUTF16(code), | 265 base::ASCIIToUTF16(code), |
265 base::Bind(&StoreBool, &result, run_loop.QuitClosure())); | 266 base::Bind(&StoreBool, &result, run_loop.QuitClosure())); |
266 run_loop.Run(); | 267 run_loop.Run(); |
267 EXPECT_TRUE(result); | 268 EXPECT_TRUE(result); |
268 } | 269 } |
269 } | 270 } |
OLD | NEW |