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

Unified Diff: Source/bindings/tests/results/core/V8TestInterface.cpp

Issue 955413002: Log in Binding code for invalid enum type. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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/tests/results/core/V8TestInterface.cpp
diff --git a/Source/bindings/tests/results/core/V8TestInterface.cpp b/Source/bindings/tests/results/core/V8TestInterface.cpp
index ee22dc2217f61d28880eb99c498d07257f850a05..13bbe69d207e5336f17a40eb03a2d00f44386024 100644
--- a/Source/bindings/tests/results/core/V8TestInterface.cpp
+++ b/Source/bindings/tests/results/core/V8TestInterface.cpp
@@ -239,8 +239,10 @@ static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
String string = cppValue;
- if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || string == "EnumValue3"))
+ if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || string == "EnumValue3")) {
+ currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, "The provided value '" + string + "' is not a valid value of type 'TestEnum'."));
pfeldman 2015/03/02 16:07:38 WarningMessageLevel
return;
+ }
impl->setTestEnumAttribute(cppValue);
}
@@ -826,8 +828,10 @@ static void partialPartialEnumTypeAttributeAttributeSetter(v8::Local<v8::Value>
TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
String string = cppValue;
- if (!(string == "foo" || string == "bar"))
+ if (!(string == "foo" || string == "bar")) {
+ currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, "The provided value '" + string + "' is not a valid value of type 'PartialEnumType'."));
pfeldman 2015/03/02 16:07:38 WarningMessageLevel
return;
+ }
TestPartialInterface::setPartialPartialEnumTypeAttribute(*impl, cppValue);
}
#endif // ENABLE(PARTIAL_CONDITION)

Powered by Google App Engine
This is Rietveld 408576698