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 "bindings/core/v8/ScriptStreamer.h" | 5 #include "bindings/core/v8/ScriptStreamer.h" |
6 | 6 |
| 7 #include <v8.h> |
| 8 #include <memory> |
7 #include "bindings/core/v8/ScriptSourceCode.h" | 9 #include "bindings/core/v8/ScriptSourceCode.h" |
8 #include "bindings/core/v8/ScriptStreamerThread.h" | 10 #include "bindings/core/v8/ScriptStreamerThread.h" |
9 #include "bindings/core/v8/V8Binding.h" | 11 #include "bindings/core/v8/V8Binding.h" |
10 #include "bindings/core/v8/V8BindingForTesting.h" | 12 #include "bindings/core/v8/V8BindingForTesting.h" |
11 #include "bindings/core/v8/V8ScriptRunner.h" | 13 #include "bindings/core/v8/V8ScriptRunner.h" |
12 #include "core/dom/Element.h" | 14 #include "core/dom/Element.h" |
13 #include "core/dom/PendingScript.h" | 15 #include "core/dom/PendingScript.h" |
14 #include "core/frame/Settings.h" | 16 #include "core/frame/Settings.h" |
15 #include "platform/heap/Handle.h" | 17 #include "platform/heap/Handle.h" |
16 #include "platform/testing/UnitTestHelpers.h" | 18 #include "platform/testing/UnitTestHelpers.h" |
17 #include "public/platform/Platform.h" | 19 #include "public/platform/Platform.h" |
18 #include "public/platform/WebScheduler.h" | 20 #include "public/platform/WebScheduler.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
20 #include <memory> | |
21 #include <v8.h> | |
22 | 22 |
23 namespace blink { | 23 namespace blink { |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 class ScriptStreamingTest : public ::testing::Test { | 27 class ScriptStreamingTest : public ::testing::Test { |
28 public: | 28 public: |
29 ScriptStreamingTest() | 29 ScriptStreamingTest() |
30 : m_loadingTaskRunner(Platform::current() | 30 : m_loadingTaskRunner(Platform::current() |
31 ->currentThread() | 31 ->currentThread() |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 v8::TryCatch tryCatch(scope.isolate()); | 385 v8::TryCatch tryCatch(scope.isolate()); |
386 v8::Local<v8::Script> script; | 386 v8::Local<v8::Script> script; |
387 EXPECT_TRUE(V8ScriptRunner::compileScript(sourceCode, scope.isolate()) | 387 EXPECT_TRUE(V8ScriptRunner::compileScript(sourceCode, scope.isolate()) |
388 .ToLocal(&script)); | 388 .ToLocal(&script)); |
389 EXPECT_FALSE(tryCatch.HasCaught()); | 389 EXPECT_FALSE(tryCatch.HasCaught()); |
390 } | 390 } |
391 | 391 |
392 } // namespace | 392 } // namespace |
393 | 393 |
394 } // namespace blink | 394 } // namespace blink |
OLD | NEW |