summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/resources/webidl2/test/syntax/idl/serializer.widl
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/resources/webidl2/test/syntax/idl/serializer.widl')
-rw-r--r--testing/web-platform/tests/resources/webidl2/test/syntax/idl/serializer.widl64
1 files changed, 64 insertions, 0 deletions
diff --git a/testing/web-platform/tests/resources/webidl2/test/syntax/idl/serializer.widl b/testing/web-platform/tests/resources/webidl2/test/syntax/idl/serializer.widl
new file mode 100644
index 000000000..6f6ccd0e8
--- /dev/null
+++ b/testing/web-platform/tests/resources/webidl2/test/syntax/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