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

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

Issue 871013007: Use enum BinaryType for WebSocket.binaryType, instead of DOMString (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/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/core/V8TestObject.cpp b/Source/bindings/tests/results/core/V8TestObject.cpp
index 925385b4426dfd1e05e520d243fdaea22ab9a0c0..a29679d198dbd945252ecc5983849c9aa1d44e45 100644
--- a/Source/bindings/tests/results/core/V8TestObject.cpp
+++ b/Source/bindings/tests/results/core/V8TestObject.cpp
@@ -1643,8 +1643,10 @@ static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
TestObject* impl = V8TestObject::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'."));
return;
+ }
impl->setTestEnumAttribute(cppValue);
}
@@ -5045,8 +5047,10 @@ static void enumForPrivateScriptAttributeSetter(v8::Local<v8::Value> v8Value, co
TestObject* impl = V8TestObject::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'."));
return;
+ }
V8TestObject::PrivateScript::enumForPrivateScriptAttributeSetter(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, cppValue);
}

Powered by Google App Engine
This is Rietveld 408576698