aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/parser
diff options
context:
space:
mode:
authorKagami Sascha Rosylight <saschanaz@outlook.com>2022-01-05 03:39:33 +0100
committerKagami Sascha Rosylight <saschanaz@outlook.com>2022-01-05 03:39:33 +0100
commit52ea5204a23d8cc9d40ac3e9eb4fd9e03c1cd1ca (patch)
treeff222506f529fb20f148b634161a10244fd2a7ec /components/script/dom/bindings/codegen/parser
parent5df705a41f6c4c1f2ffeec257dfe0129ce5fa8e0 (diff)
downloadservo-52ea5204a23d8cc9d40ac3e9eb4fd9e03c1cd1ca.tar.gz
servo-52ea5204a23d8cc9d40ac3e9eb4fd9e03c1cd1ca.zip
Convert Web IDL void to undefined
Fixes #27660
Diffstat (limited to 'components/script/dom/bindings/codegen/parser')
-rw-r--r--components/script/dom/bindings/codegen/parser/WebIDL.py80
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_argument_identifier_conflicts.py2
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_argument_keywords.py2
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_argument_novoid.py4
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_arraybuffer.py24
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_attributes_on_types.py26
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_bytestring.py4
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py30
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_cereactions.py4
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_dictionary.py40
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py48
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_empty_sequence_default_value.py2
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_enum.py2
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_exposed_extended_attribute.py18
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_extended_attributes.py14
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_float_types.py20
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_global_extended_attr.py4
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_incomplete_parent.py2
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_interface.py10
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_interface_maplikesetlikeiterable.py22
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_interfacemixin.py12
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_method.py58
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_nullable_void.py4
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_optional_constraints.py4
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_overload.py20
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_promise.py2
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_record.py10
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_securecontext_extended_attribute.py46
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py2
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_special_methods.py6
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_typedef.py10
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_unforgeable.py18
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_union.py6
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_union_any.py2
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_union_nullable.py6
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_variadic_constraints.py8
36 files changed, 286 insertions, 286 deletions
diff --git a/components/script/dom/bindings/codegen/parser/WebIDL.py b/components/script/dom/bindings/codegen/parser/WebIDL.py
index d74278c3e0c..85c0046549d 100644
--- a/components/script/dom/bindings/codegen/parser/WebIDL.py
+++ b/components/script/dom/bindings/codegen/parser/WebIDL.py
@@ -2093,7 +2093,7 @@ class IDLType(IDLObject):
'utf8string',
'jsstring',
'object',
- 'void',
+ 'undefined',
# Funny stuff
'interface',
'dictionary',
@@ -2168,8 +2168,8 @@ class IDLType(IDLObject):
def isJSString(self):
return False
- def isVoid(self):
- return self.name == "Void"
+ def isUndefined(self):
+ return self.name == "Undefined"
def isSequence(self):
return False
@@ -2355,7 +2355,7 @@ class IDLParametrizedType(IDLType):
class IDLNullableType(IDLParametrizedType):
def __init__(self, location, innerType):
- assert not innerType.isVoid()
+ assert not innerType.isUndefined()
assert not innerType == BuiltinTypes[IDLBuiltinType.Types.any]
IDLParametrizedType.__init__(self, location, None, innerType)
@@ -2414,7 +2414,7 @@ class IDLNullableType(IDLParametrizedType):
def isInteger(self):
return self.inner.isInteger()
- def isVoid(self):
+ def isUndefined(self):
return False
def isSequence(self):
@@ -2517,7 +2517,7 @@ class IDLNullableType(IDLParametrizedType):
class IDLSequenceType(IDLParametrizedType):
def __init__(self, location, parameterType):
- assert not parameterType.isVoid()
+ assert not parameterType.isUndefined()
IDLParametrizedType.__init__(self, location, parameterType.name, parameterType)
# Need to set self.name up front if our inner type is already complete,
@@ -2561,7 +2561,7 @@ class IDLSequenceType(IDLParametrizedType):
def isJSString(self):
return False
- def isVoid(self):
+ def isUndefined(self):
return False
def isSequence(self):
@@ -2602,7 +2602,7 @@ class IDLRecordType(IDLParametrizedType):
def __init__(self, location, keyType, valueType):
assert keyType.isString()
assert keyType.isComplete()
- assert not valueType.isVoid()
+ assert not valueType.isUndefined()
IDLParametrizedType.__init__(self, location, valueType.name, valueType)
self.keyType = keyType
@@ -2673,7 +2673,7 @@ class IDLUnionType(IDLType):
def prettyName(self):
return "(" + " or ".join(m.prettyName() for m in self.memberTypes) + ")"
- def isVoid(self):
+ def isUndefined(self):
return False
def isUnion(self):
@@ -2836,8 +2836,8 @@ class IDLTypedefType(IDLType):
def isJSString(self):
return self.inner.isJSString()
- def isVoid(self):
- return self.inner.isVoid()
+ def isUndefined(self):
+ return self.inner.isUndefined()
def isJSONType(self):
return self.inner.isJSONType()
@@ -2972,7 +2972,7 @@ class IDLWrapperType(IDLType):
def isJSString(self):
return False
- def isVoid(self):
+ def isUndefined(self):
return False
def isSequence(self):
@@ -3178,7 +3178,7 @@ class IDLBuiltinType(IDLType):
'utf8string',
'jsstring',
'object',
- 'void',
+ 'undefined',
# Funny stuff
'ArrayBuffer',
'ArrayBufferView',
@@ -3215,7 +3215,7 @@ class IDLBuiltinType(IDLType):
Types.utf8string: IDLType.Tags.utf8string,
Types.jsstring: IDLType.Tags.jsstring,
Types.object: IDLType.Tags.object,
- Types.void: IDLType.Tags.void,
+ Types.undefined: IDLType.Tags.undefined,
Types.ArrayBuffer: IDLType.Tags.interface,
Types.ArrayBufferView: IDLType.Tags.interface,
Types.Int8Array: IDLType.Tags.interface,
@@ -3251,7 +3251,7 @@ class IDLBuiltinType(IDLType):
Types.utf8string: "USVString", # That's what it is in spec terms
Types.jsstring: "USVString", # Again, that's what it is in spec terms
Types.object: "object",
- Types.void: "void",
+ Types.undefined: "undefined",
Types.ArrayBuffer: "ArrayBuffer",
Types.ArrayBufferView: "ArrayBufferView",
Types.Int8Array: "Int8Array",
@@ -3456,8 +3456,8 @@ class IDLBuiltinType(IDLType):
return False
if self.isObject():
return other.isPrimitive() or other.isString() or other.isEnum()
- if self.isVoid():
- return not other.isVoid()
+ if self.isUndefined():
+ return not other.isUndefined()
# Not much else we could be!
assert self.isSpiderMonkeyInterface()
# Like interfaces, but we know we're not a callback
@@ -3591,9 +3591,9 @@ BuiltinTypes = {
IDLBuiltinType.Types.object:
IDLBuiltinType(BuiltinLocation("<builtin type>"), "Object",
IDLBuiltinType.Types.object),
- IDLBuiltinType.Types.void:
- IDLBuiltinType(BuiltinLocation("<builtin type>"), "Void",
- IDLBuiltinType.Types.void),
+ IDLBuiltinType.Types.undefined:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Undefined",
+ IDLBuiltinType.Types.undefined),
IDLBuiltinType.Types.ArrayBuffer:
IDLBuiltinType(BuiltinLocation("<builtin type>"), "ArrayBuffer",
IDLBuiltinType.Types.ArrayBuffer),
@@ -4196,9 +4196,9 @@ class IDLIterable(IDLMaplikeOrSetlikeOrIterableBase):
self.addMethod("values", members, False, self.iteratorType,
affectsNothing=True, newObject=True)
- # void forEach(callback(valueType, keyType), optional any thisArg)
+ # undefined forEach(callback(valueType, keyType), optional any thisArg)
self.addMethod("forEach", members, False,
- BuiltinTypes[IDLBuiltinType.Types.void],
+ BuiltinTypes[IDLBuiltinType.Types.undefined],
self.getForEachArguments())
def isValueIterator(self):
@@ -4256,8 +4256,8 @@ class IDLMaplikeOrSetlike(IDLMaplikeOrSetlikeOrIterableBase):
self.addMethod("values", members, False, BuiltinTypes[IDLBuiltinType.Types.object],
affectsNothing=True, isIteratorAlias=self.isSetlike())
- # void forEach(callback(valueType, keyType), thisVal)
- self.addMethod("forEach", members, False, BuiltinTypes[IDLBuiltinType.Types.void],
+ # undefined forEach(callback(valueType, keyType), thisVal)
+ self.addMethod("forEach", members, False, BuiltinTypes[IDLBuiltinType.Types.undefined],
self.getForEachArguments())
def getKeyArg():
@@ -4270,8 +4270,8 @@ class IDLMaplikeOrSetlike(IDLMaplikeOrSetlikeOrIterableBase):
[getKeyArg()], isPure=True)
if not self.readonly:
- # void clear()
- self.addMethod("clear", members, True, BuiltinTypes[IDLBuiltinType.Types.void],
+ # undefined clear()
+ self.addMethod("clear", members, True, BuiltinTypes[IDLBuiltinType.Types.undefined],
[])
# boolean delete(keyType key)
self.addMethod("delete", members, True,
@@ -4280,8 +4280,8 @@ class IDLMaplikeOrSetlike(IDLMaplikeOrSetlikeOrIterableBase):
# Always generate underscored functions (e.g. __add, __clear) for js
# implemented interfaces as convenience functions.
if isJSImplemented:
- # void clear()
- self.addMethod("clear", members, True, BuiltinTypes[IDLBuiltinType.Types.void],
+ # undefined clear()
+ self.addMethod("clear", members, True, BuiltinTypes[IDLBuiltinType.Types.undefined],
[], chromeOnly=True)
# boolean delete(keyType key)
self.addMethod("delete", members, True,
@@ -5119,7 +5119,7 @@ class IDLMethod(IDLInterfaceMember, IDLScope):
assert (arguments[0].type == BuiltinTypes[IDLBuiltinType.Types.domstring] or
arguments[0].type == BuiltinTypes[IDLBuiltinType.Types.unsigned_long])
assert not arguments[0].optional and not arguments[0].variadic
- assert not self._getter or not overload.returnType.isVoid()
+ assert not self._getter or not overload.returnType.isUndefined()
if self._setter:
assert len(self._overloads) == 1
@@ -5480,8 +5480,8 @@ class IDLMethod(IDLInterfaceMember, IDLScope):
# This is called before we've done overload resolution
overloads = self._overloads
assert len(overloads) == 1
- if not overloads[0].returnType.isVoid():
- raise WebIDLError("[LenientFloat] used on a non-void method",
+ if not overloads[0].returnType.isUndefined():
+ raise WebIDLError("[LenientFloat] used on a non-undefined returning method",
[attr.location, self.location])
if not overloads[0].includesRestrictedFloatArgument():
raise WebIDLError("[LenientFloat] used on an operation with no "
@@ -5837,7 +5837,7 @@ class Tokenizer(object):
"record": "RECORD",
"short": "SHORT",
"unsigned": "UNSIGNED",
- "void": "VOID",
+ "undefined": "UNDEFINED",
":": "COLON",
";": "SEMICOLON",
"{": "LBRACE",
@@ -6722,8 +6722,8 @@ class Parser(Tokenizer):
"optional" if arguments[0].optional else "variadic"),
[arguments[0].location])
if getter:
- if returnType.isVoid():
- raise WebIDLError("getter cannot have void return type",
+ if returnType.isUndefined():
+ raise WebIDLError("getter cannot have undefined return type",
[self.getLocation(p, 2)])
if setter:
if len(arguments) != 2:
@@ -7103,7 +7103,7 @@ class Parser(Tokenizer):
| SYMBOL
| TRUE
| UNSIGNED
- | VOID
+ | UNDEFINED
| ArgumentNameKeyword
"""
pass
@@ -7145,7 +7145,7 @@ class Parser(Tokenizer):
"""
p[0] = BuiltinTypes[IDLBuiltinType.Types.any]
- # Note: Promise<void> is allowed, so we want to parametrize on ReturnType,
+ # Note: Promise<undefined> is allowed, so we want to parametrize on ReturnType,
# not Type. Promise types can't be null, hence no "Null" in there.
def p_SingleTypePromiseType(self, p):
"""
@@ -7413,11 +7413,11 @@ class Parser(Tokenizer):
"""
p[0] = p[1]
- def p_ReturnTypeVoid(self, p):
+ def p_ReturnTypeUndefined(self, p):
"""
- ReturnType : VOID
+ ReturnType : UNDEFINED
"""
- p[0] = BuiltinTypes[IDLBuiltinType.Types.void]
+ p[0] = BuiltinTypes[IDLBuiltinType.Types.undefined]
def p_ScopedName(self, p):
"""
@@ -7564,7 +7564,7 @@ class Parser(Tokenizer):
def parse(self, t, filename=None):
self._filename = filename
- self.lexer.input(t.decode(encoding = 'utf-8'))
+ self.lexer.input(t)
# for tok in iter(self.lexer.token, None):
# print tok
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_argument_identifier_conflicts.py b/components/script/dom/bindings/codegen/parser/tests/test_argument_identifier_conflicts.py
index eb1f6d3c92e..9ae85531fa3 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_argument_identifier_conflicts.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_argument_identifier_conflicts.py
@@ -3,7 +3,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface ArgumentIdentifierConflict {
- void foo(boolean arg1, boolean arg1);
+ undefined foo(boolean arg1, boolean arg1);
};
""")
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_argument_keywords.py b/components/script/dom/bindings/codegen/parser/tests/test_argument_keywords.py
index e190f617e26..2b29658d678 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_argument_keywords.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_argument_keywords.py
@@ -1,7 +1,7 @@
def WebIDLTest(parser, harness):
parser.parse("""
interface Foo {
- void foo(object constructor);
+ undefined foo(object constructor);
};
""")
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_argument_novoid.py b/components/script/dom/bindings/codegen/parser/tests/test_argument_novoid.py
index ef8c2229aed..42e0776e677 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_argument_novoid.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_argument_novoid.py
@@ -2,8 +2,8 @@ def WebIDLTest(parser, harness):
threw = False
try:
parser.parse("""
- interface VoidArgument1 {
- void foo(void arg2);
+ interface UndefinedArgument1 {
+ undefined foo(undefined arg2);
};
""")
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_arraybuffer.py b/components/script/dom/bindings/codegen/parser/tests/test_arraybuffer.py
index 4a96c0ff512..7020db59f3e 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_arraybuffer.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_arraybuffer.py
@@ -4,37 +4,37 @@ def WebIDLTest(parser, harness):
parser.parse("""
interface TestArrayBuffer {
attribute ArrayBuffer bufferAttr;
- void bufferMethod(ArrayBuffer arg1, ArrayBuffer? arg2, sequence<ArrayBuffer> arg3);
+ undefined bufferMethod(ArrayBuffer arg1, ArrayBuffer? arg2, sequence<ArrayBuffer> arg3);
attribute ArrayBufferView viewAttr;
- void viewMethod(ArrayBufferView arg1, ArrayBufferView? arg2, sequence<ArrayBufferView> arg3);
+ undefined viewMethod(ArrayBufferView arg1, ArrayBufferView? arg2, sequence<ArrayBufferView> arg3);
attribute Int8Array int8ArrayAttr;
- void int8ArrayMethod(Int8Array arg1, Int8Array? arg2, sequence<Int8Array> arg3);
+ undefined int8ArrayMethod(Int8Array arg1, Int8Array? arg2, sequence<Int8Array> arg3);
attribute Uint8Array uint8ArrayAttr;
- void uint8ArrayMethod(Uint8Array arg1, Uint8Array? arg2, sequence<Uint8Array> arg3);
+ undefined uint8ArrayMethod(Uint8Array arg1, Uint8Array? arg2, sequence<Uint8Array> arg3);
attribute Uint8ClampedArray uint8ClampedArrayAttr;
- void uint8ClampedArrayMethod(Uint8ClampedArray arg1, Uint8ClampedArray? arg2, sequence<Uint8ClampedArray> arg3);
+ undefined uint8ClampedArrayMethod(Uint8ClampedArray arg1, Uint8ClampedArray? arg2, sequence<Uint8ClampedArray> arg3);
attribute Int16Array int16ArrayAttr;
- void int16ArrayMethod(Int16Array arg1, Int16Array? arg2, sequence<Int16Array> arg3);
+ undefined int16ArrayMethod(Int16Array arg1, Int16Array? arg2, sequence<Int16Array> arg3);
attribute Uint16Array uint16ArrayAttr;
- void uint16ArrayMethod(Uint16Array arg1, Uint16Array? arg2, sequence<Uint16Array> arg3);
+ undefined uint16ArrayMethod(Uint16Array arg1, Uint16Array? arg2, sequence<Uint16Array> arg3);
attribute Int32Array int32ArrayAttr;
- void int32ArrayMethod(Int32Array arg1, Int32Array? arg2, sequence<Int32Array> arg3);
+ undefined int32ArrayMethod(Int32Array arg1, Int32Array? arg2, sequence<Int32Array> arg3);
attribute Uint32Array uint32ArrayAttr;
- void uint32ArrayMethod(Uint32Array arg1, Uint32Array? arg2, sequence<Uint32Array> arg3);
+ undefined uint32ArrayMethod(Uint32Array arg1, Uint32Array? arg2, sequence<Uint32Array> arg3);
attribute Float32Array float32ArrayAttr;
- void float32ArrayMethod(Float32Array arg1, Float32Array? arg2, sequence<Float32Array> arg3);
+ undefined float32ArrayMethod(Float32Array arg1, Float32Array? arg2, sequence<Float32Array> arg3);
attribute Float64Array float64ArrayAttr;
- void float64ArrayMethod(Float64Array arg1, Float64Array? arg2, sequence<Float64Array> arg3);
+ undefined float64ArrayMethod(Float64Array arg1, Float64Array? arg2, sequence<Float64Array> arg3);
};
""")
@@ -55,7 +55,7 @@ def WebIDLTest(parser, harness):
harness.ok(attr.type.isSpiderMonkeyInterface(), "Should test as a js interface")
(retType, arguments) = method.signatures()[0]
- harness.ok(retType.isVoid(), "Should have a void return type")
+ harness.ok(retType.isUndefined(), "Should have a undefined return type")
harness.check(len(arguments), 3, "Expect 3 arguments")
harness.check(str(arguments[0].type), t, "Expect an ArrayBuffer type")
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_attributes_on_types.py b/components/script/dom/bindings/codegen/parser/tests/test_attributes_on_types.py
index ff08791d16f..9ba39018c77 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_attributes_on_types.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_attributes_on_types.py
@@ -20,16 +20,16 @@ def WebIDLTest(parser, harness):
attribute [EnforceRange] long foo;
attribute [Clamp] long bar;
attribute [TreatNullAs=EmptyString] DOMString baz;
- void method([EnforceRange] long foo, [Clamp] long bar,
+ undefined method([EnforceRange] long foo, [Clamp] long bar,
[TreatNullAs=EmptyString] DOMString baz);
- void method2(optional [EnforceRange] long foo, optional [Clamp] long bar,
+ undefined method2(optional [EnforceRange] long foo, optional [Clamp] long bar,
optional [TreatNullAs=EmptyString] DOMString baz);
};
interface C {
attribute [EnforceRange] long? foo;
attribute [Clamp] long? bar;
- void method([EnforceRange] long? foo, [Clamp] long? bar);
- void method2(optional [EnforceRange] long? foo, optional [Clamp] long? bar);
+ undefined method([EnforceRange] long? foo, [Clamp] long? bar);
+ undefined method2(optional [EnforceRange] long? foo, optional [Clamp] long? bar);
};
interface Setlike {
setlike<[Clamp] long>;
@@ -98,13 +98,13 @@ def WebIDLTest(parser, harness):
interface B {
attribute Foo typedefFoo;
attribute [AllowShared] ArrayBufferView foo;
- void method([AllowShared] ArrayBufferView foo);
- void method2(optional [AllowShared] ArrayBufferView foo);
+ undefined method([AllowShared] ArrayBufferView foo);
+ undefined method2(optional [AllowShared] ArrayBufferView foo);
};
interface C {
attribute [AllowShared] ArrayBufferView? foo;
- void method([AllowShared] ArrayBufferView? foo);
- void method2(optional [AllowShared] ArrayBufferView? foo);
+ undefined method([AllowShared] ArrayBufferView? foo);
+ undefined method2(optional [AllowShared] ArrayBufferView? foo);
};
interface Setlike {
setlike<[AllowShared] ArrayBufferView>;
@@ -154,7 +154,7 @@ def WebIDLTest(parser, harness):
"""),
("optional arguments", """
interface Foo {
- void foo(%s optional %s foo);
+ undefined foo(%s optional %s foo);
};
"""),
("typedefs", """
@@ -189,7 +189,7 @@ def WebIDLTest(parser, harness):
"""),
("partial interface","""
interface Foo {
- void foo();
+ undefined foo();
};
%s
partial interface Foo {
@@ -210,7 +210,7 @@ def WebIDLTest(parser, harness):
"""),
("partial namespace","""
namespace Foo {
- void foo();
+ undefined foo();
};
%s
partial namespace Foo {
@@ -387,7 +387,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface Foo {
- void foo([Clamp] Bar arg);
+ undefined foo([Clamp] Bar arg);
};
typedef long Bar;
""")
@@ -403,7 +403,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface Foo {
- void foo(Bar arg);
+ undefined foo(Bar arg);
};
typedef [Clamp] long Bar;
""")
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_bytestring.py b/components/script/dom/bindings/codegen/parser/tests/test_bytestring.py
index fa83e9e2d57..51289f5db6e 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_bytestring.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_bytestring.py
@@ -60,8 +60,8 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface OptionalByteString {
- void passByteString(optional ByteString arg = "hello");
- };
+ undefined passByteString(optional ByteString arg = "hello");
+ };
""")
results2 = parser.finish();
except WebIDL.WebIDLError as e:
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py b/components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py
index e4789dae168..34813bcab99 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py
@@ -48,31 +48,31 @@ def WebIDLTest(parser, harness):
parser = parser.reset()
parser.parse("""
callback interface TestCallbackInterface1 {
- void foo();
+ undefined foo();
};
callback interface TestCallbackInterface2 {
- void foo(DOMString arg);
- void foo(TestCallbackInterface1 arg);
+ undefined foo(DOMString arg);
+ undefined foo(TestCallbackInterface1 arg);
};
callback interface TestCallbackInterface3 {
- void foo(DOMString arg);
- void foo(TestCallbackInterface1 arg);
- static void bar();
+ undefined foo(DOMString arg);
+ undefined foo(TestCallbackInterface1 arg);
+ static undefined bar();
};
callback interface TestCallbackInterface4 {
- void foo(DOMString arg);
- void foo(TestCallbackInterface1 arg);
- static void bar();
+ undefined foo(DOMString arg);
+ undefined foo(TestCallbackInterface1 arg);
+ static undefined bar();
const long baz = 5;
};
callback interface TestCallbackInterface5 {
static attribute boolean bool;
- void foo();
+ undefined foo();
};
callback interface TestCallbackInterface6 {
- void foo(DOMString arg);
- void foo(TestCallbackInterface1 arg);
- void bar();
+ undefined foo(DOMString arg);
+ undefined foo(TestCallbackInterface1 arg);
+ undefined bar();
};
callback interface TestCallbackInterface7 {
static attribute boolean bool;
@@ -81,10 +81,10 @@ def WebIDLTest(parser, harness):
attribute boolean bool;
};
callback interface TestCallbackInterface9 : TestCallbackInterface1 {
- void foo();
+ undefined foo();
};
callback interface TestCallbackInterface10 : TestCallbackInterface1 {
- void bar();
+ undefined bar();
};
""")
results = parser.finish()
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_cereactions.py b/components/script/dom/bindings/codegen/parser/tests/test_cereactions.py
index f726907c2fc..ebc688bfd9c 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_cereactions.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_cereactions.py
@@ -3,7 +3,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface Foo {
- [CEReactions(DOMString a)] void foo(boolean arg2);
+ [CEReactions(DOMString a)] undefined foo(boolean arg2);
};
""")
@@ -47,7 +47,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface Foo {
- [CEReactions] void foo(boolean arg2);
+ [CEReactions] undefined foo(boolean arg2);
};
""")
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_dictionary.py b/components/script/dom/bindings/codegen/parser/tests/test_dictionary.py
index 3cad3022389..dcdc43d5c47 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_dictionary.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_dictionary.py
@@ -158,7 +158,7 @@ def WebIDLTest(parser, harness):
dictionary A {
};
interface X {
- void doFoo(A arg);
+ undefined doFoo(A arg);
};
""")
results = parser.finish()
@@ -174,7 +174,7 @@ def WebIDLTest(parser, harness):
dictionary A {
};
interface X {
- void doFoo(optional A arg);
+ undefined doFoo(optional A arg);
};
""")
results = parser.finish()
@@ -190,7 +190,7 @@ def WebIDLTest(parser, harness):
dictionary A {
};
interface X {
- void doFoo((A or DOMString) arg);
+ undefined doFoo((A or DOMString) arg);
};
""")
results = parser.finish()
@@ -207,7 +207,7 @@ def WebIDLTest(parser, harness):
dictionary A {
};
interface X {
- void doFoo(optional (A or DOMString) arg);
+ undefined doFoo(optional (A or DOMString) arg);
};
""")
results = parser.finish()
@@ -224,7 +224,7 @@ def WebIDLTest(parser, harness):
dictionary A {
};
interface X {
- void doFoo(A arg1, optional long arg2);
+ undefined doFoo(A arg1, optional long arg2);
};
""")
results = parser.finish()
@@ -240,7 +240,7 @@ def WebIDLTest(parser, harness):
dictionary A {
};
interface X {
- void doFoo(optional A arg1, optional long arg2);
+ undefined doFoo(optional A arg1, optional long arg2);
};
""")
results = parser.finish()
@@ -256,7 +256,7 @@ def WebIDLTest(parser, harness):
dictionary A {
};
interface X {
- void doFoo(A arg1, optional long arg2, long arg3);
+ undefined doFoo(A arg1, optional long arg2, long arg3);
};
""")
results = parser.finish()
@@ -273,7 +273,7 @@ def WebIDLTest(parser, harness):
dictionary A {
};
interface X {
- void doFoo((A or DOMString) arg1, optional long arg2);
+ undefined doFoo((A or DOMString) arg1, optional long arg2);
};
""")
results = parser.finish()
@@ -291,7 +291,7 @@ def WebIDLTest(parser, harness):
dictionary A {
};
interface X {
- void doFoo(optional (A or DOMString) arg1, optional long arg2);
+ undefined doFoo(optional (A or DOMString) arg1, optional long arg2);
};
""")
results = parser.finish()
@@ -307,7 +307,7 @@ def WebIDLTest(parser, harness):
dictionary A {
};
interface X {
- void doFoo(A arg1, long arg2);
+ undefined doFoo(A arg1, long arg2);
};
""")
results = parser.finish()
@@ -320,7 +320,7 @@ def WebIDLTest(parser, harness):
dictionary A {
};
interface X {
- void doFoo(optional A? arg1 = {});
+ undefined doFoo(optional A? arg1 = {});
};
""")
results = parser.finish()
@@ -339,7 +339,7 @@ def WebIDLTest(parser, harness):
required long x;
};
interface X {
- void doFoo(A? arg1);
+ undefined doFoo(A? arg1);
};
""")
results = parser.finish()
@@ -358,7 +358,7 @@ def WebIDLTest(parser, harness):
dictionary A {
};
interface X {
- void doFoo(optional (A or long)? arg1 = {});
+ undefined doFoo(optional (A or long)? arg1 = {});
};
""")
results = parser.finish()
@@ -378,7 +378,7 @@ def WebIDLTest(parser, harness):
required long x;
};
interface X {
- void doFoo((A or long)? arg1);
+ undefined doFoo((A or long)? arg1);
};
""")
results = parser.finish()
@@ -397,7 +397,7 @@ def WebIDLTest(parser, harness):
dictionary A {
};
interface X {
- void doFoo(sequence<A?> arg1);
+ undefined doFoo(sequence<A?> arg1);
};
""")
results = parser.finish()
@@ -414,7 +414,7 @@ def WebIDLTest(parser, harness):
dictionary A {
};
interface X {
- void doFoo(optional (A or long?) arg1);
+ undefined doFoo(optional (A or long?) arg1);
};
""")
results = parser.finish()
@@ -430,7 +430,7 @@ def WebIDLTest(parser, harness):
dictionary A {
};
interface X {
- void doFoo(optional (long? or A) arg1);
+ undefined doFoo(optional (long? or A) arg1);
};
""")
results = parser.finish()
@@ -455,7 +455,7 @@ def WebIDLTest(parser, harness):
dictionary A {
};
interface X {
- void doFoo(optional A arg = {});
+ undefined doFoo(optional A arg = {});
};
""")
results = parser.finish()
@@ -466,7 +466,7 @@ def WebIDLTest(parser, harness):
dictionary A {
};
interface X {
- void doFoo(optional (A or DOMString) arg = {});
+ undefined doFoo(optional (A or DOMString) arg = {});
};
""")
results = parser.finish()
@@ -477,7 +477,7 @@ def WebIDLTest(parser, harness):
dictionary A {
};
interface X {
- void doFoo(optional (A or DOMString) arg = "abc");
+ undefined doFoo(optional (A or DOMString) arg = "abc");
};
""")
results = parser.finish()
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py b/components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py
index 505b36468d6..1fa12832d7f 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py
@@ -12,10 +12,10 @@ def WebIDLTest(parser, harness):
};
interface Bar {
// Bit of a pain to get things that have dictionary types
- void passDict(Dict arg);
- void passFoo(Foo arg);
- void passNullableUnion((object? or DOMString) arg);
- void passNullable(Foo? arg);
+ undefined passDict(Dict arg);
+ undefined passFoo(Foo arg);
+ undefined passNullableUnion((object? or DOMString) arg);
+ undefined passNullable(Foo? arg);
};
""")
results = parser.finish()
@@ -56,13 +56,13 @@ def WebIDLTest(parser, harness):
parser = parser.reset()
parser.parse("""
interface TestIface {
- void passKid(Kid arg);
- void passParent(Parent arg);
- void passGrandparent(Grandparent arg);
- void passUnrelated1(Unrelated1 arg);
- void passUnrelated2(Unrelated2 arg);
- void passArrayBuffer(ArrayBuffer arg);
- void passArrayBuffer(ArrayBufferView arg);
+ undefined passKid(Kid arg);
+ undefined passParent(Parent arg);
+ undefined passGrandparent(Grandparent arg);
+ undefined passUnrelated1(Unrelated1 arg);
+ undefined passUnrelated2(Unrelated2 arg);
+ undefined passArrayBuffer(ArrayBuffer arg);
+ undefined passArrayBuffer(ArrayBufferView arg);
};
interface Kid : Parent {};
@@ -97,10 +97,10 @@ def WebIDLTest(parser, harness):
parser.parse("""
interface Dummy {};
interface TestIface {
- void method(long arg1, TestIface arg2);
- void method(long arg1, long arg2);
- void method(long arg1, Dummy arg2);
- void method(DOMString arg1, DOMString arg2, DOMString arg3);
+ undefined method(long arg1, TestIface arg2);
+ undefined method(long arg1, long arg2);
+ undefined method(long arg1, Dummy arg2);
+ undefined method(DOMString arg1, DOMString arg2, DOMString arg3);
};
""")
results = parser.finish()
@@ -115,10 +115,10 @@ def WebIDLTest(parser, harness):
parser.parse("""
interface Dummy {};
interface TestIface {
- void method(long arg1, TestIface arg2);
- void method(long arg1, long arg2);
- void method(any arg1, Dummy arg2);
- void method(DOMString arg1, DOMString arg2, DOMString arg3);
+ undefined method(long arg1, TestIface arg2);
+ undefined method(long arg1, long arg2);
+ undefined method(any arg1, Dummy arg2);
+ undefined method(DOMString arg1, DOMString arg2, DOMString arg3);
};
""")
results = parser.finish()
@@ -135,10 +135,10 @@ def WebIDLTest(parser, harness):
parser.parse("""
interface Dummy {};
interface TestIface {
- void method(long arg1, TestIface arg2);
- void method(long arg1, long arg2);
- void method(any arg1, DOMString arg2);
- void method(DOMString arg1, DOMString arg2, DOMString arg3);
+ undefined method(long arg1, TestIface arg2);
+ undefined method(long arg1, long arg2);
+ undefined method(any arg1, DOMString arg2);
+ undefined method(DOMString arg1, DOMString arg2, DOMString arg3);
};
""")
results = parser.finish()
@@ -272,7 +272,7 @@ def WebIDLTest(parser, harness):
};
"""
methodTemplate = """
- void myMethod(%s arg);"""
+ undefined myMethod(%s arg);"""
methods = (methodTemplate % type1) + (methodTemplate % type2)
idl = idlTemplate % methods
parser = parser.reset()
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_empty_sequence_default_value.py b/components/script/dom/bindings/codegen/parser/tests/test_empty_sequence_default_value.py
index a713266c88e..5f04c6ae751 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_empty_sequence_default_value.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_empty_sequence_default_value.py
@@ -19,7 +19,7 @@ def WebIDLTest(parser, harness):
parser.parse("""
interface X {
- void foo(optional sequence<long> arg = []);
+ undefined foo(optional sequence<long> arg = []);
};
""")
results = parser.finish();
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_enum.py b/components/script/dom/bindings/codegen/parser/tests/test_enum.py
index 86228939181..c5617ead99a 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_enum.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_enum.py
@@ -71,7 +71,7 @@ def WebIDLTest(parser, harness):
"c"
};
interface TestInterface {
- void foo(optional Enum e = "d");
+ undefined foo(optional Enum e = "d");
};
""")
results = parser.finish()
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_exposed_extended_attribute.py b/components/script/dom/bindings/codegen/parser/tests/test_exposed_extended_attribute.py
index e0241a56426..39993eaeae5 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_exposed_extended_attribute.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_exposed_extended_attribute.py
@@ -8,7 +8,7 @@ def WebIDLTest(parser, harness):
[Exposed=(Foo,Bar1)]
interface Iface {
- void method1();
+ undefined method1();
[Exposed=Bar1]
readonly attribute any attr;
@@ -16,7 +16,7 @@ def WebIDLTest(parser, harness):
[Exposed=Foo]
partial interface Iface {
- void method2();
+ undefined method2();
};
""")
@@ -57,7 +57,7 @@ def WebIDLTest(parser, harness):
[Exposed=Foo]
interface Iface2 {
- void method3();
+ undefined method3();
};
""")
results = parser.finish()
@@ -87,12 +87,12 @@ def WebIDLTest(parser, harness):
[Exposed=Foo]
interface Iface3 {
- void method4();
+ undefined method4();
};
[Exposed=(Foo,Bar1)]
interface mixin Mixin {
- void method5();
+ undefined method5();
};
Iface3 includes Mixin;
@@ -152,7 +152,7 @@ def WebIDLTest(parser, harness):
parser.parse("""
interface Bar {
[Exposed=Foo]
- void operation();
+ undefined operation();
};
""")
@@ -188,7 +188,7 @@ def WebIDLTest(parser, harness):
[Exposed=Foo]
interface Baz {
[Exposed=Bar]
- void method();
+ undefined method();
};
""")
@@ -205,12 +205,12 @@ def WebIDLTest(parser, harness):
[Exposed=Foo]
interface Baz {
- void method();
+ undefined method();
};
[Exposed=Bar]
interface mixin Mixin {
- void otherMethod();
+ undefined otherMethod();
};
Baz includes Mixin;
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_extended_attributes.py b/components/script/dom/bindings/codegen/parser/tests/test_extended_attributes.py
index 144c945bc10..66909f322c2 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_extended_attributes.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_extended_attributes.py
@@ -48,8 +48,8 @@ def WebIDLTest(parser, harness):
parser = parser.reset()
parser.parse("""
interface TestClamp {
- void testClamp([Clamp] long foo);
- void testNotClamp(long foo);
+ undefined testClamp([Clamp] long foo);
+ undefined testNotClamp(long foo);
};
""")
@@ -66,7 +66,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface TestClamp2 {
- void testClamp([Clamp=something] long foo);
+ undefined testClamp([Clamp=something] long foo);
};
""")
results = parser.finish()
@@ -78,8 +78,8 @@ def WebIDLTest(parser, harness):
parser = parser.reset()
parser.parse("""
interface TestEnforceRange {
- void testEnforceRange([EnforceRange] long foo);
- void testNotEnforceRange(long foo);
+ undefined testEnforceRange([EnforceRange] long foo);
+ undefined testNotEnforceRange(long foo);
};
""")
@@ -96,7 +96,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface TestEnforceRange2 {
- void testEnforceRange([EnforceRange=something] long foo);
+ undefined testEnforceRange([EnforceRange=something] long foo);
};
""")
results = parser.finish()
@@ -104,4 +104,4 @@ def WebIDLTest(parser, harness):
threw = True
harness.ok(threw, "[EnforceRange] must take no arguments")
-
+
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_float_types.py b/components/script/dom/bindings/codegen/parser/tests/test_float_types.py
index b7325cf9d26..8fbe9394042 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_float_types.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_float_types.py
@@ -14,23 +14,23 @@ def WebIDLTest(parser, harness):
[LenientFloat]
attribute double ld;
- void m1(float arg1, double arg2, float? arg3, double? arg4,
+ undefined m1(float arg1, double arg2, float? arg3, double? arg4,
myFloat arg5, unrestricted float arg6,
unrestricted double arg7, unrestricted float? arg8,
unrestricted double? arg9, myUnrestrictedFloat arg10);
[LenientFloat]
- void m2(float arg1, double arg2, float? arg3, double? arg4,
+ undefined m2(float arg1, double arg2, float? arg3, double? arg4,
myFloat arg5, unrestricted float arg6,
unrestricted double arg7, unrestricted float? arg8,
unrestricted double? arg9, myUnrestrictedFloat arg10);
[LenientFloat]
- void m3(float arg);
+ undefined m3(float arg);
[LenientFloat]
- void m4(double arg);
+ undefined m4(double arg);
[LenientFloat]
- void m5((float or FloatTypes) arg);
+ undefined m5((float or FloatTypes) arg);
[LenientFloat]
- void m6(sequence<float> arg);
+ undefined m6(sequence<float> arg);
};
""")
@@ -70,7 +70,7 @@ def WebIDLTest(parser, harness):
""")
except Exception as x:
threw = True
- harness.ok(threw, "[LenientFloat] only allowed on void methods")
+ harness.ok(threw, "[LenientFloat] only allowed on undefined-retuning methods")
parser = parser.reset()
threw = False
@@ -78,7 +78,7 @@ def WebIDLTest(parser, harness):
parser.parse("""
interface FloatTypes {
[LenientFloat]
- void m(unrestricted float arg);
+ undefined m(unrestricted float arg);
};
""")
except Exception as x:
@@ -91,7 +91,7 @@ def WebIDLTest(parser, harness):
parser.parse("""
interface FloatTypes {
[LenientFloat]
- void m(sequence<unrestricted float> arg);
+ undefined m(sequence<unrestricted float> arg);
};
""")
except Exception as x:
@@ -104,7 +104,7 @@ def WebIDLTest(parser, harness):
parser.parse("""
interface FloatTypes {
[LenientFloat]
- void m((unrestricted float or FloatTypes) arg);
+ undefined m((unrestricted float or FloatTypes) arg);
};
""")
except Exception as x:
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_global_extended_attr.py b/components/script/dom/bindings/codegen/parser/tests/test_global_extended_attr.py
index 28b79642d86..3958f8ce104 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_global_extended_attr.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_global_extended_attr.py
@@ -22,7 +22,7 @@ def WebIDLTest(parser, harness):
[Global, Exposed=Foo]
interface Foo {
getter any(DOMString name);
- setter void(DOMString name, any arg);
+ setter undefined(DOMString name, any arg);
};
""")
results = parser.finish()
@@ -40,7 +40,7 @@ def WebIDLTest(parser, harness):
[Global, Exposed=Foo]
interface Foo {
getter any(DOMString name);
- deleter void(DOMString name);
+ deleter undefined(DOMString name);
};
""")
results = parser.finish()
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_incomplete_parent.py b/components/script/dom/bindings/codegen/parser/tests/test_incomplete_parent.py
index 1f520a28e16..8f30c212d7b 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_incomplete_parent.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_incomplete_parent.py
@@ -3,7 +3,7 @@ import WebIDL
def WebIDLTest(parser, harness):
parser.parse("""
interface TestIncompleteParent : NotYetDefined {
- void foo();
+ undefined foo();
};
interface NotYetDefined : EvenHigherOnTheChain {
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_interface.py b/components/script/dom/bindings/codegen/parser/tests/test_interface.py
index 47db3ae4cc9..a10bcd9863d 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_interface.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_interface.py
@@ -32,7 +32,7 @@ def WebIDLTest(parser, harness):
interface QNameDerived : QNameBase {
attribute long long foo;
- attribute byte bar;
+ attribute byte bar;
};
""")
results = parser.finish()
@@ -99,11 +99,11 @@ def WebIDLTest(parser, harness):
constructor();
constructor(long arg);
readonly attribute boolean x;
- void foo();
+ undefined foo();
};
partial interface A {
readonly attribute boolean y;
- void foo(long arg);
+ undefined foo(long arg);
};
""");
results = parser.finish();
@@ -127,13 +127,13 @@ def WebIDLTest(parser, harness):
parser.parse("""
partial interface A {
readonly attribute boolean y;
- void foo(long arg);
+ undefined foo(long arg);
};
interface A {
constructor();
constructor(long arg);
readonly attribute boolean x;
- void foo();
+ undefined foo();
};
""");
results = parser.finish();
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_interface_maplikesetlikeiterable.py b/components/script/dom/bindings/codegen/parser/tests/test_interface_maplikesetlikeiterable.py
index e070adee7e6..835212d2965 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_interface_maplikesetlikeiterable.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_interface_maplikesetlikeiterable.py
@@ -358,7 +358,7 @@ def WebIDLTest(parser, harness):
interface Foo1 {
%s;
[Throws]
- void %s(long test1, double test2, double test3);
+ undefined %s(long test1, double test2, double test3);
};
""" % (likeMember, conflictName), expectedMembers)
else:
@@ -367,14 +367,14 @@ def WebIDLTest(parser, harness):
interface Foo1 {
%s;
[Throws]
- void %s(long test1, double test2, double test3);
+ undefined %s(long test1, double test2, double test3);
};
""" % (likeMember, conflictName))
# Inherited conflicting methods should ALWAYS fail
shouldFail("Conflicting inherited method: %s and %s" % (likeMember, conflictName),
"""
interface Foo1 {
- void %s(long test1, double test2, double test3);
+ undefined %s(long test1, double test2, double test3);
};
interface Foo2 : Foo1 {
%s;
@@ -384,7 +384,7 @@ def WebIDLTest(parser, harness):
"""
interface Foo1 {
%s;
- static void %s(long test1, double test2, double test3);
+ static undefined %s(long test1, double test2, double test3);
};
""" % (likeMember, conflictName))
shouldFail("Conflicting attribute: %s and %s" % (likeMember, conflictName),
@@ -426,7 +426,7 @@ def WebIDLTest(parser, harness):
maplike<long, long>;
};
interface Foo2 : Foo1 {
- void entries();
+ undefined entries();
};
""", mapRWMembers, numProductions=2)
@@ -438,7 +438,7 @@ def WebIDLTest(parser, harness):
interface Foo2 : Foo1 {
};
interface Foo3 : Foo2 {
- void entries();
+ undefined entries();
};
""", mapRWMembers, numProductions=3)
@@ -448,7 +448,7 @@ def WebIDLTest(parser, harness):
maplike<long, long>;
};
interface mixin Foo2 {
- void entries();
+ undefined entries();
};
Foo1 includes Foo2;
""")
@@ -459,7 +459,7 @@ def WebIDLTest(parser, harness):
maplike<long, long>;
};
interface mixin Foo2 {
- void entries();
+ undefined entries();
};
interface Foo3 : Foo1 {
};
@@ -469,7 +469,7 @@ def WebIDLTest(parser, harness):
shouldFail("Inheritance of name collision with child maplike/setlike",
"""
interface Foo1 {
- void entries();
+ undefined entries();
};
interface Foo2 : Foo1 {
maplike<long, long>;
@@ -479,7 +479,7 @@ def WebIDLTest(parser, harness):
shouldFail("Inheritance of multi-level name collision with child maplike/setlike",
"""
interface Foo1 {
- void entries();
+ undefined entries();
};
interface Foo2 : Foo1 {
};
@@ -558,7 +558,7 @@ def WebIDLTest(parser, harness):
maplike<long, long>;
};
interface Foo2 : Foo1 {
- void clear();
+ undefined clear();
};
""", mapRWMembers, numProductions=2)
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_interfacemixin.py b/components/script/dom/bindings/codegen/parser/tests/test_interfacemixin.py
index 477a9f37799..79cf1f6780d 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_interfacemixin.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_interfacemixin.py
@@ -30,11 +30,11 @@ def WebIDLTest(parser, harness):
parser.parse("""
interface mixin A {
readonly attribute boolean x;
- void foo();
+ undefined foo();
};
partial interface mixin A {
readonly attribute boolean y;
- void foo(long arg);
+ undefined foo(long arg);
};
""")
results = parser.finish()
@@ -56,11 +56,11 @@ def WebIDLTest(parser, harness):
parser.parse("""
partial interface mixin A {
readonly attribute boolean y;
- void foo(long arg);
+ undefined foo(long arg);
};
interface mixin A {
readonly attribute boolean x;
- void foo();
+ undefined foo();
};
""")
results = parser.finish()
@@ -212,7 +212,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface mixin A {
- setter void (DOMString propertyName, double propertyValue);
+ setter undefined (DOMString propertyName, double propertyValue);
};
""")
results = parser.finish()
@@ -226,7 +226,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface mixin A {
- deleter void (DOMString propertyName);
+ deleter undefined (DOMString propertyName);
};
""")
results = parser.finish()
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_method.py b/components/script/dom/bindings/codegen/parser/tests/test_method.py
index 88ee874386c..ff1f087c861 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_method.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_method.py
@@ -3,17 +3,17 @@ import WebIDL
def WebIDLTest(parser, harness):
parser.parse("""
interface TestMethods {
- void basic();
- static void basicStatic();
- void basicWithSimpleArgs(boolean arg1, byte arg2, unsigned long arg3);
+ undefined basic();
+ static undefined basicStatic();
+ undefined basicWithSimpleArgs(boolean arg1, byte arg2, unsigned long arg3);
boolean basicBoolean();
static boolean basicStaticBoolean();
boolean basicBooleanWithSimpleArgs(boolean arg1, byte arg2, unsigned long arg3);
- void optionalArg(optional byte? arg1, optional sequence<byte> arg2);
- void variadicArg(byte?... arg1);
+ undefined optionalArg(optional byte? arg1, optional sequence<byte> arg2);
+ undefined variadicArg(byte?... arg1);
object getObject();
- void setObject(object arg1);
- void setAny(any arg1);
+ undefined setObject(object arg1);
+ undefined setAny(any arg1);
float doFloats(float arg1);
};
""")
@@ -70,12 +70,12 @@ def WebIDLTest(parser, harness):
(QName, name, type, optional, variadic) = expectedArgs[i]
checkArgument(gotArgs[i], QName, name, type, optional, variadic)
- checkMethod(methods[0], "::TestMethods::basic", "basic", [("Void", [])])
+ checkMethod(methods[0], "::TestMethods::basic", "basic", [("Undefined", [])])
checkMethod(methods[1], "::TestMethods::basicStatic", "basicStatic",
- [("Void", [])], static=True)
+ [("Undefined", [])], static=True)
checkMethod(methods[2], "::TestMethods::basicWithSimpleArgs",
"basicWithSimpleArgs",
- [("Void",
+ [("Undefined",
[("::TestMethods::basicWithSimpleArgs::arg1", "arg1", "Boolean", False, False),
("::TestMethods::basicWithSimpleArgs::arg2", "arg2", "Byte", False, False),
("::TestMethods::basicWithSimpleArgs::arg3", "arg3", "UnsignedLong", False, False)])])
@@ -89,22 +89,22 @@ def WebIDLTest(parser, harness):
("::TestMethods::basicBooleanWithSimpleArgs::arg3", "arg3", "UnsignedLong", False, False)])])
checkMethod(methods[6], "::TestMethods::optionalArg",
"optionalArg",
- [("Void",
+ [("Undefined",
[("::TestMethods::optionalArg::arg1", "arg1", "ByteOrNull", True, False),
("::TestMethods::optionalArg::arg2", "arg2", "ByteSequence", True, False)])])
checkMethod(methods[7], "::TestMethods::variadicArg",
"variadicArg",
- [("Void",
+ [("Undefined",
[("::TestMethods::variadicArg::arg1", "arg1", "ByteOrNull", True, True)])])
checkMethod(methods[8], "::TestMethods::getObject",
"getObject", [("Object", [])])
checkMethod(methods[9], "::TestMethods::setObject",
"setObject",
- [("Void",
+ [("Undefined",
[("::TestMethods::setObject::arg1", "arg1", "Object", False, False)])])
checkMethod(methods[10], "::TestMethods::setAny",
"setAny",
- [("Void",
+ [("Undefined",
[("::TestMethods::setAny::arg1", "arg1", "Any", False, False)])])
checkMethod(methods[11], "::TestMethods::doFloats",
"doFloats",
@@ -116,7 +116,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface A {
- void foo(optional float bar = 1);
+ undefined foo(optional float bar = 1);
};
""")
results = parser.finish()
@@ -129,7 +129,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface A {
- [GetterThrows] void foo();
+ [GetterThrows] undefined foo();
};
""")
results = parser.finish()
@@ -142,7 +142,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface A {
- [SetterThrows] void foo();
+ [SetterThrows] undefined foo();
};
""")
results = parser.finish()
@@ -155,7 +155,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface A {
- [Throw] void foo();
+ [Throw] undefined foo();
};
""")
results = parser.finish()
@@ -168,7 +168,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface A {
- void __noSuchMethod__();
+ undefined __noSuchMethod__();
};
""")
results = parser.finish()
@@ -182,9 +182,9 @@ def WebIDLTest(parser, harness):
parser.parse("""
interface A {
[Throws, LenientFloat]
- void foo(float myFloat);
+ undefined foo(float myFloat);
[Throws]
- void foo();
+ undefined foo();
};
""")
results = parser.finish()
@@ -196,9 +196,9 @@ def WebIDLTest(parser, harness):
parser.parse("""
interface A {
[Throws]
- void foo();
+ undefined foo();
[Throws, LenientFloat]
- void foo(float myFloat);
+ undefined foo(float myFloat);
};
""")
results = parser.finish()
@@ -213,9 +213,9 @@ def WebIDLTest(parser, harness):
parser.parse("""
interface A {
[Throws, LenientFloat]
- void foo(float myFloat);
+ undefined foo(float myFloat);
[Throws]
- void foo(float myFloat, float yourFloat);
+ undefined foo(float myFloat, float yourFloat);
};
""")
results = parser.finish()
@@ -229,9 +229,9 @@ def WebIDLTest(parser, harness):
parser.parse("""
interface A {
[Throws]
- void foo(float myFloat, float yourFloat);
+ undefined foo(float myFloat, float yourFloat);
[Throws, LenientFloat]
- void foo(float myFloat);
+ undefined foo(float myFloat);
};
""")
results = parser.finish()
@@ -245,9 +245,9 @@ def WebIDLTest(parser, harness):
parser.parse("""
interface A {
[Throws, LenientFloat]
- void foo(float myFloat);
+ undefined foo(float myFloat);
[Throws, LenientFloat]
- void foo(short myShort);
+ undefined foo(short myShort);
};
""")
results = parser.finish()
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_nullable_void.py b/components/script/dom/bindings/codegen/parser/tests/test_nullable_void.py
index 961ff825e9f..ebf841a5205 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_nullable_void.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_nullable_void.py
@@ -2,8 +2,8 @@ def WebIDLTest(parser, harness):
threw = False
try:
parser.parse("""
- interface NullableVoid {
- void? foo();
+ interface NullableUndefined {
+ undefined? foo();
};
""")
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_optional_constraints.py b/components/script/dom/bindings/codegen/parser/tests/test_optional_constraints.py
index 6217465ce7d..ad012b633d5 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_optional_constraints.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_optional_constraints.py
@@ -3,7 +3,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface OptionalConstraints1 {
- void foo(optional byte arg1, byte arg2);
+ undefined foo(optional byte arg1, byte arg2);
};
""")
@@ -18,7 +18,7 @@ def WebIDLTest(parser, harness):
parser = parser.reset()
parser.parse("""
interface OptionalConstraints2 {
- void foo(optional byte arg1 = 1, optional byte arg2 = 2,
+ undefined foo(optional byte arg1 = 1, optional byte arg2 = 2,
optional byte arg3, optional byte arg4 = 4,
optional byte arg5, optional byte arg6 = 9);
};
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_overload.py b/components/script/dom/bindings/codegen/parser/tests/test_overload.py
index 3c680ad5233..8e02f64d6c9 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_overload.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_overload.py
@@ -3,16 +3,16 @@ import WebIDL
def WebIDLTest(parser, harness):
parser.parse("""
interface TestOverloads {
- void basic();
- void basic(long arg1);
+ undefined basic();
+ undefined basic(long arg1);
boolean abitharder(TestOverloads foo);
boolean abitharder(boolean foo);
- void abitharder(ArrayBuffer? foo);
- void withVariadics(long... numbers);
- void withVariadics(TestOverloads iface);
- void withVariadics(long num, TestOverloads iface);
- void optionalTest();
- void optionalTest(optional long num1, long num2);
+ undefined abitharder(ArrayBuffer? foo);
+ undefined withVariadics(long... numbers);
+ undefined withVariadics(TestOverloads iface);
+ undefined withVariadics(long num, TestOverloads iface);
+ undefined optionalTest();
+ undefined optionalTest(optional long num1, long num2);
};
""")
@@ -37,11 +37,11 @@ def WebIDLTest(parser, harness):
(retval, argumentSet) = signatures[0]
- harness.check(str(retval), "Void", "Expect a void retval")
+ harness.check(str(retval), "Undefined", "Expect a undefined retval")
harness.check(len(argumentSet), 0, "Expect an empty argument set")
(retval, argumentSet) = signatures[1]
- harness.check(str(retval), "Void", "Expect a void retval")
+ harness.check(str(retval), "Undefined", "Expect a undefined retval")
harness.check(len(argumentSet), 1, "Expect an argument set with one argument")
argument = argumentSet[0]
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_promise.py b/components/script/dom/bindings/codegen/parser/tests/test_promise.py
index 43c74029dc5..ef44a216d10 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_promise.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_promise.py
@@ -64,7 +64,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface A {
- void foo(Promise<any>? arg);
+ undefined foo(Promise<any>? arg);
};
""")
results = parser.finish();
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_record.py b/components/script/dom/bindings/codegen/parser/tests/test_record.py
index d50572caf07..3d83e249be8 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_record.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_record.py
@@ -4,7 +4,7 @@ def WebIDLTest(parser, harness):
parser.parse("""
dictionary Dict {};
interface RecordArg {
- void foo(record<DOMString, Dict> arg);
+ undefined foo(record<DOMString, Dict> arg);
};
""")
@@ -27,16 +27,16 @@ def WebIDLTest(parser, harness):
threw = False
try:
parser.parse("""
- interface RecordVoidArg {
- void foo(record<DOMString, void> arg);
+ interface RecordUndefinedArg {
+ undefined foo(record<DOMString, undefined> arg);
};
""")
results = parser.finish()
except Exception as x:
threw = True
- harness.ok(threw, "Should have thrown because record can't have void as value type.")
-
+ harness.ok(threw, "Should have thrown because record can't have undefined as value type.")
+
parser = parser.reset()
threw = False
try:
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_securecontext_extended_attribute.py b/components/script/dom/bindings/codegen/parser/tests/test_securecontext_extended_attribute.py
index 442dba45d76..5af0c22803c 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_securecontext_extended_attribute.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_securecontext_extended_attribute.py
@@ -6,12 +6,12 @@ def WebIDLTest(parser, harness):
interface TestSecureContextOnInterface {
const octet TEST_CONSTANT = 0;
readonly attribute byte testAttribute;
- void testMethod(byte foo);
+ undefined testMethod(byte foo);
};
partial interface TestSecureContextOnInterface {
const octet TEST_CONSTANT_2 = 0;
readonly attribute byte testAttribute2;
- void testMethod2(byte foo);
+ undefined testMethod2(byte foo);
};
""")
results = parser.finish()
@@ -37,13 +37,13 @@ def WebIDLTest(parser, harness):
partial interface TestSecureContextOnInterfaceAfterPartialInterface {
const octet TEST_CONSTANT_2 = 0;
readonly attribute byte testAttribute2;
- void testMethod2(byte foo);
+ undefined testMethod2(byte foo);
};
[SecureContext]
interface TestSecureContextOnInterfaceAfterPartialInterface {
const octet TEST_CONSTANT = 0;
readonly attribute byte testAttribute;
- void testMethod(byte foo);
+ undefined testMethod(byte foo);
};
""")
results = parser.finish()
@@ -68,13 +68,13 @@ def WebIDLTest(parser, harness):
interface TestSecureContextOnPartialInterface {
const octet TEST_CONSTANT = 0;
readonly attribute byte testAttribute;
- void testMethod(byte foo);
+ undefined testMethod(byte foo);
};
[SecureContext]
partial interface TestSecureContextOnPartialInterface {
const octet TEST_CONSTANT_2 = 0;
readonly attribute byte testAttribute2;
- void testMethod2(byte foo);
+ undefined testMethod2(byte foo);
};
""")
results = parser.finish()
@@ -105,10 +105,10 @@ def WebIDLTest(parser, harness):
[SecureContext]
readonly attribute byte testSecureAttribute;
readonly attribute byte testNonSecureAttribute2;
- void testNonSecureMethod1(byte foo);
+ undefined testNonSecureMethod1(byte foo);
[SecureContext]
- void testSecureMethod(byte foo);
- void testNonSecureMethod2(byte foo);
+ undefined testSecureMethod(byte foo);
+ undefined testNonSecureMethod2(byte foo);
};
""")
results = parser.finish()
@@ -147,10 +147,10 @@ def WebIDLTest(parser, harness):
[SecureContext]
readonly attribute byte testSecureAttribute;
readonly attribute byte testNonSecureAttribute2;
- void testNonSecureMethod1(byte foo);
+ undefined testNonSecureMethod1(byte foo);
[SecureContext]
- void testSecureMethod(byte foo);
- void testNonSecureMethod2(byte foo);
+ undefined testSecureMethod(byte foo);
+ undefined testNonSecureMethod2(byte foo);
};
""")
results = parser.finish()
@@ -194,10 +194,10 @@ def WebIDLTest(parser, harness):
parser.parse("""
interface TestSecureContextForOverloads1 {
[SecureContext]
- void testSecureMethod(byte foo);
+ undefined testSecureMethod(byte foo);
};
partial interface TestSecureContextForOverloads1 {
- void testSecureMethod(byte foo, byte bar);
+ undefined testSecureMethod(byte foo, byte bar);
};
""")
results = parser.finish()
@@ -211,11 +211,11 @@ def WebIDLTest(parser, harness):
parser.parse("""
interface TestSecureContextForOverloads2 {
[SecureContext]
- void testSecureMethod(byte foo);
+ undefined testSecureMethod(byte foo);
};
partial interface TestSecureContextForOverloads2 {
[SecureContext]
- void testSecureMethod(byte foo, byte bar);
+ undefined testSecureMethod(byte foo, byte bar);
};
""")
results = parser.finish()
@@ -230,7 +230,7 @@ def WebIDLTest(parser, harness):
[SecureContext]
interface TestSecureContextOnInterfaceAndMember {
[SecureContext]
- void testSecureMethod(byte foo);
+ undefined testSecureMethod(byte foo);
};
""")
results = parser.finish()
@@ -247,7 +247,7 @@ def WebIDLTest(parser, harness):
[SecureContext]
partial interface TestSecureContextOnPartialInterfaceAndMember {
[SecureContext]
- void testSecureMethod(byte foo);
+ undefined testSecureMethod(byte foo);
};
""")
results = parser.finish()
@@ -264,7 +264,7 @@ def WebIDLTest(parser, harness):
};
partial interface TestSecureContextOnInterfaceAndPartialInterfaceMember {
[SecureContext]
- void testSecureMethod(byte foo);
+ undefined testSecureMethod(byte foo);
};
""")
results = parser.finish()
@@ -280,7 +280,7 @@ def WebIDLTest(parser, harness):
interface TestSecureContextOnInheritedInterface {
};
interface TestSecureContextNotOnInheritingInterface : TestSecureContextOnInheritedInterface {
- void testSecureMethod(byte foo);
+ undefined testSecureMethod(byte foo);
};
""")
results = parser.finish()
@@ -298,7 +298,7 @@ def WebIDLTest(parser, harness):
interface mixin TestNonSecureContextMixin {
const octet TEST_CONSTANT_2 = 0;
readonly attribute byte testAttribute2;
- void testMethod2(byte foo);
+ undefined testMethod2(byte foo);
};
TestSecureContextInterfaceThatIncludesNonSecureContextMixin includes TestNonSecureContextMixin;
""")
@@ -314,13 +314,13 @@ def WebIDLTest(parser, harness):
"Attributes copied from non-[SecureContext] mixin should not be [SecureContext]")
harness.ok(results[0].members[3].getExtendedAttribute("SecureContext") is None,
"Methods copied from non-[SecureContext] mixin should not be [SecureContext]")
-
+
# Test SecureContext and NoInterfaceObject
parser = parser.reset()
parser.parse("""
[NoInterfaceObject, SecureContext]
interface TestSecureContextNoInterfaceObject {
- void testSecureMethod(byte foo);
+ undefined testSecureMethod(byte foo);
};
""")
results = parser.finish()
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py b/components/script/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py
index 52cfcb96817..b209c850d6b 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py
@@ -17,7 +17,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface SpecialMethodSignatureMismatch2 {
- getter void foo(unsigned long index);
+ getter undefined foo(unsigned long index);
};
""")
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_special_methods.py b/components/script/dom/bindings/codegen/parser/tests/test_special_methods.py
index 7f911733b62..c657c9c797d 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_special_methods.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_special_methods.py
@@ -61,7 +61,7 @@ def WebIDLTest(parser, harness):
parser.parse(
"""
interface IndexedDeleter {
- deleter void(unsigned long index);
+ deleter undefined(unsigned long index);
};
""")
parser.finish()
@@ -69,5 +69,5 @@ def WebIDLTest(parser, harness):
threw = True
harness.ok(threw, "There are no indexed deleters")
-
-
+
+
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_typedef.py b/components/script/dom/bindings/codegen/parser/tests/test_typedef.py
index b5fc1c68890..d98088380ba 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_typedef.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_typedef.py
@@ -4,9 +4,9 @@ def WebIDLTest(parser, harness):
typedef long? mynullablelong;
interface Foo {
const mylong X = 5;
- void foo(optional mynullablelong arg = 7);
- void bar(optional mynullablelong arg = null);
- void baz(mylong arg);
+ undefined foo(optional mynullablelong arg = 7);
+ undefined bar(optional mynullablelong arg = null);
+ undefined baz(mylong arg);
};
""")
@@ -21,7 +21,7 @@ def WebIDLTest(parser, harness):
parser.parse("""
typedef long? mynullablelong;
interface Foo {
- void foo(mynullablelong? Y);
+ undefined foo(mynullablelong? Y);
};
""")
results = parser.finish()
@@ -44,7 +44,7 @@ def WebIDLTest(parser, harness):
threw = True
harness.ok(threw, "Should have thrown on nullable inside nullable const.")
-
+
parser = parser.reset()
threw = False
try:
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_unforgeable.py b/components/script/dom/bindings/codegen/parser/tests/test_unforgeable.py
index 770a9d3736f..e72548f637f 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_unforgeable.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_unforgeable.py
@@ -47,7 +47,7 @@ def WebIDLTest(parser, harness):
parser = parser.reset();
parser.parse("""
interface Child : Parent {
- static void foo();
+ static undefined foo();
};
interface Parent {
[Unforgeable] readonly attribute long foo;
@@ -65,7 +65,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface Child : Parent {
- void foo();
+ undefined foo();
};
interface Parent {
[Unforgeable] readonly attribute long foo;
@@ -84,10 +84,10 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface Child : Parent {
- void foo();
+ undefined foo();
};
interface Parent {
- [Unforgeable] void foo();
+ [Unforgeable] undefined foo();
};
""")
@@ -125,7 +125,7 @@ def WebIDLTest(parser, harness):
attribute short foo;
};
interface Parent {
- [Unforgeable] void foo();
+ [Unforgeable] undefined foo();
};
""")
@@ -157,7 +157,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface Child : Parent {
- void foo();
+ undefined foo();
};
interface Parent {};
interface mixin Mixin {
@@ -187,7 +187,7 @@ def WebIDLTest(parser, harness):
};
GrandParent includes Mixin;
interface mixin ChildMixin {
- void foo();
+ undefined foo();
};
Child includes ChildMixin;
""")
@@ -209,11 +209,11 @@ def WebIDLTest(parser, harness):
interface Parent : GrandParent {};
interface GrandParent {};
interface mixin Mixin {
- [Unforgeable] void foo();
+ [Unforgeable] undefined foo();
};
GrandParent includes Mixin;
interface mixin ChildMixin {
- void foo();
+ undefined foo();
};
Child includes ChildMixin;
""")
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_union.py b/components/script/dom/bindings/codegen/parser/tests/test_union.py
index 801314fd0bd..469208b264d 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_union.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_union.py
@@ -136,10 +136,10 @@ def WebIDLTest(parser, harness):
"""
for (i, type) in enumerate(validUnionTypes):
interface += string.Template("""
- void method${i}(${type} arg);
+ undefined method${i}(${type} arg);
${type} returnMethod${i}();
attribute ${type} attr${i};
- void optionalMethod${i}(${type}? arg);
+ undefined optionalMethod${i}(${type}? arg);
""").substitute(i=i, type=type)
interface += """
};
@@ -152,7 +152,7 @@ def WebIDLTest(parser, harness):
for invalid in invalidUnionTypes:
interface = testPre + string.Template("""
interface TestUnion {
- void method(${type} arg);
+ undefined method(${type} arg);
};
""").substitute(type=invalid)
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_union_any.py b/components/script/dom/bindings/codegen/parser/tests/test_union_any.py
index e34cadab470..3eb67648d56 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_union_any.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_union_any.py
@@ -3,7 +3,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface AnyNotInUnion {
- void foo((any or DOMString) arg);
+ undefined foo((any or DOMString) arg);
};
""")
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_union_nullable.py b/components/script/dom/bindings/codegen/parser/tests/test_union_nullable.py
index 08430a94a2e..71da4349e6e 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_union_nullable.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_union_nullable.py
@@ -3,7 +3,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface OneNullableInUnion {
- void foo((object? or DOMString?) arg);
+ undefined foo((object? or DOMString?) arg);
};
""")
@@ -20,7 +20,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface NullableInNullableUnion {
- void foo((object? or DOMString)? arg);
+ undefined foo((object? or DOMString)? arg);
};
""")
@@ -40,7 +40,7 @@ def WebIDLTest(parser, harness):
interface NullableInUnionNullableUnionHelper {
};
interface NullableInUnionNullableUnion {
- void foo(((object? or DOMString) or NullableInUnionNullableUnionHelper)? arg);
+ undefined foo(((object? or DOMString) or NullableInUnionNullableUnionHelper)? arg);
};
""")
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_variadic_constraints.py b/components/script/dom/bindings/codegen/parser/tests/test_variadic_constraints.py
index 7448e40d5a9..e36eff8b476 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_variadic_constraints.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_variadic_constraints.py
@@ -3,7 +3,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface VariadicConstraints1 {
- void foo(byte... arg1, byte arg2);
+ undefined foo(byte... arg1, byte arg2);
};
""")
results = parser.finish()
@@ -20,7 +20,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface VariadicConstraints2 {
- void foo(byte... arg1, optional byte arg2);
+ undefined foo(byte... arg1, optional byte arg2);
};
""")
results = parser.finish();
@@ -36,7 +36,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface VariadicConstraints3 {
- void foo(optional byte... arg1);
+ undefined foo(optional byte... arg1);
};
""")
results = parser.finish()
@@ -53,7 +53,7 @@ def WebIDLTest(parser, harness):
try:
parser.parse("""
interface VariadicConstraints4 {
- void foo(byte... arg1 = 0);
+ undefined foo(byte... arg1 = 0);
};
""")
results = parser.finish()