Index: Source/modules/indexeddb/IDBRequestTest.cpp |
diff --git a/Source/modules/indexeddb/IDBRequestTest.cpp b/Source/modules/indexeddb/IDBRequestTest.cpp |
index 2eb2a5b4e93225d4aff6e38990591324a44b2598..ff13a823125bc679a2c514a855aebdc5ae8876c9 100644 |
--- a/Source/modules/indexeddb/IDBRequestTest.cpp |
+++ b/Source/modules/indexeddb/IDBRequestTest.cpp |
@@ -74,25 +74,26 @@ NullExecutionContext::NullExecutionContext() |
class IDBRequestTest : public testing::Test { |
public: |
IDBRequestTest() |
- : m_scope(V8ExecutionScope::create(v8::Isolate::GetCurrent())) |
- , m_context(adoptRef(new NullExecutionContext())) |
+ : m_scope(V8TestingScope::create(v8::Isolate::GetCurrent())) |
{ |
+ m_scope->scriptState()->setExecutionContext(adoptRef(new NullExecutionContext())); |
} |
- ExecutionContext* executionContext() |
+ v8::Isolate* isolate() const { return m_scope->isolate(); } |
+ |
+ ExecutionContext* executionContext() const |
{ |
- return m_context.get(); |
+ return m_scope->scriptState()->executionContext(); |
} |
private: |
- OwnPtr<V8ExecutionScope> m_scope; |
- RefPtr<ExecutionContext> m_context; |
+ OwnPtr<V8TestingScope> m_scope; |
}; |
TEST_F(IDBRequestTest, EventsAfterStopping) |
{ |
IDBTransaction* transaction = 0; |
- RefPtrWillBeRawPtr<IDBRequest> request = IDBRequest::create(executionContext(), IDBAny::createUndefined(), transaction); |
+ RefPtrWillBeRawPtr<IDBRequest> request = IDBRequest::create(ScriptState::current(isolate()), IDBAny::createUndefined(), transaction); |
jsbell
2014/05/27 18:38:47
Just isolate() here, rather than ScriptState::curr
haraken
2014/05/28 00:35:49
We need to pass ScriptState*, so replaced with scr
jsbell
2014/05/28 01:21:57
Oops, yeah. That. :)
|
EXPECT_EQ(request->readyState(), "pending"); |
executionContext()->stopActiveDOMObjects(); |
@@ -111,7 +112,7 @@ TEST_F(IDBRequestTest, EventsAfterStopping) |
TEST_F(IDBRequestTest, AbortErrorAfterAbort) |
{ |
IDBTransaction* transaction = 0; |
- RefPtrWillBeRawPtr<IDBRequest> request = IDBRequest::create(executionContext(), IDBAny::createUndefined(), transaction); |
+ RefPtrWillBeRawPtr<IDBRequest> request = IDBRequest::create(ScriptState::current(isolate()), IDBAny::createUndefined(), transaction); |
EXPECT_EQ(request->readyState(), "pending"); |
// Simulate the IDBTransaction having received onAbort from back end and aborting the request: |
@@ -158,7 +159,7 @@ TEST_F(IDBRequestTest, ConnectionsAfterStopping) |
{ |
OwnPtr<MockWebIDBDatabase> backend = MockWebIDBDatabase::create(); |
- RefPtrWillBeRawPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(executionContext(), callbacks, transactionId, version); |
+ RefPtrWillBeRawPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(ScriptState::current(isolate()), callbacks, transactionId, version); |
EXPECT_EQ(request->readyState(), "pending"); |
executionContext()->stopActiveDOMObjects(); |
@@ -167,7 +168,7 @@ TEST_F(IDBRequestTest, ConnectionsAfterStopping) |
{ |
OwnPtr<MockWebIDBDatabase> backend = MockWebIDBDatabase::create(); |
- RefPtrWillBeRawPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(executionContext(), callbacks, transactionId, version); |
+ RefPtrWillBeRawPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(ScriptState::current(isolate()), callbacks, transactionId, version); |
EXPECT_EQ(request->readyState(), "pending"); |
executionContext()->stopActiveDOMObjects(); |