| Index: Source/bindings/tests/results/V8TestObjectPython.cpp
|
| diff --git a/Source/bindings/tests/results/V8TestObjectPython.cpp b/Source/bindings/tests/results/V8TestObjectPython.cpp
|
| index 0ee4d3705fb76137807aad4f7aac20cfdb1dcdaa..b2feca4e50fb26abe31febec4160081ad8e936e4 100644
|
| --- a/Source/bindings/tests/results/V8TestObjectPython.cpp
|
| +++ b/Source/bindings/tests/results/V8TestObjectPython.cpp
|
| @@ -3074,6 +3074,123 @@ static void reflectedClassAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
|
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
|
| }
|
|
|
| +static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
|
| +{
|
| + TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
|
| + String resultValue = imp->fastGetAttribute(HTMLNames::limitedtoonlyoneattributeAttr);
|
| + if (resultValue.isEmpty()) {
|
| + ;
|
| + } else if (equalIgnoringCase(resultValue, "unique")) {
|
| + resultValue = "unique";
|
| + } else {
|
| + resultValue = "";
|
| + }
|
| + v8SetReturnValueString(info, resultValue, info.GetIsolate());
|
| +}
|
| +
|
| +static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
|
| + TestObjectPythonV8Internal::limitedToOnlyOneAttributeAttributeGetter(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
|
| +}
|
| +
|
| +static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
|
| +{
|
| + TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
|
| + V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
|
| + CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
|
| + imp->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue);
|
| +}
|
| +
|
| +static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
|
| + CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
|
| + TestObjectPythonV8Internal::limitedToOnlyOneAttributeAttributeSetter(jsValue, info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
|
| +}
|
| +
|
| +static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
|
| +{
|
| + TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
|
| + String resultValue = imp->fastGetAttribute(HTMLNames::limitedtoonlyattributeAttr);
|
| + if (resultValue.isEmpty()) {
|
| + ;
|
| + } else if (equalIgnoringCase(resultValue, "Per")) {
|
| + resultValue = "Per";
|
| + } else if (equalIgnoringCase(resultValue, "Paal")) {
|
| + resultValue = "Paal";
|
| + } else if (equalIgnoringCase(resultValue, "Espen")) {
|
| + resultValue = "Espen";
|
| + } else {
|
| + resultValue = "";
|
| + }
|
| + v8SetReturnValueString(info, resultValue, info.GetIsolate());
|
| +}
|
| +
|
| +static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
|
| + TestObjectPythonV8Internal::limitedToOnlyAttributeAttributeGetter(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
|
| +}
|
| +
|
| +static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
|
| +{
|
| + TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
|
| + V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
|
| + CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
|
| + imp->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue);
|
| +}
|
| +
|
| +static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
|
| + CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
|
| + TestObjectPythonV8Internal::limitedToOnlyAttributeAttributeSetter(jsValue, info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
|
| +}
|
| +
|
| +static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
|
| +{
|
| + TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
|
| + String resultValue = imp->fastGetAttribute(HTMLNames::OtherAttr);
|
| + if (resultValue.isEmpty()) {
|
| + ;
|
| + } else if (equalIgnoringCase(resultValue, "Value1")) {
|
| + resultValue = "Value1";
|
| + } else if (equalIgnoringCase(resultValue, "Value2")) {
|
| + resultValue = "Value2";
|
| + } else {
|
| + resultValue = "";
|
| + }
|
| + v8SetReturnValueString(info, resultValue, info.GetIsolate());
|
| +}
|
| +
|
| +static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
|
| + TestObjectPythonV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
|
| +}
|
| +
|
| +static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
|
| +{
|
| + TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
|
| + V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
|
| + CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
|
| + imp->setAttribute(HTMLNames::OtherAttr, cppValue);
|
| +}
|
| +
|
| +static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
|
| + CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
|
| + TestObjectPythonV8Internal::limitedToOnlyOtherAttributeAttributeSetter(jsValue, info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
|
| +}
|
| +
|
| static void replaceableReadonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
|
| {
|
| TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
|
| @@ -6853,6 +6970,9 @@ static const V8DOMConfiguration::AttributeConfiguration V8TestObjectPythonAttrib
|
| {"reflectedId", TestObjectPythonV8Internal::reflectedIdAttributeGetterCallback, TestObjectPythonV8Internal::reflectedIdAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
|
| {"reflectedName", TestObjectPythonV8Internal::reflectedNameAttributeGetterCallback, TestObjectPythonV8Internal::reflectedNameAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
|
| {"reflectedClass", TestObjectPythonV8Internal::reflectedClassAttributeGetterCallback, TestObjectPythonV8Internal::reflectedClassAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
|
| + {"limitedToOnlyOneAttribute", TestObjectPythonV8Internal::limitedToOnlyOneAttributeAttributeGetterCallback, TestObjectPythonV8Internal::limitedToOnlyOneAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
|
| + {"limitedToOnlyAttribute", TestObjectPythonV8Internal::limitedToOnlyAttributeAttributeGetterCallback, TestObjectPythonV8Internal::limitedToOnlyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
|
| + {"limitedToOnlyOtherAttribute", TestObjectPythonV8Internal::limitedToOnlyOtherAttributeAttributeGetterCallback, TestObjectPythonV8Internal::limitedToOnlyOtherAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
|
| {"replaceableReadonlyLongAttribute", TestObjectPythonV8Internal::replaceableReadonlyLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::TestObjectPythonReplaceableAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
|
| {"setterCallWithActiveWindowAndFirstWindowStringAttribute", TestObjectPythonV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
|
| {"setterCallWithExecutionContextStringAttribute", TestObjectPythonV8Internal::setterCallWithExecutionContextStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::setterCallWithExecutionContextStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
|
|
|