| 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 "config.h" | 5 #include "config.h" |
| 6 #include "bindings/core/v8/ScriptPromiseProperty.h" | 6 #include "bindings/core/v8/ScriptPromiseProperty.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/DOMWrapperWorld.h" | 8 #include "bindings/core/v8/DOMWrapperWorld.h" |
| 9 #include "bindings/core/v8/ScriptFunction.h" | 9 #include "bindings/core/v8/ScriptFunction.h" |
| 10 #include "bindings/core/v8/ScriptPromise.h" | 10 #include "bindings/core/v8/ScriptPromise.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 118 |
| 119 Persistent<Property> m_property; | 119 Persistent<Property> m_property; |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 class ScriptPromisePropertyTestBase { | 122 class ScriptPromisePropertyTestBase { |
| 123 public: | 123 public: |
| 124 ScriptPromisePropertyTestBase() | 124 ScriptPromisePropertyTestBase() |
| 125 : m_page(DummyPageHolder::create(IntSize(1, 1))) | 125 : m_page(DummyPageHolder::create(IntSize(1, 1))) |
| 126 { | 126 { |
| 127 v8::HandleScope handleScope(isolate()); | 127 v8::HandleScope handleScope(isolate()); |
| 128 m_otherScriptState = ScriptStateForTesting::create(v8::Context::New(isol
ate()), DOMWrapperWorld::create(1)); | 128 m_otherScriptState = ScriptStateForTesting::create(v8::Context::New(isol
ate()), DOMWrapperWorld::create(isolate(), 1)); |
| 129 } | 129 } |
| 130 | 130 |
| 131 virtual ~ScriptPromisePropertyTestBase() | 131 virtual ~ScriptPromisePropertyTestBase() |
| 132 { | 132 { |
| 133 m_page.clear(); | 133 m_page.clear(); |
| 134 gc(); | 134 gc(); |
| 135 Heap::collectAllGarbage(); | 135 Heap::collectAllGarbage(); |
| 136 } | 136 } |
| 137 | 137 |
| 138 Document& document() { return m_page->document(); } | 138 Document& document() { return m_page->document(); } |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 { | 545 { |
| 546 test(String("hello"), "hello", __FILE__, __LINE__); | 546 test(String("hello"), "hello", __FILE__, __LINE__); |
| 547 } | 547 } |
| 548 | 548 |
| 549 TEST_F(ScriptPromisePropertyNonScriptWrappableResolutionTargetTest, ResolveWithI
nteger) | 549 TEST_F(ScriptPromisePropertyNonScriptWrappableResolutionTargetTest, ResolveWithI
nteger) |
| 550 { | 550 { |
| 551 test<int>(-1, "-1", __FILE__, __LINE__); | 551 test<int>(-1, "-1", __FILE__, __LINE__); |
| 552 } | 552 } |
| 553 | 553 |
| 554 } // namespace | 554 } // namespace |
| OLD | NEW |