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 "bindings/core/v8/ScriptModule.h" | 5 #include "bindings/core/v8/ScriptModule.h" |
6 | 6 |
7 #include "bindings/core/v8/ScriptController.h" | 7 #include "bindings/core/v8/ScriptController.h" |
8 #include "bindings/core/v8/ScriptSourceCode.h" | 8 #include "bindings/core/v8/ScriptSourceCode.h" |
9 #include "bindings/core/v8/V8BindingForTesting.h" | 9 #include "bindings/core/v8/V8BindingForTesting.h" |
10 #include "bindings/core/v8/V8PerContextData.h" | |
11 #include "core/dom/ScriptModuleResolver.h" | 10 #include "core/dom/ScriptModuleResolver.h" |
12 #include "core/frame/LocalFrame.h" | 11 #include "core/frame/LocalFrame.h" |
13 #include "core/testing/DummyModulator.h" | 12 #include "core/testing/DummyModulator.h" |
14 #include "platform/bindings/V8Binding.h" | 13 #include "platform/bindings/V8Binding.h" |
| 14 #include "platform/bindings/V8PerContextData.h" |
15 #include "testing/gmock/include/gmock/gmock-matchers.h" | 15 #include "testing/gmock/include/gmock/gmock-matchers.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "v8/include/v8.h" | 17 #include "v8/include/v8.h" |
18 | 18 |
19 namespace blink { | 19 namespace blink { |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 class TestScriptModuleResolver final : public ScriptModuleResolver { | 23 class TestScriptModuleResolver final : public ScriptModuleResolver { |
24 public: | 24 public: |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 .GetScriptController() | 216 .GetScriptController() |
217 .ExecuteScriptInMainWorldAndReturnValue( | 217 .ExecuteScriptInMainWorldAndReturnValue( |
218 ScriptSourceCode("window.foo")); | 218 ScriptSourceCode("window.foo")); |
219 ASSERT_TRUE(value->IsString()); | 219 ASSERT_TRUE(value->IsString()); |
220 EXPECT_EQ("bar", ToCoreString(v8::Local<v8::String>::Cast(value))); | 220 EXPECT_EQ("bar", ToCoreString(v8::Local<v8::String>::Cast(value))); |
221 } | 221 } |
222 | 222 |
223 } // namespace | 223 } // namespace |
224 | 224 |
225 } // namespace blink | 225 } // namespace blink |
OLD | NEW |