| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/argument_spec.h" | |
| 6 #include "base/memory/ptr_util.h" | 5 #include "base/memory/ptr_util.h" |
| 7 #include "base/values.h" | 6 #include "base/values.h" |
| 8 #include "extensions/renderer/api_binding_test_util.h" | 7 #include "extensions/renderer/bindings/api_binding_test_util.h" |
| 9 #include "extensions/renderer/api_invocation_errors.h" | 8 #include "extensions/renderer/bindings/api_invocation_errors.h" |
| 10 #include "extensions/renderer/api_type_reference_map.h" | 9 #include "extensions/renderer/bindings/api_type_reference_map.h" |
| 10 #include "extensions/renderer/bindings/argument_spec.h" |
| 11 #include "gin/converter.h" | 11 #include "gin/converter.h" |
| 12 #include "gin/public/isolate_holder.h" | 12 #include "gin/public/isolate_holder.h" |
| 13 #include "gin/test/v8_test.h" | 13 #include "gin/test/v8_test.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 #include "v8/include/v8.h" | 15 #include "v8/include/v8.h" |
| 16 | 16 |
| 17 namespace extensions { | 17 namespace extensions { |
| 18 | 18 |
| 19 class ArgumentSpecUnitTest : public gin::V8Test { | 19 class ArgumentSpecUnitTest : public gin::V8Test { |
| 20 protected: | 20 protected: |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 std::vector<std::unique_ptr<ArgumentSpec>> choices; | 808 std::vector<std::unique_ptr<ArgumentSpec>> choices; |
| 809 choices.push_back(base::MakeUnique<ArgumentSpec>(ArgumentType::INTEGER)); | 809 choices.push_back(base::MakeUnique<ArgumentSpec>(ArgumentType::INTEGER)); |
| 810 choices.push_back(base::MakeUnique<ArgumentSpec>(ArgumentType::STRING)); | 810 choices.push_back(base::MakeUnique<ArgumentSpec>(ArgumentType::STRING)); |
| 811 ArgumentSpec choices_spec(ArgumentType::CHOICES); | 811 ArgumentSpec choices_spec(ArgumentType::CHOICES); |
| 812 choices_spec.set_choices(std::move(choices)); | 812 choices_spec.set_choices(std::move(choices)); |
| 813 EXPECT_EQ("[integer|string]", choices_spec.GetTypeName()); | 813 EXPECT_EQ("[integer|string]", choices_spec.GetTypeName()); |
| 814 } | 814 } |
| 815 } | 815 } |
| 816 | 816 |
| 817 } // namespace extensions | 817 } // namespace extensions |
| OLD | NEW |