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/ScriptPromiseResolver.h" | 5 #include "bindings/core/v8/ScriptPromiseResolver.h" |
6 | 6 |
| 7 #include <v8.h> |
| 8 #include <memory> |
7 #include "bindings/core/v8/ScriptFunction.h" | 9 #include "bindings/core/v8/ScriptFunction.h" |
8 #include "bindings/core/v8/ScriptValue.h" | 10 #include "bindings/core/v8/ScriptValue.h" |
9 #include "bindings/core/v8/V8Binding.h" | 11 #include "bindings/core/v8/V8Binding.h" |
10 #include "core/dom/DOMException.h" | 12 #include "core/dom/DOMException.h" |
11 #include "core/dom/Document.h" | 13 #include "core/dom/Document.h" |
12 #include "core/testing/DummyPageHolder.h" | 14 #include "core/testing/DummyPageHolder.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
14 #include <memory> | |
15 #include <v8.h> | |
16 | 16 |
17 namespace blink { | 17 namespace blink { |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 class Function : public ScriptFunction { | 21 class Function : public ScriptFunction { |
22 public: | 22 public: |
23 static v8::Local<v8::Function> createFunction(ScriptState* scriptState, | 23 static v8::Local<v8::Function> createFunction(ScriptState* scriptState, |
24 String* value) { | 24 String* value) { |
25 Function* self = new Function(scriptState, value); | 25 Function* self = new Function(scriptState, value); |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 resolver->reject(); | 337 resolver->reject(); |
338 v8::MicrotasksScope::PerformCheckpoint(isolate()); | 338 v8::MicrotasksScope::PerformCheckpoint(isolate()); |
339 | 339 |
340 EXPECT_EQ(String(), onFulfilled); | 340 EXPECT_EQ(String(), onFulfilled); |
341 EXPECT_EQ("undefined", onRejected); | 341 EXPECT_EQ("undefined", onRejected); |
342 } | 342 } |
343 | 343 |
344 } // namespace | 344 } // namespace |
345 | 345 |
346 } // namespace blink | 346 } // namespace blink |
OLD | NEW |