This is just a bunch of tests for the WebIDL processing in ReSpec.

Interfaces

Simplest

Inheritance

Multiple Inheritance

Extended Attribute

Everything

Partial

Constants

const unsigned short LEVROGYROUS = 0
Turning left.
const float DEXTROGYROUS = 1.6
Turning right.
const boolean SHOUT = true
The shout.

Attributes

attribute DOMString foo
The foo attribute.
readonly attribute DOMString bar
The bar attribute.
attribute unsigned short xxx
The xxx attribute.
readonly attribute unsigned short yyy
The yyy attribute.
[Ook, Oook] readonly attribute unsigned short ook
The ook attribute.

Dictionaries

Simplest

Inheritance

With members

DOMString foo
The foo member.
unsigned short xxx
The xxx member.
DOMString? fillPattern = "black"
The nullable and defaulted fillPattern member.
DOMString? strokePattern = null
The nullable and defaulted strokePattern member.

Methods

void doIt1 ()
The doIt1 method.
DOMString doIt2 ()
The doIt2 method.
unsigned short doIt3 ()
The doIt3 method.
void doIt4 (in Dahut7 foo)
The doIt4 method.
void noIn (DahutSansIn foo)
No in.
void doIt5 (in DOMString foo, in unsigned short bar)
The doIt5 method.
[NameSetter] Dahut7 doIt6 ([Optional] in Dahut5 foo, [Optional, TreastAsNull] in unsigned short bar)
The doIt6 method.
void extended ()
This is an example of a method the parameters of which are described in greater detail.
DOMString foo
Specifies foo, a basic parameter.
[Optional, TreastAsNull] unsigned short another
This is another parameter, more complex. And we add a lot of text to see it all wrap. And we add a lot of text to see it all wrap. And we add a lot of text to see it all wrap. And we add a lot of text to see it all wrap. And we add a lot of text to see it all wrap. And we add a lot of text to see it all wrap. And we add a lot of text to see it all wrap. And we add a lot of text to see it all wrap. And we add a lot of text to see it all wrap.

Exception Definitions

const unsigned short SUIT_UP_ERR = 0
You didn't put on your suit.
const unsigned short LEGENDARY_ERR = 1
Bo-ring.
const DOMString DENIED_ERR = "DE-waitforit-NIED!!!!"
Or not.
unsigned short xxx
The xxx field.
unsigned short yyy
The yyy field.
[Ook, Oook] unsigned short ook
The ook field.

Exception Raising

void raising ()
This is an example of a method that raises an exception.
This is an exception that is raised as a whole, for a reason but without specific codes being mentioned.
void raising2 ()
This is an example of a method that raises another exception.
TOO_SEXY_ERR
Raised whenever I walk out the door.
COOL_FROOD_ERR
Not a club you can buy your way into.
void complexRaising2 ()
This is an example of a method that does a bunch of things.
TOO_SEXY_ERR
Raised whenever I walk out the door.
COOL_FROOD_ERR
Not a club you can buy your way into. And we add a lot of text to see it all wrap. And we add a lot of text to see it all wrap. And we add a lot of text to see it all wrap. And we add a lot of text to see it all wrap.
[Optional, TreastAsNull] unsigned short another
This is another parameter, more complex. And we add a lot of text to see it all wrap. And we add a lot of text to see it all wrap. And we add a lot of text to see it all wrap. And we add a lot of text to see it all wrap. And we add a lot of text to see it all wrap.
This is an exception that is raised as a whole, for a reason but without specific codes being mentioned. And we add a lot of text to see it all wrap. And we add a lot of text to see it all wrap. And we add a lot of text to see it all wrap. And we add a lot of text to see it all wrap.

Exception On Attributes

attribute DOMString gr
This is an example of an attribute that raises an exception.
This is an exception that is raised on getting, simply.
attribute DOMString sr
This is an example of an attribute that raises an exception.
This is an exception that is raised on setting, simply.
attribute DOMString bothAtOnce
This is an example of an attribute that raises an exception.
This is an exception that is raised on getting and setting, simply, at once.
attribute DOMString multi
This is an example of an attribute that raises an exception.
This is an exception that is raised on setting, simply, 01.
This is an exception that is raised on setting, simply, 02.
This is an exception that is raised on getting, simply, 01.
This is an exception that is raised on getting, simply, 02.
attribute DOMString grc
This is an example of an attribute that raises an exception.
TEST_ERR
This is an exception that is raised on getting, complex.
FOO_ERR
Foooo foo fooooooo fooof ooooooooooo...
attribute DOMString src
This is an example of an attribute that raises an exception.
TEST_ERR
This is an exception that is raised on setting, complex.
FOO_ERR
Foooo foo fooooooo fooof ooooooooooo...
attribute DOMString bothAtOnceC
This is an example of an attribute that raises an exception.
TEST_ERR
This is an exception that is raised on getting and setting, complex, at once.
FOO_ERR
Foooo foo fooooooo fooof ooooooooooo...
attribute DOMString multic
This is an example of an attribute that raises an exception.
TEST_ERR
This is an exception that is raised on setting, complex, 01.
FOO_ERR
Foooo foo fooooooo fooof ooooooooooo...
TEST_ERR
This is an exception that is raised on setting, complex, 02.
FOO_ERR
Foooo foo fooooooo fooof ooooooooooo...
TEST_ERR
This is an exception that is raised on getting, complex, 01.
FOO_ERR
Foooo foo fooooooo fooof ooooooooooo...
TEST_ERR
This is an exception that is raised on getting, complex, 02.
FOO_ERR
Foooo foo fooooooo fooof ooooooooooo...

Sequences

attribute sequence<DOMString> foos
The foo attribute.
attribute sequence<Dahut9> moreDahuts
The moreDahuts attribute.
sequence<Dahut5> doSomething (in sequence<Dahut10> dahuts)
The doSomething method.
void doSomethingElse ()
Sequencing
sequence<DOMString> bars
Specifies foo, a basic parameter.

Typedefs

An automatic typedef:

A typedef with content:

For simplicity's sake, we'll refer to that geometry object directly as Point.

Implements

An automatic implements:

An implements with content:

All instances of Dahut5 MUST support Foo.

Bug based tests

Wrapping.

long watchPowerSource(in PowerSourceCallback successCallback, [Optional] in PowerErrorCallback errorCallback)
unwrapped
long watchPowerSource(in PowerSourceCallback successCallback, [Optional] in PowerErrorCallback errorCallback)
wrapped

Nullable

On all members that support it.

const boolean? ARE_WE_THERE_YET = false
on const
attribute unsigned long? viciousness
on attribute
void nullMe (in MaybeNull? foo)
on simple method
unsigned long? nullRet ()
on simple method return
void extendedNull ()
With the extended syntax
unsigned long? foo
Specifies foo, nullable.

A nullable typedef:

Optional parameters

void oneOpt (in optional MaybeNot foo)
on simple method
void twoOpt (in Yes yes, in optional MaybeNot foo, in optional MaybeNot bar)
multi params
void restOpt (in Yes yes, in optional MaybeNot foo, in SilentlyOpt bar)
optional to the rest
void extendedOptional ()
With the extended syntax
optional unsigned long? foo
Specifies foo, nullable and optional.

Arrays

On all members that support it.

attribute unsigned long[] viciousness
on attribute
void arrayMe (in ArrayThing[] foo)
on simple method
unsigned long[] arrayRet ()
on simple method return
void extendedArray ()
With the extended syntax
unsigned long[] foo
An array of foo.

An array typedef: