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

Unified Diff: test/cctest/test-api.cc

Side-by-side diff isn't available for this file because of its large size.
Issue 2784213002: Add V8 extra utils for promise state (Closed)
Patch Set: Created 3 years, 8 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:
Download patch
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index b97c0cf265458b39b945e726c02b6eddf692567b..65e6135f8a074c5b3a661b94f12805c62aa22bd3 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -25486,6 +25486,12 @@ TEST(ExtrasUtilsObject) {
.ToLocalChecked()
.As<v8::Promise>();
CHECK(rejected_but_handled_promise->HasHandler());
+
+ auto promise_states = result->Get(env.local(), v8_str("promiseStates"))
+ .ToLocalChecked()
+ .As<v8::String>();
+ String::Utf8Value promise_states_string(promise_states);
+ CHECK_EQ(0, strcmp(*promise_states_string, "pending fulfilled rejected"));
}
« src/js/prologue.js ('K') | « src/js/prologue.js ('k') | test/cctest/test-extra.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698