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

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

Issue 209853010: [ABANDONED] Enable V8 Promises (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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: Source/bindings/v8/ScriptPromiseTest.cpp
diff --git a/Source/bindings/v8/ScriptPromiseTest.cpp b/Source/bindings/v8/ScriptPromiseTest.cpp
index c40fa5efc80fa240880bdc617ca5ba633af2242c..0b168258563e5b62a570070d4df071755f02c029 100644
--- a/Source/bindings/v8/ScriptPromiseTest.cpp
+++ b/Source/bindings/v8/ScriptPromiseTest.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "bindings/v8/ScriptPromise.h"
+#include "RuntimeEnabledFeatures.h"
#include "bindings/v8/DOMWrapperWorld.h"
#include "bindings/v8/ScriptPromiseResolver.h"
#include "bindings/v8/ScriptValue.h"
@@ -82,6 +83,8 @@ TEST_F(ScriptPromiseTest, constructFromNonPromise)
TEST_F(ScriptPromiseTest, castPromise)
{
+ if (RuntimeEnabledFeatures::scriptPromiseOnV8PromiseEnabled())
+ return;
ScriptPromise promise = ScriptPromiseResolver::create(m_isolate)->promise();
ScriptPromise newPromise = ScriptPromise::cast(ScriptValue(promise.v8Value(), m_isolate));
@@ -92,6 +95,8 @@ TEST_F(ScriptPromiseTest, castPromise)
TEST_F(ScriptPromiseTest, castNonPromise)
{
+ if (RuntimeEnabledFeatures::scriptPromiseOnV8PromiseEnabled())
+ return;
ScriptValue value = ScriptValue(v8String(m_isolate, "hello"), m_isolate);
ScriptPromise promise1 = ScriptPromise::cast(ScriptValue(value.v8Value(), m_isolate));
ScriptPromise promise2 = ScriptPromise::cast(ScriptValue(value.v8Value(), m_isolate));

Powered by Google App Engine
This is Rietveld 408576698