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

Unified Diff: test/cctest/test-code-stub-assembler.cc

Issue 2589113002: [api] add API for Promise status and result. (Closed)
Patch Set: addressed comments Created 4 years 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 | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-code-stub-assembler.cc
diff --git a/test/cctest/test-code-stub-assembler.cc b/test/cctest/test-code-stub-assembler.cc
index e67c4b1597a54e2a2ca67c1b40205b3ebd12ccde..72f18d815cd0975a713a3fa2b77e04755103b82a 100644
--- a/test/cctest/test-code-stub-assembler.cc
+++ b/test/cctest/test-code-stub-assembler.cc
@@ -1863,7 +1863,7 @@ TEST(PromiseInit) {
ft.Call(isolate->factory()->undefined_value()).ToHandleChecked();
CHECK(result->IsJSPromise());
Handle<JSPromise> js_promise = Handle<JSPromise>::cast(result);
- CHECK_EQ(kPromisePending, js_promise->status());
+ CHECK_EQ(v8::Promise::kPending, js_promise->status());
CHECK_EQ(isolate->heap()->undefined_value(), js_promise->result());
CHECK(!js_promise->has_handler());
}
@@ -1877,7 +1877,7 @@ TEST(PromiseSet) {
Node* const context = m.Parameter(kNumParams + 2);
Node* const promise = m.AllocateJSPromise(context);
- m.PromiseSet(promise, m.SmiConstant(kPromisePending), m.SmiConstant(1));
+ m.PromiseSet(promise, m.SmiConstant(v8::Promise::kPending), m.SmiConstant(1));
m.Return(promise);
Handle<Code> code = data.GenerateCode();
@@ -1888,7 +1888,7 @@ TEST(PromiseSet) {
ft.Call(isolate->factory()->undefined_value()).ToHandleChecked();
CHECK(result->IsJSPromise());
Handle<JSPromise> js_promise = Handle<JSPromise>::cast(result);
- CHECK_EQ(kPromisePending, js_promise->status());
+ CHECK_EQ(v8::Promise::kPending, js_promise->status());
CHECK_EQ(Smi::FromInt(1), js_promise->result());
CHECK(!js_promise->has_handler());
}
@@ -2007,7 +2007,7 @@ TEST(CreatePromiseResolvingFunctionsContext) {
Node* const context = m.Parameter(kNumParams + 2);
Node* const native_context = m.LoadNativeContext(context);
Node* const promise = m.AllocateJSPromise(context);
- m.PromiseSet(promise, m.SmiConstant(kPromisePending), m.SmiConstant(1));
+ m.PromiseSet(promise, m.SmiConstant(v8::Promise::kPending), m.SmiConstant(1));
Node* const promise_context = m.CreatePromiseResolvingFunctionsContext(
promise, m.BooleanConstant(false), native_context);
m.Return(promise_context);
@@ -2039,7 +2039,7 @@ TEST(CreatePromiseResolvingFunctions) {
Node* const context = m.Parameter(kNumParams + 2);
Node* const native_context = m.LoadNativeContext(context);
Node* const promise = m.AllocateJSPromise(context);
- m.PromiseSet(promise, m.SmiConstant(kPromisePending), m.SmiConstant(1));
+ m.PromiseSet(promise, m.SmiConstant(v8::Promise::kPending), m.SmiConstant(1));
Node *resolve, *reject;
std::tie(resolve, reject) = m.CreatePromiseResolvingFunctions(
promise, m.BooleanConstant(false), native_context);
@@ -2071,7 +2071,7 @@ TEST(AllocateFunctionWithMapAndContext) {
Node* const context = m.Parameter(kNumParams + 2);
Node* const native_context = m.LoadNativeContext(context);
Node* const promise = m.AllocateJSPromise(context);
- m.PromiseSet(promise, m.SmiConstant(kPromisePending), m.SmiConstant(1));
+ m.PromiseSet(promise, m.SmiConstant(v8::Promise::kPending), m.SmiConstant(1));
Node* promise_context = m.CreatePromiseResolvingFunctionsContext(
promise, m.BooleanConstant(false), native_context);
Node* resolve_info =
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698