summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/WebIDL/valid/idl
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/WebIDL/valid/idl')
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/allowany.widl6
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/array.widl5
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/attributes.widl14
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/callback.widl5
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/caller.widl5
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/constants.widl18
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/constructor.widl9
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/dictionary-inherits.widl9
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/dictionary.widl11
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/documentation-dos.widl33
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/documentation.widl34
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/enum.widl8
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/equivalent-decl.widl18
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/exception-inheritance.widl7
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/exception.widl8
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/getter-setter.widl7
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/identifier-qualified-names.widl44
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/implements.widl14
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/indexed-properties.widl12
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/inherits-getter.widl16
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/interface-inherits.widl12
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/iterator.widl35
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/namedconstructor.widl6
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/nointerfaceobject.widl5
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/nullable.widl9
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/nullableobjects.widl13
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/operation-optional-arg.widl4
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/overloading.widl20
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/overridebuiltins.widl6
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/partial-interface.widl7
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/primitives.widl19
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/prototyperoot.widl5
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/putforwards.widl5
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/reg-operations.widl17
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/replaceable.widl5
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/sequence.widl7
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/serializer.widl64
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/static.widl11
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/stringifier-attribute.widl6
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/stringifier-custom.widl9
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/stringifier.widl8
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/treatasnull.widl7
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/treatasundefined.widl7
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/typedef.widl22
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/typesuffixes.widl3
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/uniontype.widl3
-rw-r--r--testing/web-platform/tests/WebIDL/valid/idl/variadic-operations.widl7
47 files changed, 605 insertions, 0 deletions
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/allowany.widl b/testing/web-platform/tests/WebIDL/valid/idl/allowany.widl
new file mode 100644
index 000000000..2343bb963
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/allowany.widl
@@ -0,0 +1,6 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface B {
+ void g();
+ void g(B b);
+ void g([AllowAny] DOMString s);
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/array.widl b/testing/web-platform/tests/WebIDL/valid/idl/array.widl
new file mode 100644
index 000000000..22e21fb65
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/array.widl
@@ -0,0 +1,5 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+[Constructor]
+interface LotteryResults {
+ readonly attribute unsigned short[][] numbers;
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/attributes.widl b/testing/web-platform/tests/WebIDL/valid/idl/attributes.widl
new file mode 100644
index 000000000..7e1d691cb
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/attributes.widl
@@ -0,0 +1,14 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+exception InvalidName {
+ DOMString reason;
+};
+
+exception NoSuchPet { };
+
+interface Person {
+
+ // A simple attribute that can be set to any value the range an unsigned
+ // short can take.
+ attribute unsigned short age;
+
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/callback.widl b/testing/web-platform/tests/WebIDL/valid/idl/callback.widl
new file mode 100644
index 000000000..d92f6a18c
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/callback.widl
@@ -0,0 +1,5 @@
+callback AsyncOperationCallback = void (DOMString status);
+
+callback interface EventHandler {
+ void eventOccurred(DOMString details);
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/caller.widl b/testing/web-platform/tests/WebIDL/valid/idl/caller.widl
new file mode 100644
index 000000000..92acb1c01
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/caller.widl
@@ -0,0 +1,5 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface NumberQuadrupler {
+ // This operation simply returns four times the given number x.
+ legacycaller float compute(float x);
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/constants.widl b/testing/web-platform/tests/WebIDL/valid/idl/constants.widl
new file mode 100644
index 000000000..5e28ae9c1
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/constants.widl
@@ -0,0 +1,18 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface Util {
+ const boolean DEBUG = false;
+ const short negative = -1;
+ const octet LF = 10;
+ const unsigned long BIT_MASK = 0x0000fc00;
+ const float AVOGADRO = 6.022e23;
+ const unrestricted float sobig = Infinity;
+ const unrestricted double minusonedividedbyzero = -Infinity;
+ const short notanumber = NaN;
+};
+
+exception Error {
+ const short ERR_UNKNOWN = 0;
+ const short ERR_OUT_OF_MEMORY = 1;
+
+ short errorCode;
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/constructor.widl b/testing/web-platform/tests/WebIDL/valid/idl/constructor.widl
new file mode 100644
index 000000000..f93ec08a6
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/constructor.widl
@@ -0,0 +1,9 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+[Constructor,
+ Constructor(float radius)]
+interface Circle {
+ attribute float r;
+ attribute float cx;
+ attribute float cy;
+ readonly attribute float circumference;
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/dictionary-inherits.widl b/testing/web-platform/tests/WebIDL/valid/idl/dictionary-inherits.widl
new file mode 100644
index 000000000..48f8a0fdc
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/dictionary-inherits.widl
@@ -0,0 +1,9 @@
+dictionary PaintOptions {
+ DOMString? fillPattern = "black";
+ DOMString? strokePattern = null;
+ Point position;
+};
+
+dictionary WetPaintOptions : PaintOptions {
+ float hydrometry;
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/dictionary.widl b/testing/web-platform/tests/WebIDL/valid/idl/dictionary.widl
new file mode 100644
index 000000000..f46b7ba78
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/dictionary.widl
@@ -0,0 +1,11 @@
+// Extracted from Web IDL editors draft May 31 2011
+dictionary PaintOptions {
+ DOMString? fillPattern = "black";
+ DOMString? strokePattern = null;
+ Point position;
+};
+
+partial dictionary A {
+ long h;
+ long d;
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/documentation-dos.widl b/testing/web-platform/tests/WebIDL/valid/idl/documentation-dos.widl
new file mode 100644
index 000000000..fb801101f
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/documentation-dos.widl
@@ -0,0 +1,33 @@
+/**
+* \brief Testing documentation features
+*
+* This is a
+* single paragraph
+*
+* <p>This is valid.</p>
+* <p>This is <em>valid</em>.</p>
+* <p>This is <b>valid</b>.</p>
+* <p>This is <a href=''>valid</a>.</p>
+* <ul>
+* <li>This</li>
+* <li>is</li>
+* <li>valid</li>
+* </ul>
+* <dl>
+* <dt>This</dt>
+* <dd>valid</dd>
+* </dl>
+* <table>
+* <tr>
+* <td>this</td>
+* <td>is</td>
+* </tr>
+* <tr>
+* <td>valid</td>
+* </tr>
+* </table>
+* <p>This is <br> valid.</p>
+* <p>This is <br /> valid.</p>
+* <p>This is <br/> valid.</p>
+*/
+interface Documentation {}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/documentation.widl b/testing/web-platform/tests/WebIDL/valid/idl/documentation.widl
new file mode 100644
index 000000000..003e9226f
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/documentation.widl
@@ -0,0 +1,34 @@
+/**
+* \brief Testing documentation features
+*
+* This is a
+* single paragraph
+*
+* <p>This is valid.</p>
+* <p>This is <em>valid</em>.</p>
+* <p>This is <b>valid</b>.</p>
+* <p>This is <a href=''>valid</a>.</p>
+* <ul>
+* <li>This</li>
+* <li>is</li>
+* <li>valid</li>
+* </ul>
+* <dl>
+* <dt>This</dt>
+* <dd>valid</dd>
+* </dl>
+* <table>
+* <tr>
+* <td>this</td>
+* <td>is</td>
+* </tr>
+* <tr>
+* <td>valid</td>
+* </tr>
+* </table>
+* <p>This is <br> valid.</p>
+* <p>This is <br /> valid.</p>
+* <p>This is <br/> valid.</p>
+* <p><img src="foo.png" alt="Valid"/></p>
+*/
+interface Documentation {}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/enum.widl b/testing/web-platform/tests/WebIDL/valid/idl/enum.widl
new file mode 100644
index 000000000..851fca2e6
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/enum.widl
@@ -0,0 +1,8 @@
+enum MealType { "rice", "noodles", "other" };
+
+interface Meal {
+ attribute MealType type;
+ attribute float size; // in grams
+
+ void initialize(MealType type, float size);
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/equivalent-decl.widl b/testing/web-platform/tests/WebIDL/valid/idl/equivalent-decl.widl
new file mode 100644
index 000000000..6b3e0eda2
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/equivalent-decl.widl
@@ -0,0 +1,18 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface Dictionary {
+ readonly attribute unsigned long propertyCount;
+
+ getter float getProperty(DOMString propertyName);
+ setter void setProperty(DOMString propertyName, float propertyValue);
+};
+
+
+interface Dictionary {
+ readonly attribute unsigned long propertyCount;
+
+ float getProperty(DOMString propertyName);
+ void setProperty(DOMString propertyName, float propertyValue);
+
+ getter float (DOMString propertyName);
+ setter void (DOMString propertyName, float propertyValue);
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/exception-inheritance.widl b/testing/web-platform/tests/WebIDL/valid/idl/exception-inheritance.widl
new file mode 100644
index 000000000..258fdeba6
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/exception-inheritance.widl
@@ -0,0 +1,7 @@
+// from http://lists.w3.org/Archives/Public/public-script-coord/2010OctDec/0112.html
+ exception DOMException {
+ unsigned short code;
+ };
+
+ exception HierarchyRequestError : DOMException { };
+ exception NoModificationAllowedError : DOMException { }; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/exception.widl b/testing/web-platform/tests/WebIDL/valid/idl/exception.widl
new file mode 100644
index 000000000..f4b6ae29e
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/exception.widl
@@ -0,0 +1,8 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface Dahut {
+ attribute DOMString type;
+};
+
+exception SomeException {
+};
+
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/getter-setter.widl b/testing/web-platform/tests/WebIDL/valid/idl/getter-setter.widl
new file mode 100644
index 000000000..bdf87e1c7
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/getter-setter.widl
@@ -0,0 +1,7 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface Dictionary {
+ readonly attribute unsigned long propertyCount;
+
+ getter float (DOMString propertyName);
+ setter void (DOMString propertyName, float propertyValue);
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/identifier-qualified-names.widl b/testing/web-platform/tests/WebIDL/valid/idl/identifier-qualified-names.widl
new file mode 100644
index 000000000..33893d4c6
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/identifier-qualified-names.widl
@@ -0,0 +1,44 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+ // Typedef identifier: "number"
+ // Qualified name: "::framework::number"
+ typedef float number;
+
+ // Exception identifier: "FrameworkException"
+ // Qualified name: "::framework::FrameworkException"
+ exception FrameworkException {
+
+ // Constant identifier: "ERR_NOT_FOUND"
+ // Qualified name: "::framework::FrameworkException::ERR_NOT_FOUND"
+ const long ERR_NOT_FOUND = 1;
+
+ // Exception field identifier: "code"
+ long code;
+ };
+
+ // Interface identifier: "System"
+ // Qualified name: "::framework::System"
+ interface System {
+
+ // Operation identifier: "createObject"
+ // Operation argument identifier: "interface"
+ object createObject(DOMString _interface);
+
+ // Operation has no identifier; it declares a getter.
+ getter DOMString (DOMString keyName);
+ };
+
+
+ // Interface identifier: "TextField"
+ // Qualified name: "::framework::gui::TextField"
+ interface TextField {
+
+ // Attribute identifier: "const"
+ attribute boolean _const;
+
+ // Attribute identifier: "value"
+ attribute DOMString? _value;
+ };
+
+interface Foo {
+ void op(object interface);
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/implements.widl b/testing/web-platform/tests/WebIDL/valid/idl/implements.widl
new file mode 100644
index 000000000..7a310926f
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/implements.widl
@@ -0,0 +1,14 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+ interface Node {
+ readonly attribute unsigned short nodeType;
+ // ...
+ };
+
+ interface EventTarget {
+ void addEventListener(DOMString type,
+ EventListener listener,
+ boolean useCapture);
+ // ...
+ };
+
+ Node implements EventTarget;
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/indexed-properties.widl b/testing/web-platform/tests/WebIDL/valid/idl/indexed-properties.widl
new file mode 100644
index 000000000..acf0ed3bf
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/indexed-properties.widl
@@ -0,0 +1,12 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface OrderedMap {
+ readonly attribute unsigned long size;
+
+ getter any getByIndex(unsigned long index);
+ setter void setByIndex(unsigned long index, any value);
+ deleter void removeByIndex(unsigned long index);
+
+ getter any get(DOMString name);
+ setter creator void set(DOMString name, any value);
+ deleter void remove(DOMString name);
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/inherits-getter.widl b/testing/web-platform/tests/WebIDL/valid/idl/inherits-getter.widl
new file mode 100644
index 000000000..558e81164
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/inherits-getter.widl
@@ -0,0 +1,16 @@
+interface Animal {
+
+ // A simple attribute that can be set to any string value.
+ readonly attribute DOMString name;
+};
+
+interface Person : Animal {
+
+ // An attribute whose value cannot be assigned to.
+ readonly attribute unsigned short age;
+
+ // An attribute that can raise an exception if it is set to an invalid value.
+ // Its getter behavior is inherited from Animal, and need not be specified
+ // the description of Person.
+ inherit attribute DOMString name;
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/interface-inherits.widl b/testing/web-platform/tests/WebIDL/valid/idl/interface-inherits.widl
new file mode 100644
index 000000000..7921def77
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/interface-inherits.widl
@@ -0,0 +1,12 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface Animal {
+ attribute DOMString name;
+};
+
+interface Human : Animal {
+ attribute Dog pet;
+};
+
+interface Dog : Animal {
+ attribute Human owner;
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/iterator.widl b/testing/web-platform/tests/WebIDL/valid/idl/iterator.widl
new file mode 100644
index 000000000..3bf1b36de
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/iterator.widl
@@ -0,0 +1,35 @@
+interface SessionManager {
+ Session getSessionForUser(DOMString username);
+ readonly attribute unsigned long sessionCount;
+
+ Session iterator;
+};
+
+interface Session {
+ readonly attribute DOMString username;
+ // ...
+};
+
+interface SessionManager2 {
+ Session2 getSessionForUser(DOMString username);
+ readonly attribute unsigned long sessionCount;
+
+ Session2 iterator = SessionIterator;
+};
+
+interface Session2 {
+ readonly attribute DOMString username;
+ // ...
+};
+
+interface SessionIterator {
+ readonly attribute unsigned long remainingSessions;
+};
+
+ interface NodeList {
+ Node iterator = NodeIterator;
+ };
+
+ interface NodeIterator {
+ Node iterator object;
+ }; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/namedconstructor.widl b/testing/web-platform/tests/WebIDL/valid/idl/namedconstructor.widl
new file mode 100644
index 000000000..c468b78f8
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/namedconstructor.widl
@@ -0,0 +1,6 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+[NamedConstructor=Audio,
+ NamedConstructor=Audio(DOMString src)]
+interface HTMLAudioElement : HTMLMediaElement {
+ // ...
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/nointerfaceobject.widl b/testing/web-platform/tests/WebIDL/valid/idl/nointerfaceobject.widl
new file mode 100644
index 000000000..c17d75ff8
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/nointerfaceobject.widl
@@ -0,0 +1,5 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+[NoInterfaceObject]
+interface Query {
+ any lookupEntry(unsigned long key);
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/nullable.widl b/testing/web-platform/tests/WebIDL/valid/idl/nullable.widl
new file mode 100644
index 000000000..ccbf625ff
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/nullable.widl
@@ -0,0 +1,9 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface MyConstants {
+ const boolean? ARE_WE_THERE_YET = false;
+};
+
+interface Node {
+ readonly attribute DOMString? namespaceURI;
+ // ...
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/nullableobjects.widl b/testing/web-platform/tests/WebIDL/valid/idl/nullableobjects.widl
new file mode 100644
index 000000000..83d1d40b2
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/nullableobjects.widl
@@ -0,0 +1,13 @@
+// Extracted from WebIDL spec 2011-05-23
+
+interface A {
+ // ...
+};
+interface B {
+ // ...
+};
+interface C {
+ void f(A? x);
+ void f(B? x);
+
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/operation-optional-arg.widl b/testing/web-platform/tests/WebIDL/valid/idl/operation-optional-arg.widl
new file mode 100644
index 000000000..379053b45
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/operation-optional-arg.widl
@@ -0,0 +1,4 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface ColorCreator {
+ object createColor(float v1, float v2, float v3, optional float alpha = 3.5);
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/overloading.widl b/testing/web-platform/tests/WebIDL/valid/idl/overloading.widl
new file mode 100644
index 000000000..ef1288a88
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/overloading.widl
@@ -0,0 +1,20 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface A {
+ // ...
+};
+
+interface B {
+ // ...
+};
+
+interface C {
+ void f(A x);
+ void f(B x);
+};
+
+interface A {
+ /* f1 */ void f(DOMString a);
+ /* f2 */ void f([AllowAny] DOMString a, DOMString b, float... c);
+ /* f3 */ void f();
+ /* f4 */ void f(long a, DOMString b, optional DOMString c, float... d);
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/overridebuiltins.widl b/testing/web-platform/tests/WebIDL/valid/idl/overridebuiltins.widl
new file mode 100644
index 000000000..79211c29e
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/overridebuiltins.widl
@@ -0,0 +1,6 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+[OverrideBuiltins]
+interface StringMap2 {
+ readonly attribute unsigned long length;
+ getter DOMString lookup(DOMString key);
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/partial-interface.widl b/testing/web-platform/tests/WebIDL/valid/idl/partial-interface.widl
new file mode 100644
index 000000000..90e7e0ea4
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/partial-interface.widl
@@ -0,0 +1,7 @@
+interface Foo {
+ attribute DOMString bar;
+};
+
+partial interface Foo {
+ attribute DOMString quux;
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/primitives.widl b/testing/web-platform/tests/WebIDL/valid/idl/primitives.widl
new file mode 100644
index 000000000..92939601a
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/primitives.widl
@@ -0,0 +1,19 @@
+interface Primitives {
+ attribute boolean truth;
+ attribute byte character;
+ attribute octet value;
+ attribute short number;
+ attribute unsigned short positive;
+ attribute long big;
+ attribute unsigned long bigpositive;
+ attribute long long bigbig;
+ attribute unsigned long long bigbigpositive;
+ attribute float real;
+ attribute double bigreal;
+ attribute unrestricted float realwithinfinity;
+ attribute unrestricted double bigrealwithinfinity;
+ attribute DOMString string;
+ attribute ByteString bytes;
+ attribute Date date;
+ attribute RegExp regexp;
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/prototyperoot.widl b/testing/web-platform/tests/WebIDL/valid/idl/prototyperoot.widl
new file mode 100644
index 000000000..30dd5cbca
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/prototyperoot.widl
@@ -0,0 +1,5 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+[PrototypeRoot]
+interface Node {
+ readonly attribute unsigned short nodeType;
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/putforwards.widl b/testing/web-platform/tests/WebIDL/valid/idl/putforwards.widl
new file mode 100644
index 000000000..1e50a4ee3
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/putforwards.widl
@@ -0,0 +1,5 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface Person {
+ [PutForwards=full] readonly attribute Name name;
+ attribute unsigned short age;
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/reg-operations.widl b/testing/web-platform/tests/WebIDL/valid/idl/reg-operations.widl
new file mode 100644
index 000000000..13997cb1d
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/reg-operations.widl
@@ -0,0 +1,17 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface Dimensions {
+ attribute unsigned long width;
+ attribute unsigned long height;
+};
+
+exception NoPointerDevice { };
+
+interface Button {
+
+ // An operation that takes no arguments, returns a boolean
+ boolean isMouseOver();
+
+ // Overloaded operations.
+ void setDimensions(Dimensions size);
+ void setDimensions(unsigned long width, unsigned long height);
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/replaceable.widl b/testing/web-platform/tests/WebIDL/valid/idl/replaceable.widl
new file mode 100644
index 000000000..c14d0c376
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/replaceable.widl
@@ -0,0 +1,5 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface Counter {
+ [Replaceable] readonly attribute unsigned long value;
+ void increment();
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/sequence.widl b/testing/web-platform/tests/WebIDL/valid/idl/sequence.widl
new file mode 100644
index 000000000..a1aa931f5
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/sequence.widl
@@ -0,0 +1,7 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+// edited to remove sequence as attributes, now invalid
+interface Canvas {
+ void drawPolygon(sequence<float> coordinates);
+ sequence<float> getInflectionPoints();
+ // ...
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/serializer.widl b/testing/web-platform/tests/WebIDL/valid/idl/serializer.widl
new file mode 100644
index 000000000..6f6ccd0e8
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/serializer.widl
@@ -0,0 +1,64 @@
+interface Transaction {
+ readonly attribute Account from;
+ readonly attribute Account to;
+ readonly attribute float amount;
+ readonly attribute DOMString description;
+ readonly attribute unsigned long number;
+
+ serializer;
+};
+
+interface Account {
+ attribute DOMString name;
+ attribute unsigned long number;
+ serializer DOMString serialize();
+};
+
+interface Transaction2 {
+ readonly attribute Account2 from;
+ readonly attribute Account2 to;
+ readonly attribute float amount;
+ readonly attribute DOMString description;
+ readonly attribute unsigned long number;
+
+ serializer = { from, to, amount, description };
+};
+
+interface Account2 {
+ attribute DOMString name;
+ attribute unsigned long number;
+ serializer = number;
+};
+
+interface Account3 {
+ attribute DOMString name;
+ attribute unsigned long number;
+
+ serializer = { attribute };
+};
+
+interface Account4 {
+ getter object getItem(unsigned long index);
+ serializer = { getter };
+};
+
+interface Account5 : Account {
+ attribute DOMString secondname;
+ serializer = { inherit, secondname };
+};
+
+interface Account6 : Account {
+ attribute DOMString secondname;
+ serializer = { inherit, attribute };
+};
+
+interface Account7 {
+ attribute DOMString name;
+ attribute unsigned long number;
+ serializer = [ name, number ];
+};
+
+interface Account8 {
+ getter object getItem(unsigned long index);
+ serializer = [ getter ];
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/static.widl b/testing/web-platform/tests/WebIDL/valid/idl/static.widl
new file mode 100644
index 000000000..5b2cd3659
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/static.widl
@@ -0,0 +1,11 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface Point { /* ... */ };
+
+interface Circle {
+ attribute float cx;
+ attribute float cy;
+ attribute float radius;
+
+ static readonly attribute long triangulationCount;
+ static Point triangulate(Circle c1, Circle c2, Circle c3);
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/stringifier-attribute.widl b/testing/web-platform/tests/WebIDL/valid/idl/stringifier-attribute.widl
new file mode 100644
index 000000000..c964ecb93
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/stringifier-attribute.widl
@@ -0,0 +1,6 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+[Constructor]
+interface Student {
+ attribute unsigned long id;
+ stringifier attribute DOMString name;
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/stringifier-custom.widl b/testing/web-platform/tests/WebIDL/valid/idl/stringifier-custom.widl
new file mode 100644
index 000000000..b5d7c87e7
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/stringifier-custom.widl
@@ -0,0 +1,9 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+[Constructor]
+interface Student {
+ attribute unsigned long id;
+ attribute DOMString? familyName;
+ attribute DOMString givenName;
+
+ stringifier DOMString ();
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/stringifier.widl b/testing/web-platform/tests/WebIDL/valid/idl/stringifier.widl
new file mode 100644
index 000000000..4eb483d9b
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/stringifier.widl
@@ -0,0 +1,8 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface A {
+ stringifier DOMString ();
+};
+
+interface A {
+ stringifier;
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/treatasnull.widl b/testing/web-platform/tests/WebIDL/valid/idl/treatasnull.widl
new file mode 100644
index 000000000..d3c55b008
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/treatasnull.widl
@@ -0,0 +1,7 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface Dog {
+ attribute DOMString name;
+ attribute DOMString owner;
+
+ boolean isMemberOfBreed([TreatNullAs=EmptyString] DOMString breedName);
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/treatasundefined.widl b/testing/web-platform/tests/WebIDL/valid/idl/treatasundefined.widl
new file mode 100644
index 000000000..e30050f84
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/treatasundefined.widl
@@ -0,0 +1,7 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface Cat {
+ attribute DOMString name;
+ attribute DOMString owner;
+
+ boolean isMemberOfBreed([TreatUndefinedAs=EmptyString] DOMString breedName);
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/typedef.widl b/testing/web-platform/tests/WebIDL/valid/idl/typedef.widl
new file mode 100644
index 000000000..b4c17d8d3
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/typedef.widl
@@ -0,0 +1,22 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+ interface Point {
+ attribute float x;
+ attribute float y;
+ };
+
+ typedef sequence<Point> PointSequence;
+
+ interface Rect {
+ attribute Point topleft;
+ attribute Point bottomright;
+ };
+
+ interface Widget {
+
+ readonly attribute Rect bounds;
+
+ boolean pointWithinBounds(Point p);
+ boolean allPointsWithinBounds(PointSequence ps);
+ };
+
+ typedef [Clamp] octet value; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/typesuffixes.widl b/testing/web-platform/tests/WebIDL/valid/idl/typesuffixes.widl
new file mode 100644
index 000000000..95e31c169
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/typesuffixes.widl
@@ -0,0 +1,3 @@
+interface Suffixes {
+ void test(sequence<DOMString[]?>? foo);
+};
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/uniontype.widl b/testing/web-platform/tests/WebIDL/valid/idl/uniontype.widl
new file mode 100644
index 000000000..4d99f0196
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/uniontype.widl
@@ -0,0 +1,3 @@
+interface Union {
+ attribute (float or (Date or Event) or (Node or DOMString)?) test;
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/WebIDL/valid/idl/variadic-operations.widl b/testing/web-platform/tests/WebIDL/valid/idl/variadic-operations.widl
new file mode 100644
index 000000000..51fae4cc1
--- /dev/null
+++ b/testing/web-platform/tests/WebIDL/valid/idl/variadic-operations.widl
@@ -0,0 +1,7 @@
+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
+interface IntegerSet {
+ readonly attribute unsigned long cardinality;
+
+ void union(long... ints);
+ void intersection(long... ints);
+}; \ No newline at end of file