Skip to content

Commit

Permalink
Reorganize bindings test IDL files
Browse files Browse the repository at this point in the history
Rename the various IDL files used to test bindings for partial interfaces.
The intent is to make it clearer which files are extending a particular
interface. The naming convention follows the suggestion in an earlier CL:
https://codereview.chromium.org/1884423002/#msg20

This prepares for a subsequent CL to fix the bindings for partial
interfaces for the [OriginTrialEnabled] extended attribute.

BUG=585656

Review-Url: https://codereview.chromium.org/2049843003
Cr-Commit-Position: refs/heads/master@{#398856}
  • Loading branch information
jpchase authored and Commit bot committed Jun 9, 2016
1 parent b69344a commit c9a4335
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/

[
ImplementedAs=TestPartialInterfaceImplementation, // Conflicts with default partial interface class name
ImplementedAs=TestInterfacePartial2Implementation, // Conflicts with default partial interface class name
] partial interface TestInterface {
const unsigned short PARTIAL2_UNSIGNED_SHORT = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/

[
ImplementedAs=TestPartialInterfaceImplementation3,
ImplementedAs=TestInterfacePartial3Implementation,
] partial interface TestInterface {
const unsigned short PARTIAL3_UNSIGNED_SHORT = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include "bindings/core/v8/V8TestInterface.h"
#include "bindings/tests/idls/core/TestImplements2.h"
#include "bindings/tests/idls/core/TestImplements3Implementation.h"
#include "bindings/tests/idls/core/TestPartialInterface.h"
#include "bindings/tests/idls/core/TestPartialInterfaceImplementation.h"
#include "bindings/tests/idls/core/TestInterfacePartial.h"
#include "bindings/tests/idls/core/TestInterfacePartial2Implementation.h"

namespace blink {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include "bindings/core/v8/V8TestInterfaceEmpty.h"
#include "bindings/tests/idls/core/TestImplements2.h"
#include "bindings/tests/idls/core/TestImplements3Implementation.h"
#include "bindings/tests/idls/core/TestPartialInterface.h"
#include "bindings/tests/idls/core/TestPartialInterfaceImplementation.h"
#include "bindings/tests/idls/core/TestInterfacePartial.h"
#include "bindings/tests/idls/core/TestInterfacePartial2Implementation.h"

namespace blink {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#include "bindings/core/v8/V8Window.h"
#include "bindings/tests/idls/core/TestImplements2.h"
#include "bindings/tests/idls/core/TestImplements3Implementation.h"
#include "bindings/tests/idls/core/TestPartialInterface.h"
#include "bindings/tests/idls/core/TestPartialInterfaceImplementation.h"
#include "bindings/tests/idls/core/TestInterfacePartial.h"
#include "bindings/tests/idls/core/TestInterfacePartial2Implementation.h"
#include "core/dom/Document.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/UseCounter.h"
Expand Down Expand Up @@ -829,7 +829,7 @@ static void partialLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v
{
v8::Local<v8::Object> holder = info.Holder();
TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
v8SetReturnValueInt(info, TestPartialInterface::partialLongAttribute(*impl));
v8SetReturnValueInt(info, TestInterfacePartial::partialLongAttribute(*impl));
}

static void partialLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand All @@ -845,7 +845,7 @@ static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
TestPartialInterface::setPartialLongAttribute(*impl, cppValue);
TestInterfacePartial::setPartialLongAttribute(*impl, cppValue);
}

static void partialLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand All @@ -856,7 +856,7 @@ static void partialLongAttributeAttributeSetterCallback(const v8::FunctionCallba

static void partialStaticLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8SetReturnValueInt(info, TestPartialInterface::partialStaticLongAttribute());
v8SetReturnValueInt(info, TestInterfacePartial::partialStaticLongAttribute());
}

static void partialStaticLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand All @@ -871,7 +871,7 @@ static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
TestPartialInterface::setPartialStaticLongAttribute(cppValue);
TestInterfacePartial::setPartialStaticLongAttribute(cppValue);
}

static void partialStaticLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand All @@ -885,7 +885,7 @@ static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8
v8::Local<v8::Object> holder = info.Holder();
TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
v8SetReturnValueInt(info, TestPartialInterface::partialCallWithExecutionContextLongAttribute(executionContext, *impl));
v8SetReturnValueInt(info, TestInterfacePartial::partialCallWithExecutionContextLongAttribute(executionContext, *impl));
}

static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand All @@ -902,7 +902,7 @@ static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca
if (exceptionState.throwIfNeeded())
return;
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
TestPartialInterface::setPartialCallWithExecutionContextLongAttribute(executionContext, *impl, cppValue);
TestInterfacePartial::setPartialCallWithExecutionContextLongAttribute(executionContext, *impl, cppValue);
}

static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand All @@ -915,7 +915,7 @@ static void partialPartialEnumTypeAttributeAttributeGetter(const v8::FunctionCal
{
v8::Local<v8::Object> holder = info.Holder();
TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
v8SetReturnValueString(info, TestPartialInterface::partialPartialEnumTypeAttribute(*impl), info.GetIsolate());
v8SetReturnValueString(info, TestInterfacePartial::partialPartialEnumTypeAttribute(*impl), info.GetIsolate());
}

static void partialPartialEnumTypeAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand All @@ -939,7 +939,7 @@ static void partialPartialEnumTypeAttributeAttributeSetter(v8::Local<v8::Value>
currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, exceptionState.message()));
return;
}
TestPartialInterface::setPartialPartialEnumTypeAttribute(*impl, cppValue);
TestInterfacePartial::setPartialPartialEnumTypeAttribute(*impl, cppValue);
}

