| 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> | |
| 6 #include <openssl/rsa.h> | |
| 7 #include <stddef.h> | 5 #include <stddef.h> |
| 8 #include <stdint.h> | 6 #include <stdint.h> |
| 9 #include <stdlib.h> | 7 #include <stdlib.h> |
| 10 | 8 |
| 11 #include <memory> | 9 #include <memory> |
| 12 #include <string> | 10 #include <string> |
| 13 #include <vector> | 11 #include <vector> |
| 14 | 12 |
| 15 #include "base/bind.h" | 13 #include "base/bind.h" |
| 16 #include "base/callback.h" | 14 #include "base/callback.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 30 #include "components/policy/policy_constants.h" | 28 #include "components/policy/policy_constants.h" |
| 31 #include "content/public/browser/render_frame_host.h" | 29 #include "content/public/browser/render_frame_host.h" |
| 32 #include "content/public/browser/web_contents.h" | 30 #include "content/public/browser/web_contents.h" |
| 33 #include "content/public/test/test_navigation_observer.h" | 31 #include "content/public/test/test_navigation_observer.h" |
| 34 #include "content/public/test/test_utils.h" | 32 #include "content/public/test/test_utils.h" |
| 35 #include "crypto/rsa_private_key.h" | 33 #include "crypto/rsa_private_key.h" |
| 36 #include "extensions/common/extension.h" | 34 #include "extensions/common/extension.h" |
| 37 #include "extensions/test/result_catcher.h" | 35 #include "extensions/test/result_catcher.h" |
| 38 #include "net/test/spawned_test_server/spawned_test_server.h" | 36 #include "net/test/spawned_test_server/spawned_test_server.h" |
| 39 #include "testing/gmock/include/gmock/gmock.h" | 37 #include "testing/gmock/include/gmock/gmock.h" |
| 38 #include "third_party/boringssl/src/include/openssl/evp.h" |
| 39 #include "third_party/boringssl/src/include/openssl/rsa.h" |
| 40 | 40 |
| 41 using testing::Return; | 41 using testing::Return; |
| 42 using testing::_; | 42 using testing::_; |
| 43 | 43 |
| 44 namespace { | 44 namespace { |
| 45 | 45 |
| 46 void IgnoreResult(const base::Closure& callback, const base::Value* value) { | 46 void IgnoreResult(const base::Closure& callback, const base::Value* value) { |
| 47 callback.Run(); | 47 callback.Run(); |
| 48 } | 48 } |
| 49 | 49 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 base::RunLoop run_loop; | 260 base::RunLoop run_loop; |
| 261 const std::string code = "replyWithSignatureSecondTime();"; | 261 const std::string code = "replyWithSignatureSecondTime();"; |
| 262 bool result = false; | 262 bool result = false; |
| 263 extension_contents->GetMainFrame()->ExecuteJavaScriptForTests( | 263 extension_contents->GetMainFrame()->ExecuteJavaScriptForTests( |
| 264 base::ASCIIToUTF16(code), | 264 base::ASCIIToUTF16(code), |
| 265 base::Bind(&StoreBool, &result, run_loop.QuitClosure())); | 265 base::Bind(&StoreBool, &result, run_loop.QuitClosure())); |
| 266 run_loop.Run(); | 266 run_loop.Run(); |
| 267 EXPECT_TRUE(result); | 267 EXPECT_TRUE(result); |
| 268 } | 268 } |
| 269 } | 269 } |
| OLD | NEW |