| 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 "platform/bindings/DOMWrapperWorld.h" | 5 #include "platform/bindings/DOMWrapperWorld.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/V8BindingForTesting.h" | 7 #include "bindings/core/v8/V8BindingForTesting.h" |
| 8 #include "bindings/core/v8/V8Initializer.h" | 8 #include "bindings/core/v8/V8Initializer.h" |
| 9 #include "bindings/core/v8/V8PerIsolateData.h" | |
| 10 #include "core/workers/WorkerBackingThread.h" | 9 #include "core/workers/WorkerBackingThread.h" |
| 11 #include "platform/CrossThreadFunctional.h" | 10 #include "platform/CrossThreadFunctional.h" |
| 12 #include "platform/WebTaskRunner.h" | 11 #include "platform/WebTaskRunner.h" |
| 13 #include "platform/WebThreadSupportingGC.h" | 12 #include "platform/WebThreadSupportingGC.h" |
| 13 #include "platform/bindings/V8PerIsolateData.h" |
| 14 #include "platform/testing/UnitTestHelpers.h" | 14 #include "platform/testing/UnitTestHelpers.h" |
| 15 #include "public/platform/Platform.h" | 15 #include "public/platform/Platform.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 17 | 17 |
| 18 namespace blink { | 18 namespace blink { |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 Vector<RefPtr<DOMWrapperWorld>> CreateIsolatedWorlds(v8::Isolate* isolate) { | 21 Vector<RefPtr<DOMWrapperWorld>> CreateIsolatedWorlds(v8::Isolate* isolate) { |
| 22 Vector<RefPtr<DOMWrapperWorld>> worlds; | 22 Vector<RefPtr<DOMWrapperWorld>> worlds; |
| 23 worlds.push_back(DOMWrapperWorld::EnsureIsolatedWorld( | 23 worlds.push_back(DOMWrapperWorld::EnsureIsolatedWorld( |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 world->Dispose(); | 141 world->Dispose(); |
| 142 } | 142 } |
| 143 worlds.clear(); | 143 worlds.clear(); |
| 144 EXPECT_FALSE(DOMWrapperWorld::NonMainWorldsExistInMainThread()); | 144 EXPECT_FALSE(DOMWrapperWorld::NonMainWorldsExistInMainThread()); |
| 145 DOMWrapperWorld::AllWorldsInCurrentThread(retrieved_worlds); | 145 DOMWrapperWorld::AllWorldsInCurrentThread(retrieved_worlds); |
| 146 EXPECT_EQ(1u, retrieved_worlds.size()); | 146 EXPECT_EQ(1u, retrieved_worlds.size()); |
| 147 } | 147 } |
| 148 | 148 |
| 149 } // namespace | 149 } // namespace |
| 150 } // namespace blink | 150 } // namespace blink |
| OLD | NEW |