static void partialPartialEnumTypeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand Down Expand Up @@ -983,7 +983,7 @@ static void partial2LongAttributeAttributeGetter(const v8::FunctionCallbackInfo<
{
v8::Local<v8::Object> holder = info.Holder();
TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2LongAttribute(*impl));
v8SetReturnValueInt(info, TestInterfacePartial2Implementation::partial2LongAttribute(*impl));
}

static void partial2LongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand All @@ -999,7 +999,7 @@ static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
TestPartialInterfaceImplementation::setPartial2LongAttribute(*impl, cppValue);
TestInterfacePartial2Implementation::setPartial2LongAttribute(*impl, cppValue);
}

static void partial2LongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand All @@ -1010,7 +1010,7 @@ static void partial2LongAttributeAttributeSetterCallback(const v8::FunctionCallb

static void partial2StaticLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2StaticLongAttribute());
v8SetReturnValueInt(info, TestInterfacePartial2Implementation::partial2StaticLongAttribute());
}

static void partial2StaticLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand All @@ -1025,7 +1025,7 @@ static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
TestPartialInterfaceImplementation::setPartial2StaticLongAttribute(cppValue);
TestInterfacePartial2Implementation::setPartial2StaticLongAttribute(cppValue);
}

static void partial2StaticLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand Down Expand Up @@ -1520,7 +1520,7 @@ static void implements3StaticVoidMethodMethodCallback(const v8::FunctionCallback
static void partialVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
TestPartialInterface::partialVoidMethod(*impl);
TestInterfacePartial::partialVoidMethod(*impl);
}

static void partialVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand All @@ -1530,7 +1530,7 @@ static void partialVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V

static void partialStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestPartialInterface::partialStaticVoidMethod();
TestInterfacePartial::partialStaticVoidMethod();
}

static void partialStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand All @@ -1553,7 +1553,7 @@ static void partialVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Va
if (exceptionState.throwIfNeeded())
return;
}
TestPartialInterface::partialVoidMethodLongArg(*impl, longArg);
TestInterfacePartial::partialVoidMethodLongArg(*impl, longArg);
}

static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand All @@ -1566,7 +1566,7 @@ static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(const
ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialCallWithExecutionContextRaisesExceptionVoidMethod", "TestInterface", info.Holder(), info.GetIsolate());
TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
TestPartialInterface::partialCallWithExecutionContextRaisesExceptionVoidMethod(executionContext, *impl, exceptionState);
TestInterfacePartial::partialCallWithExecutionContextRaisesExceptionVoidMethod(executionContext, *impl, exceptionState);
if (exceptionState.hadException()) {
exceptionState.throwIfNeeded();
return;
Expand All @@ -1593,7 +1593,7 @@ static void partialVoidMethodPartialCallbackTypeArgMethod(const v8::FunctionCall
}
partialCallbackTypeArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]);
}
TestPartialInterface::partialVoidMethodPartialCallbackTypeArg(*impl, partialCallbackTypeArg);
TestInterfacePartial::partialVoidMethodPartialCallbackTypeArg(*impl, partialCallbackTypeArg);
}

static void partialVoidMethodPartialCallbackTypeArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand Down Expand Up @@ -1630,12 +1630,12 @@ static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback
static void partial2VoidMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
TestPartialInterfaceImplementation::partial2VoidMethod(*impl);
TestInterfacePartial2Implementation::partial2VoidMethod(*impl);
}

