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