tests/touch-events-v1/submissions/Nokia/idlharness.html
author Art Barstow <art.barstow@nokia.com>
Wed, 27 Feb 2013 15:21:16 -0500
changeset 187 d14cdeb28c54
parent 186 a449f93b5275
child 213 c8eccbb92b31
permissions -rw-r--r--
Change Window to Document untested_idl section
184
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
     1
<!DOCTYPE html>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
     2
<html>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
     3
<head>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
     4
<meta charset="utf-8" />
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
     5
<title>idlharness test</title>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
     6
<link rel="author" title="W3C" href="http://www.w3.org/" />
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
     7
<link rel="help" href="http://www.w3.org/TR/touch-events/#touch-interface"/>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
     8
<link rel="help" href="http://www.w3.org/TR/touch-events/#touchlist-interface"/>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
     9
<link rel="help" href="http://www.w3.org/TR/touch-events/#touchevent-interface"/>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    10
<link rel="help" href="http://www.w3.org/TR/touch-events/#extensions-to-the-document-interface"/>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    11
<script src="/resources/testharness.js"></script>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    12
<script src="/resources/testharnessreport.js"></script>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    13
<script src="/resources/WebIDLParser.js"></script>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    14
<script src="/resources/idlharness.js"></script>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    15
</head>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    16
<body>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    17
<h1>idlharness test</h1>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    18
<p>This test validates the WebIDL included in the Touch Events specification.</p>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    19
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    20
<pre id='untested_idl' style='display:none'>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    21
187
d14cdeb28c54 Change Window to Document untested_idl section
Art Barstow <art.barstow@nokia.com>
parents: 186
diff changeset
    22
interface Document {
184
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    23
};
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    24
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    25
</pre>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    26
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    27
<pre id='idl'>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    28
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    29
interface Touch {
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    30
    readonly attribute long        identifier;
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    31
    readonly attribute EventTarget target;
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    32
    readonly attribute long        screenX;
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    33
    readonly attribute long        screenY;
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    34
    readonly attribute long        clientX;
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    35
    readonly attribute long        clientY;
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    36
    readonly attribute long        pageX;
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    37
    readonly attribute long        pageY;
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    38
};
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    39
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    40
interface TouchList {
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    41
    readonly attribute unsigned long length;
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    42
    getter Touch item (unsigned long index);
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    43
};
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    44
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    45
interface TouchEvent : UIEvent {
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    46
    readonly attribute TouchList touches;
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    47
    readonly attribute TouchList targetTouches;
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    48
    readonly attribute TouchList changedTouches;
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    49
    readonly attribute boolean   altKey;
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    50
    readonly attribute boolean   metaKey;
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    51
    readonly attribute boolean   ctrlKey;
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    52
    readonly attribute boolean   shiftKey;
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    53
};
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    54
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    55
partial interface Document {
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    56
    Touch     createTouch (AbstractView view, EventTarget target, long identifier, long pageX, long pageY, long screenX, long screenY);
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    57
    TouchList createTouchList (optional Touch... touches);
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    58
};
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    59
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    60
</pre>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    61
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    62
<script>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    63
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    64
(function() {
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    65
  var idl_array = new IdlArray();
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    66
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    67
  idl_array.add_untested_idls(document.getElementById("untested_idl").textContent);
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    68
  idl_array.add_idls(document.getElementById("idl").textContent);
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    69
186
a449f93b5275 Update add_objects
Art Barstow <art.barstow@nokia.com>
parents: 185
diff changeset
    70
  idl_array.add_objects({Document: ["document"],
a449f93b5275 Update add_objects
Art Barstow <art.barstow@nokia.com>
parents: 185
diff changeset
    71
                         TouchEvent: ["window.TouchEvent"]});
184
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    72
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    73
  idl_array.test();
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    74
})();
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    75
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    76
</script>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    77
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    78
<div id="log"></div>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    79
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    80
</body>
6764e05979e1 Test for Web IDL conformance
Art Barstow <art.barstow@nokia.com>
parents:
diff changeset
    81
</html>