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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolverTest.cpp

Issue 1743763004: Use v8::MicrotasksScope internally in V8RecursionScope. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v8rs-2-endofscope
Patch Set: v8_helpers Created 4 years, 9 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
Index: third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolverTest.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolverTest.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolverTest.cpp
index ea55caad0d38c42d9e46c6aae7f8724ed92f0e09..23f2b2a624d08d873cf46a6bf509371a5811b36f 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolverTest.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolverTest.cpp
@@ -60,7 +60,7 @@ public:
createClosure(callback, v8::Undefined(isolate()), isolate());
// Execute all pending microtasks
- isolate()->RunMicrotasks();
+ v8::MicrotasksScope::PerformCheckpoint(isolate());
}
OwnPtr<DummyPageHolder> m_pageHolder;
@@ -96,7 +96,7 @@ TEST_F(ScriptPromiseResolverTest, resolve)
EXPECT_EQ(String(), onFulfilled);
EXPECT_EQ(String(), onRejected);
- isolate()->RunMicrotasks();
+ v8::MicrotasksScope::PerformCheckpoint(isolate());
EXPECT_EQ(String(), onFulfilled);
EXPECT_EQ(String(), onRejected);
@@ -111,14 +111,14 @@ TEST_F(ScriptPromiseResolverTest, resolve)
EXPECT_EQ(String(), onFulfilled);
EXPECT_EQ(String(), onRejected);
- isolate()->RunMicrotasks();
+ v8::MicrotasksScope::PerformCheckpoint(isolate());
EXPECT_EQ("hello", onFulfilled);
EXPECT_EQ(String(), onRejected);
resolver->resolve("bye");
resolver->reject("bye");
- isolate()->RunMicrotasks();
+ v8::MicrotasksScope::PerformCheckpoint(isolate());
EXPECT_EQ("hello", onFulfilled);
EXPECT_EQ(String(), onRejected);
@@ -144,7 +144,7 @@ TEST_F(ScriptPromiseResolverTest, reject)
EXPECT_EQ(String(), onFulfilled);
EXPECT_EQ(String(), onRejected);
- isolate()->RunMicrotasks();
+ v8::MicrotasksScope::PerformCheckpoint(isolate());
EXPECT_EQ(String(), onFulfilled);
EXPECT_EQ(String(), onRejected);
@@ -159,14 +159,14 @@ TEST_F(ScriptPromiseResolverTest, reject)
EXPECT_EQ(String(), onFulfilled);
EXPECT_EQ(String(), onRejected);
- isolate()->RunMicrotasks();
+ v8::MicrotasksScope::PerformCheckpoint(isolate());
EXPECT_EQ(String(), onFulfilled);
EXPECT_EQ("hello", onRejected);
resolver->resolve("bye");
resolver->reject("bye");
- isolate()->RunMicrotasks();
+ v8::MicrotasksScope::PerformCheckpoint(isolate());
EXPECT_EQ(String(), onFulfilled);
EXPECT_EQ("hello", onRejected);
@@ -196,7 +196,7 @@ TEST_F(ScriptPromiseResolverTest, stop)
}
resolver->resolve("hello");
- isolate()->RunMicrotasks();
+ v8::MicrotasksScope::PerformCheckpoint(isolate());
EXPECT_EQ(String(), onFulfilled);
EXPECT_EQ(String(), onRejected);
@@ -321,7 +321,7 @@ TEST_F(ScriptPromiseResolverTest, resolveVoid)
}
resolver->resolve();
- isolate()->RunMicrotasks();
+ v8::MicrotasksScope::PerformCheckpoint(isolate());
EXPECT_EQ("undefined", onFulfilled);
EXPECT_EQ(String(), onRejected);
@@ -345,7 +345,7 @@ TEST_F(ScriptPromiseResolverTest, rejectVoid)
}
resolver->reject();
- isolate()->RunMicrotasks();
+ v8::MicrotasksScope::PerformCheckpoint(isolate());
EXPECT_EQ(String(), onFulfilled);
EXPECT_EQ("undefined", onRejected);

Powered by Google App Engine
This is Rietveld 408576698