| 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 "extensions/renderer/api_last_error.h" | 5 #include "extensions/renderer/bindings/api_last_error.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/optional.h" | 9 #include "base/optional.h" |
| 10 #include "extensions/renderer/api_binding_test.h" | 10 #include "extensions/renderer/bindings/api_binding_test.h" |
| 11 #include "extensions/renderer/api_binding_test_util.h" | 11 #include "extensions/renderer/bindings/api_binding_test_util.h" |
| 12 #include "gin/converter.h" | 12 #include "gin/converter.h" |
| 13 #include "gin/public/context_holder.h" | 13 #include "gin/public/context_holder.h" |
| 14 | 14 |
| 15 namespace extensions { | 15 namespace extensions { |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 void DoNothingWithError(v8::Local<v8::Context> context, | 19 void DoNothingWithError(v8::Local<v8::Context> context, |
| 20 const std::string& error) {} | 20 const std::string& error) {} |
| 21 | 21 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 last_error.ClearError(context_b, false); | 216 last_error.ClearError(context_b, false); |
| 217 EXPECT_EQ("\"Last error a\"", GetLastErrorMessage(parent_a, context_a)); | 217 EXPECT_EQ("\"Last error a\"", GetLastErrorMessage(parent_a, context_a)); |
| 218 EXPECT_EQ("undefined", GetLastErrorMessage(parent_b, context_b)); | 218 EXPECT_EQ("undefined", GetLastErrorMessage(parent_b, context_b)); |
| 219 | 219 |
| 220 last_error.ClearError(context_a, false); | 220 last_error.ClearError(context_a, false); |
| 221 EXPECT_EQ("undefined", GetLastErrorMessage(parent_a, context_a)); | 221 EXPECT_EQ("undefined", GetLastErrorMessage(parent_a, context_a)); |
| 222 EXPECT_EQ("undefined", GetLastErrorMessage(parent_b, context_b)); | 222 EXPECT_EQ("undefined", GetLastErrorMessage(parent_b, context_b)); |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace extensions | 225 } // namespace extensions |
| OLD | NEW |