| 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> | |
| 14 | 13 |
| 15 // PrivateScriptTest.js is available only in debug builds. | 14 // PrivateScriptTest.js is available only in debug builds. |
| 16 #ifndef NDEBUG | 15 #ifndef NDEBUG |
| 17 namespace blink { | 16 namespace blink { |
| 18 | 17 |
| 19 namespace { | 18 namespace { |
| 20 | 19 |
| 21 TEST(PrivateScriptTestTest, invokePrivateScriptMethodFromCPP) | 20 TEST(PrivateScriptTestTest, invokePrivateScriptMethodFromCPP) |
| 22 { | 21 { |
| 23 V8TestingScope scope; | 22 V8TestingScope scope; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 42 EXPECT_TRUE(success); | 41 EXPECT_TRUE(success); |
| 43 success = V8PrivateScriptTest::PrivateScript::stringAttributeForPrivateScrip
tOnlyAttributeGetter(&scope.frame(), privateScriptTest, &result); | 42 success = V8PrivateScriptTest::PrivateScript::stringAttributeForPrivateScrip
tOnlyAttributeGetter(&scope.frame(), privateScriptTest, &result); |
| 44 EXPECT_TRUE(success); | 43 EXPECT_TRUE(success); |
| 45 EXPECT_EQ(result, "foo"); | 44 EXPECT_EQ(result, "foo"); |
| 46 } | 45 } |
| 47 | 46 |
| 48 } // namespace | 47 } // namespace |
| 49 | 48 |
| 50 } // namespace blink | 49 } // namespace blink |
| 51 #endif | 50 #endif |
| OLD | NEW |