diff options
Diffstat (limited to 'testing/web-platform/tests/WebIDL/valid/xml/typedef.widlprocxml')
-rw-r--r-- | testing/web-platform/tests/WebIDL/valid/xml/typedef.widlprocxml | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/testing/web-platform/tests/WebIDL/valid/xml/typedef.widlprocxml b/testing/web-platform/tests/WebIDL/valid/xml/typedef.widlprocxml new file mode 100644 index 000000000..785f6706e --- /dev/null +++ b/testing/web-platform/tests/WebIDL/valid/xml/typedef.widlprocxml @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd"> +<Definitions> + <webidl> interface Point { + attribute float x; + attribute float y; + }; + + typedef sequence<<ref>Point</ref>> PointSequence; + + interface Rect { + attribute <ref>Point</ref> topleft; + attribute <ref>Point</ref> bottomright; + }; + + interface Widget { + + readonly attribute <ref>Rect</ref> bounds; + + boolean pointWithinBounds(<ref>Point</ref> p); + boolean allPointsWithinBounds(<ref>PointSequence</ref> ps); + }; + + typedef [Clamp] octet value;</webidl> + <Interface name="Point" id="::Point"> + <webidl> interface Point { + attribute float x; + attribute float y; + };</webidl> + <Attribute name="x" id="::Point::x"> + <webidl> attribute float x;</webidl> + <Type type="float"/> + </Attribute> + <Attribute name="y" id="::Point::y"> + <webidl> attribute float y;</webidl> + <Type type="float"/> + </Attribute> + </Interface> + <Typedef name="PointSequence" id="::PointSequence"> + <webidl> typedef sequence<<ref>Point</ref>> PointSequence;</webidl> + <Type type="sequence"> + <Type name="Point"/> + </Type> + </Typedef> + <Interface name="Rect" id="::Rect"> + <webidl> interface Rect { + attribute <ref>Point</ref> topleft; + attribute <ref>Point</ref> bottomright; + };</webidl> + <Attribute name="topleft" id="::Rect::topleft"> + <webidl> attribute <ref>Point</ref> topleft;</webidl> + <Type name="Point"/> + </Attribute> + <Attribute name="bottomright" id="::Rect::bottomright"> + <webidl> attribute <ref>Point</ref> bottomright;</webidl> + <Type name="Point"/> + </Attribute> + </Interface> + <Interface name="Widget" id="::Widget"> + <webidl> interface Widget { + + readonly attribute <ref>Rect</ref> bounds; + + boolean pointWithinBounds(<ref>Point</ref> p); + boolean allPointsWithinBounds(<ref>PointSequence</ref> ps); + };</webidl> + <Attribute readonly="readonly" name="bounds" id="::Widget::bounds"> + <webidl> readonly attribute <ref>Rect</ref> bounds;</webidl> + <Type name="Rect"/> + </Attribute> + <Operation name="pointWithinBounds" id="::Widget::pointWithinBounds"> + <webidl> boolean pointWithinBounds(<ref>Point</ref> p);</webidl> + <Type type="boolean"/> + <ArgumentList> + <Argument name="p"> + <Type name="Point"/> + </Argument> + </ArgumentList> + </Operation> + <Operation name="allPointsWithinBounds" id="::Widget::allPointsWithinBounds"> + <webidl> boolean allPointsWithinBounds(<ref>PointSequence</ref> ps);</webidl> + <Type type="boolean"/> + <ArgumentList> + <Argument name="ps"> + <Type name="PointSequence"/> + </Argument> + </ArgumentList> + </Operation> + </Interface> + <Typedef name="value" id="::value"> + <webidl> typedef [Clamp] octet value;</webidl> + <Type type="octet"> + <ExtendedAttributeList> + <ExtendedAttribute name="Clamp"> + <webidl>Clamp</webidl> + </ExtendedAttribute> + </ExtendedAttributeList> + </Type> + </Typedef> +</Definitions> |