static void partial2StaticVoidMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestPartialInterfaceImplementation::partial2StaticVoidMethod();
TestInterfacePartial2Implementation::partial2StaticVoidMethod();
}

static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "bindings/core/v8/V8Node.h"
#include "bindings/core/v8/V8ObjectConstructor.h"
#include "bindings/core/v8/V8TestInterface.h"
#include "bindings/tests/idls/modules/TestPartialInterfaceImplementation3.h"
#include "bindings/tests/idls/modules/TestInterfacePartial3Implementation.h"
#include "core/dom/Document.h"
#include "core/frame/LocalFrame.h"
#include "platform/RuntimeEnabledFeatures.h"
Expand All @@ -35,7 +35,7 @@ static void voidMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v8::
if (!value.prepare())
return;
}
TestPartialInterfaceImplementation3::voidMethodPartialOverload(*impl, value);
TestInterfacePartial3Implementation::voidMethodPartialOverload(*impl, value);
}

static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand Down Expand Up @@ -66,7 +66,7 @@ static void staticVoidMethodPartialOverload2Method(const v8::FunctionCallbackInf
if (!value.prepare())
return;
}
TestPartialInterfaceImplementation3::staticVoidMethodPartialOverload(value);
TestInterfacePartial3Implementation::staticVoidMethodPartialOverload(value);
}

static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand Down Expand Up @@ -100,7 +100,7 @@ static void promiseMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v
return;
}
}
v8SetReturnValue(info, TestPartialInterfaceImplementation3::promiseMethodPartialOverload(*impl, document).v8Value());
v8SetReturnValue(info, TestInterfacePartial3Implementation::promiseMethodPartialOverload(*impl, document).v8Value());
}

static void promiseMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand Down Expand Up @@ -131,7 +131,7 @@ static void staticPromiseMethodPartialOverload2MethodPromise(const v8::FunctionC
if (!value.prepare(exceptionState))
return;
}
v8SetReturnValue(info, TestPartialInterfaceImplementation3::staticPromiseMethodPartialOverload(value).v8Value());
v8SetReturnValue(info, TestInterfacePartial3Implementation::staticPromiseMethodPartialOverload(value).v8Value());
}

static void staticPromiseMethodPartialOverload2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand Down Expand Up @@ -171,7 +171,7 @@ static void partial2VoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
if (!value.prepare())
return;
}
TestPartialInterfaceImplementation3::partial2VoidMethod(*impl, value);
TestInterfacePartial3Implementation::partial2VoidMethod(*impl, value);
}

static void partial2VoidMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand All @@ -185,7 +185,7 @@ static void partial2VoidMethod3Method(const v8::FunctionCallbackInfo<v8::Value>&
return;
}
}
TestPartialInterfaceImplementation3::partial2VoidMethod(*impl, node);
TestInterfacePartial3Implementation::partial2VoidMethod(*impl, node);
}

static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand Down Expand Up @@ -235,7 +235,7 @@ static void partialVoidTestEnumModulesArgMethodMethod(const v8::FunctionCallback
return;
}
}
TestPartialInterfaceImplementation3::partialVoidTestEnumModulesArgMethod(*impl, arg);
TestInterfacePartial3Implementation::partialVoidTestEnumModulesArgMethod(*impl, arg);
}

static void partialVoidTestEnumModulesArgMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand All @@ -251,7 +251,7 @@ static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V
if (!value.prepare())
return;
}
TestPartialInterfaceImplementation3::partial2StaticVoidMethod(value);
TestInterfacePartial3Implementation::partial2StaticVoidMethod(value);
}

static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand All @@ -277,7 +277,7 @@ static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
static void unscopeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
TestPartialInterfaceImplementation3::unscopeableVoidMethod(*impl);
TestInterfacePartial3Implementation::unscopeableVoidMethod(*impl);
}

static void unscopeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand Down
6 changes: 3 additions & 3 deletions third_party/WebKit/Tools/Scripts/webkitpy/bindings/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@
'TestImplements.idl',
'TestImplements2.idl',
'TestImplements3.idl',
'TestPartialInterface.idl',
'TestPartialInterface2.idl',
'TestPartialInterface3.idl',
'TestInterfacePartial.idl',
'TestInterfacePartial2.idl',
'TestInterfacePartial3.idl',
'TestInterface2Partial.idl',
'TestInterface2Partial2.idl',
])
Expand Down

0 comments on commit c9a4335

Please sign in to comment.