OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "core/testing/PrivateScriptTest.h" | 5 #include "core/testing/PrivateScriptTest.h" |
6 | 6 |
7 #include "bindings/core/v8/PrivateScriptRunner.h" | 7 #include "bindings/core/v8/PrivateScriptRunner.h" |
8 #include "bindings/core/v8/V8Binding.h" | 8 #include "bindings/core/v8/V8Binding.h" |
9 #include "bindings/core/v8/V8BindingForTesting.h" | 9 #include "bindings/core/v8/V8BindingForTesting.h" |
10 #include "bindings/core/v8/V8PrivateScriptTest.h" | 10 #include "bindings/core/v8/V8PrivateScriptTest.h" |
11 #include "core/testing/DummyPageHolder.h" | 11 #include "core/testing/DummyPageHolder.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include <memory> |
13 | 14 |
14 // PrivateScriptTest.js is available only in debug builds. | 15 // PrivateScriptTest.js is available only in debug builds. |
15 #ifndef NDEBUG | 16 #ifndef NDEBUG |
16 namespace blink { | 17 namespace blink { |
17 | 18 |
18 namespace { | 19 namespace { |
19 | 20 |
20 TEST(PrivateScriptTestTest, invokePrivateScriptMethodFromCPP) | 21 TEST(PrivateScriptTestTest, invokePrivateScriptMethodFromCPP) |
21 { | 22 { |
22 V8TestingScope scope; | 23 V8TestingScope scope; |
(...skipping 18 matching lines...) Expand all Loading... |
41 EXPECT_TRUE(success); | 42 EXPECT_TRUE(success); |
42 success = V8PrivateScriptTest::PrivateScript::stringAttributeForPrivateScrip
tOnlyAttributeGetter(&scope.frame(), privateScriptTest, &result); | 43 success = V8PrivateScriptTest::PrivateScript::stringAttributeForPrivateScrip
tOnlyAttributeGetter(&scope.frame(), privateScriptTest, &result); |
43 EXPECT_TRUE(success); | 44 EXPECT_TRUE(success); |
44 EXPECT_EQ(result, "foo"); | 45 EXPECT_EQ(result, "foo"); |
45 } | 46 } |
46 | 47 |
47 } // namespace | 48 } // namespace |
48 | 49 |
49 } // namespace blink | 50 } // namespace blink |
50 #endif | 51 #endif |
OLD | NEW |