Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Unified Diff: Source/bindings/v8/ScriptPromiseResolverTest.cpp

Issue 180743013: Ensure DOMWrapperWorld always exists in all webkit_unit_tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/v8/IDBBindingUtilitiesTest.cpp ('k') | Source/bindings/v8/ScriptPromiseTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptPromiseResolverTest.cpp
diff --git a/Source/bindings/v8/ScriptPromiseResolverTest.cpp b/Source/bindings/v8/ScriptPromiseResolverTest.cpp
index 8ab80f11b5fe46d30270c0eb0d85f56245de3300..0e4d761757f0820e10022a4c81bbad6aacafb3a3 100644
--- a/Source/bindings/v8/ScriptPromiseResolverTest.cpp
+++ b/Source/bindings/v8/ScriptPromiseResolverTest.cpp
@@ -47,16 +47,12 @@ class ScriptPromiseResolverTest : public testing::Test {
public:
ScriptPromiseResolverTest()
: m_isolate(v8::Isolate::GetCurrent())
- , m_handleScope(m_isolate)
- , m_context(m_isolate, v8::Context::New(m_isolate))
- , m_contextScope(m_context.newLocal(m_isolate))
{
}
void SetUp()
{
- // FIXME: Create a new world and pass it to V8PerContextData.
- m_perContextData = V8PerContextData::create(m_context.newLocal(m_isolate), 0);
+ m_scope = V8BindingTestScope::create(m_isolate);
m_promise = ScriptPromise::createPending();
m_resolver = ScriptPromiseResolver::create(m_promise);
}
@@ -65,7 +61,7 @@ public:
{
m_resolver = nullptr;
m_promise.clear();
- m_perContextData.clear();
+ m_scope.clear();
}
V8PromiseCustom::PromiseState state()
@@ -86,12 +82,10 @@ public:
protected:
v8::Isolate* m_isolate;
- v8::HandleScope m_handleScope;
- ScopedPersistent<v8::Context> m_context;
- v8::Context::Scope m_contextScope;
RefPtr<ScriptPromiseResolver> m_resolver;
ScriptPromise m_promise;
- OwnPtr<V8PerContextData> m_perContextData;
+private:
+ OwnPtr<V8BindingTestScope> m_scope;
};
TEST_F(ScriptPromiseResolverTest, initialState)
« no previous file with comments | « Source/bindings/v8/IDBBindingUtilitiesTest.cpp ('k') | Source/bindings/v8/ScriptPromiseTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698