OLD | NEW |
1 description("This tests support for the document.createTouchList API."); | 1 description("This tests support for the document.createTouchList API."); |
2 | 2 |
3 shouldBeTrue('"createTouchList" in document'); | 3 shouldBeTrue('"createTouchList" in document'); |
4 | 4 |
5 // Test createTouchList with no arguments. | 5 // Test createTouchList with no arguments. |
6 var touchList = document.createTouchList(); | 6 var touchList = document.createTouchList(); |
7 shouldBeNonNull("touchList"); | 7 shouldBeNonNull("touchList"); |
8 shouldBe("touchList.length", "0"); | 8 shouldBe("touchList.length", "0"); |
9 shouldBeNull("touchList.item(0)"); | 9 shouldBeNull("touchList.item(0)"); |
10 shouldBeNull("touchList.item(1)"); | 10 shouldBeNull("touchList.item(1)"); |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 document.body.dispatchEvent(evt); | 34 document.body.dispatchEvent(evt); |
35 } catch(e) { | 35 } catch(e) { |
36 testFailed("An exception was thrown: " + e.message); | 36 testFailed("An exception was thrown: " + e.message); |
37 } | 37 } |
38 | 38 |
39 // Test createTouchList with invalid arguments which throws exceptions. | 39 // Test createTouchList with invalid arguments which throws exceptions. |
40 try { | 40 try { |
41 var tl = document.createTouchList(1, 2); | 41 var tl = document.createTouchList(1, 2); |
42 } catch(e) { | 42 } catch(e) { |
43 testFailed("An exception was thrown: " + e.message); | 43 testPassed("An exception was thrown: " + e.message); |
44 } | 44 } |
45 isSuccessfullyParsed(); | 45 isSuccessfullyParsed(); |
46 | 46 |
OLD | NEW |