<test_definition>
<suite category="W3C/HTML5 APIs" name="tct-touchevent-w3c-tests">
<set name="TouchEvent" type="js">
- <testcase purpose="Check if document.createtouch method is defined." type="compliance" status="approved" component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" priority="P0" id="document_createTouch_exist">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/document_createTouch_exist.html</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion element_type="method" element_name="createTouch" interface="Document" specification="Touch Events version 1 (Partial)" section="Device" category="Tizen W3C API Specifications"/>
- <spec_url>http://www.w3.org/TR/2013/WD-touch-events-20130124/#extensions-to-the-document-interface</spec_url>
- <spec_statement/>
- </spec>
- </specs>
- </testcase>
- <testcase purpose="Check if document.createtouchlist method is defined." type="compliance" status="approved" component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" priority="P0" id="document_createTouchList_exist">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/document_createTouchList_exist.html</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion element_type="method" element_name="createTouchList" interface="Document" specification="Touch Events version 1 (Partial)" section="Device" category="Tizen W3C API Specifications"/>
- <spec_url>http://www.w3.org/TR/2013/WD-touch-events-20130124/#extensions-to-the-document-interface</spec_url>
- <spec_statement/>
- </spec>
- </specs>
- </testcase>
<testcase purpose="Check if touchEvent.altKey attribute is defined." type="compliance" status="approved" component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="manual" priority="P1" id="TouchEvent_altKey_exist">
<description>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if the Touch.identifier attribute exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" priority="P1" id="Touch_identifier_exist">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/Touch_attributes_exist.html?total_num=8&locator_key=id&value=1</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion element_type="attribute" element_name="identifier" interface="Touch" specification="Touch Events version 1 (Partial)" section="Device" category="Tizen W3C API Specifications"/>
- <spec_url>http://www.w3.org/TR/2013/WD-touch-events-20130124/#idl-def-Touch</spec_url>
- <spec_statement/>
- </spec>
- </specs>
- </testcase>
- <testcase purpose="Check if the Touch.target attribute exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" priority="P1" id="Touch_target_exist">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/Touch_attributes_exist.html?total_num=8&locator_key=id&value=2</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion element_type="attribute" element_name="target" interface="Touch" specification="Touch Events version 1 (Partial)" section="Device" category="Tizen W3C API Specifications"/>
- <spec_url>http://www.w3.org/TR/2013/WD-touch-events-20130124/#idl-def-Touch</spec_url>
- <spec_statement/>
- </spec>
- </specs>
- </testcase>
- <testcase purpose="Check if the Touch.screenX attribute exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" priority="P1" id="Touch_screenX_exist">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/Touch_attributes_exist.html?total_num=8&locator_key=id&value=3</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion element_type="attribute" element_name="screenX" interface="Touch" specification="Touch Events version 1 (Partial)" section="Device" category="Tizen W3C API Specifications"/>
- <spec_url>http://www.w3.org/TR/2013/WD-touch-events-20130124/#idl-def-Touch</spec_url>
- <spec_statement/>
- </spec>
- </specs>
- </testcase>
- <testcase purpose="Check if the Touch.screenY attribute exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" priority="P1" id="Touch_screenY_exist">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/Touch_attributes_exist.html?total_num=8&locator_key=id&value=4</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion element_type="attribute" element_name="screenY" interface="Touch" specification="Touch Events version 1 (Partial)" section="Device" category="Tizen W3C API Specifications"/>
- <spec_url>http://www.w3.org/TR/2013/WD-touch-events-20130124/#idl-def-Touch</spec_url>
- <spec_statement/>
- </spec>
- </specs>
- </testcase>
- <testcase purpose="Check if the Touch.clientX attribute exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" priority="P1" id="Touch_clientX_exist">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/Touch_attributes_exist.html?total_num=8&locator_key=id&value=5</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion element_type="attribute" element_name="clientX" interface="Touch" specification="Touch Events version 1 (Partial)" section="Device" category="Tizen W3C API Specifications"/>
- <spec_url>http://www.w3.org/TR/2013/WD-touch-events-20130124/#idl-def-Touch</spec_url>
- <spec_statement/>
- </spec>
- </specs>
- </testcase>
- <testcase purpose="Check if the Touch.clientY attribute exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" priority="P1" id="Touch_clientY_exist">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/Touch_attributes_exist.html?total_num=8&locator_key=id&value=6</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion element_type="attribute" element_name="clientY" interface="Touch" specification="Touch Events version 1 (Partial)" section="Device" category="Tizen W3C API Specifications"/>
- <spec_url>http://www.w3.org/TR/2013/WD-touch-events-20130124/#idl-def-Touch</spec_url>
- <spec_statement/>
- </spec>
- </specs>
- </testcase>
- <testcase purpose="Check if the Touch.pageX attribute exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" priority="P1" id="Touch_pageX_exist">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/Touch_attributes_exist.html?total_num=8&locator_key=id&value=7</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion element_type="attribute" element_name="pageX" interface="Touch" specification="Touch Events version 1 (Partial)" section="Device" category="Tizen W3C API Specifications"/>
- <spec_url>http://www.w3.org/TR/2013/WD-touch-events-20130124/#idl-def-Touch</spec_url>
- <spec_statement/>
- </spec>
- </specs>
- </testcase>
- <testcase purpose="Check if the Touch.pageY attribute exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" priority="P1" id="Touch_pageY_exist">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/Touch_attributes_exist.html?total_num=8&locator_key=id&value=8</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion element_type="attribute" element_name="pageY" interface="Touch" specification="Touch Events version 1 (Partial)" section="Device" category="Tizen W3C API Specifications"/>
- <spec_url>http://www.w3.org/TR/2013/WD-touch-events-20130124/#idl-def-Touch</spec_url>
- <spec_statement/>
- </spec>
- </specs>
- </testcase>
- <testcase purpose="Check if the TouchList.item method exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" priority="P1" id="TouchList_item_exist">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/TouchList_attributes_exist.html?total_num=2&locator_key=id&value=1</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion element_type="method" element_name="item" interface="TouchList" specification="Touch Events version 1 (Partial)" section="Device" category="Tizen W3C API Specifications"/>
- <spec_url>http://www.w3.org/TR/2013/WD-touch-events-20130124/#idl-def-TouchList</spec_url>
- <spec_statement/>
- </spec>
- </specs>
- </testcase>
- <testcase purpose="Check if the TouchList.length attribute exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" priority="P1" id="TouchList_length_exist">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/TouchList_attributes_exist.html?total_num=2&locator_key=id&value=2</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion element_type="attribute" element_name="length" interface="TouchList" specification="Touch Events version 1 (Partial)" section="Device" category="Tizen W3C API Specifications"/>
- <spec_url>http://www.w3.org/TR/2013/WD-touch-events-20130124/#idl-def-TouchList</spec_url>
- <spec_statement/>
- </spec>
- </specs>
- </testcase>
<testcase purpose="Check if touchstart event is dispatched before any mouse event during multiple touches" type="compliance" status="approved" component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="manual" priority="P3" id="multitouch_mousedown_event">
<description>
<pre_condition>Test device supports touch.</pre_condition>
<capabilities>
<capability name="http://tizen.org/feature/multi_point_touch.pinch_zoom"/>
</capabilities>
- <testcase component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" id="document_createTouch_exist" purpose="Check if document.createtouch method is defined.">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/document_createTouch_exist.html</test_script_entry>
- </description>
- </testcase>
- <testcase component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" id="document_createTouchList_exist" purpose="Check if document.createtouchlist method is defined.">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/document_createTouchList_exist.html</test_script_entry>
- </description>
- </testcase>
<testcase component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="manual" id="TouchEvent_altKey_exist" purpose="Check if touchEvent.altKey attribute is defined.">
<description>
<steps>
<test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/TouchEvent_shiftKey_exist.html</test_script_entry>
</description>
</testcase>
- <testcase component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" id="Touch_identifier_exist" purpose="Check if the Touch.identifier attribute exists">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/Touch_attributes_exist.html?total_num=8&locator_key=id&value=1</test_script_entry>
- </description>
- </testcase>
- <testcase component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" id="Touch_target_exist" purpose="Check if the Touch.target attribute exists">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/Touch_attributes_exist.html?total_num=8&locator_key=id&value=2</test_script_entry>
- </description>
- </testcase>
- <testcase component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" id="Touch_screenX_exist" purpose="Check if the Touch.screenX attribute exists">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/Touch_attributes_exist.html?total_num=8&locator_key=id&value=3</test_script_entry>
- </description>
- </testcase>
- <testcase component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" id="Touch_screenY_exist" purpose="Check if the Touch.screenY attribute exists">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/Touch_attributes_exist.html?total_num=8&locator_key=id&value=4</test_script_entry>
- </description>
- </testcase>
- <testcase component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" id="Touch_clientX_exist" purpose="Check if the Touch.clientX attribute exists">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/Touch_attributes_exist.html?total_num=8&locator_key=id&value=5</test_script_entry>
- </description>
- </testcase>
- <testcase component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" id="Touch_clientY_exist" purpose="Check if the Touch.clientY attribute exists">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/Touch_attributes_exist.html?total_num=8&locator_key=id&value=6</test_script_entry>
- </description>
- </testcase>
- <testcase component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" id="Touch_pageX_exist" purpose="Check if the Touch.pageX attribute exists">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/Touch_attributes_exist.html?total_num=8&locator_key=id&value=7</test_script_entry>
- </description>
- </testcase>
- <testcase component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" id="Touch_pageY_exist" purpose="Check if the Touch.pageY attribute exists">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/Touch_attributes_exist.html?total_num=8&locator_key=id&value=8</test_script_entry>
- </description>
- </testcase>
- <testcase component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" id="TouchList_item_exist" purpose="Check if the TouchList.item method exists">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/TouchList_attributes_exist.html?total_num=2&locator_key=id&value=1</test_script_entry>
- </description>
- </testcase>
- <testcase component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="auto" id="TouchList_length_exist" purpose="Check if the TouchList.length attribute exists">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/TouchList_attributes_exist.html?total_num=2&locator_key=id&value=2</test_script_entry>
- </description>
- </testcase>
<testcase component="W3C_HTML5 APIs/Device/Touch Events version 1 (Partial)" execution_type="manual" id="multitouch_mousedown_event" purpose="Check if touchstart event is dispatched before any mouse event during multiple touches">
<description>
<pre_condition>Test device supports touch.</pre_condition>
<test_script_entry test_script_expected_result="0">/opt/tct-touchevent-w3c-tests/touchevent/w3c/multi-touch.html?total_num=6&locator_key=id&value=4</test_script_entry>
</description>
</testcase>
- <testcase component="W3C_HTML5 APIs/Device/Touch Events version 1" execution_type="auto" id="create-touch-touchlist" purpose="Test createTouch creates Touch object with requested properties">
- <description>
- <test_script_entry>/opt/tct-touchevent-w3c-tests/touchevent/w3c/create-touch-touchlist.html</test_script_entry>
- </description>
- </testcase>
</set>
</suite>
</test_definition>
+++ /dev/null
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Xin,Liu <xinx.liu@intel.com>
-
--->
-
-<html>
- <head>
- <title>TouchEvent test: Touch_attributes_exist</title>
- <link rel="author" title="Intel" href="http://www.intel.com/" />
- <link rel="help" href="http://www.w3.org/TR/2013/WD-touch-events-20130124/#idl-def-Touch" />
- <meta name="flags" content="" />
- <meta name="assert" content="Check that the Touch attributes are implemented as specified for existence" />
- <script src="../resources/testharness.js" type="text/javascript"></script>
- <script src="../resources/testharnessreport.js" type="text/javascript"></script>
- </head>
- <body >
- <div id='touchdiv'>
- </div>
- <div id="log"></div>
- <script type="text/javascript">
- var target = document.getElementById("touchdiv");
- var touch = document.createTouch(window, target, 1, 100, 101, 102, 103, 5, 3, 10, 10);
-
- test(function() {
- assert_true("identifier" in touch, "identifier attribute in Touch element");
- }, "Check if the Touch.identifier attribute exists");
-
- test(function() {
- assert_true("target" in touch, "target attribute in Touch element");
- }, "Check if the Touch.target attribute exists");
-
- test(function() {
- assert_true("screenX" in touch, "screenX attribute in Touch element");
- }, "Check if the Touch.screenX attribute exists");
-
- test(function() {
- assert_true("screenY" in touch, "screenY attribute in Touch element");
- }, "Check if the Touch.screenY attribute exists");
-
- test(function() {
- assert_true("clientX" in touch, "clientX attribute in Touch element");
- }, "Check if the Touch.clientX attribute exists");
-
- test(function() {
- assert_true("clientY" in touch, "clientY attribute in Touch element");
- }, "Check if the Touch.clientY attribute exists");
-
- test(function() {
- assert_true("pageX" in touch, "pageX attribute in Touch element");
- }, "Check if the Touch.pageX attribute exists");
-
- test(function() {
- assert_true("pageY" in touch, "pageY attribute in Touch element");
- }, "Check if the Touch.pageY attribute exists");
- </script>
- </body>
-</html>
+++ /dev/null
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Liu,Xin <xinx.liu@intel.com>
-
--->
-
-<html>
- <head>
- <title>TouchEvent Test: document_createTouchList_exist</title>
- <link rel="author" title="Intel" href="http://www.intel.com/" />
- <link rel="help" href="http://www.w3.org/TR/2013/WD-touch-events-20130124/#extensions-to-the-document-interface" />
- <meta name="flags" content="" />
- <meta name="assert" content="Check if the interface createTouchList exists" />
- <script src="../resources/testharness.js" type="text/javascript"></script>
- <script src="../resources/testharnessreport.js" type="text/javascript"></script>
- <script src="support/testinterface.js" type="text/javascript"></script>
- </head>
- <body>
- <div id="log"></div>
- <script>
- //==== PRIORITY P0
-
- test(function (){
- assert_true(check("createTouchList", document), "document.createTouchList method exists");
- }, "Check if the interface createTouchList exists");
- </script>
- </body>
-</html>
+++ /dev/null
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Cui,Jieqiong <jieqiongx.cui@intel.com>
-
--->
-
-<html>
- <head>
- <title>TouchEvent Test: document_createTouch_exist</title>
- <link rel="author" title="Intel" href="http://www.intel.com/" />
- <link rel="help" href="http://www.w3.org/TR/2013/WD-touch-events-20130124/#extensions-to-the-document-interface" />
- <meta name="flags" content="" />
- <meta name="assert" content="Check if the interface createTouch exists" />
- <script src="../resources/testharness.js" type="text/javascript"></script>
- <script src="../resources/testharnessreport.js" type="text/javascript"></script>
- <script src="support/testinterface.js" type="text/javascript"></script>
- </head>
- <body>
- <div id="log"></div>
- <script>
- //==== PRIORITY P0
-
- test(function () {
- assert_true(check("createTouch", document), "createTouch method missing in document");
- }, "Check if the interface createTouch exists");
- </script>
- </body>
-</html>
+++ /dev/null
-<!DOCTYPE HTML>
-<html>
-<!--
- Test cases for Touch Events v1 Recommendation
- http://www.w3.org/TR/touch-events/
-
- These tests are based on Mozilla-Nokia-Google's single-touch tests.
-
- The primary purpose of the tests in this document is checking that the createTouch and
- createTouchList interfaces of the Touch Events APIs are correctly implemented.
- Other interactions are covered in other test files.
-
- This document references Test Assertions (abbrev TA below) written by Cathy Chan
- http://www.w3.org/2010/webevents/wiki/TestAssertions
--->
-
-<head>
-<title>Touch Events createTouch and createTouchList Interface Tests</title>
-<meta name="viewport" content="width=device-width">
-<script src="../../resources/testharness.js"></script>
-<script>
- setup({explicit_done: true});
-
- // Check a Touch object's atttributes for existence and correct type
- // TA: 1.1.2, 1.1.3
- function check_Touch_object (t) {
- test(function() {
- assert_equals(Object.prototype.toString.call(t), "[object Touch]", "touch is of type Touch");
- }, "touch point is a Touch object");
- [
- ["long", "identifier"],
- ["EventTarget", "target"],
- ["long", "screenX"],
- ["long", "screenY"],
- ["long", "clientX"],
- ["long", "clientY"],
- ["long", "pageX"],
- ["long", "pageY"],
- ].forEach(function(attr) {
- var type = attr[0];
- var name = attr[1];
-
- // existence check
- test(function() {
- assert_true(name in t, name + " attribute in Touch object");
- }, "Touch." + name + " attribute exists");
-
- // type check
- switch(type) {
- case "long":
- test(function() {
- assert_equals(typeof t[name], "number", name + " attribute of type long");
- }, "Touch." + name + " attribute is of type number (long)");
- break;
- case "EventTarget":
- // An event target is some type of Element
- test(function() {
- assert_true(t[name] instanceof Element, "EventTarget must be an Element.");
- }, "Touch." + name + " attribute is of type Element");
- break;
- default:
- break;
- }
- });
- }
-
- // Check a TouchList object's attributes and methods for existence and proper type
- // Also make sure all of the members of the list are Touch objects
- // TA: 1.2.1, 1.2.2, 1.2.5, 1.2.6
- function check_TouchList_object (tl) {
- test(function() {
- assert_equals(Object.prototype.toString.call(tl), "[object TouchList]", "touch list is of type TouchList");
- }, "touch list is a TouchList object");
- [
- ["unsigned long", "length"],
- ["function", "item"],
- ].forEach(function(attr) {
- var type = attr[0];
- var name = attr[1];
-
- // existence check
- test(function() {
- assert_true(name in tl, name + " attribute in TouchList");
- }, "TouchList." + name + " attribute exists");
-
- // type check
- switch(type) {
- case "unsigned long":
- test(function() {
- assert_equals(typeof tl[name], "number", name + " attribute of type long");
- }, "TouchList." + name + " attribute is of type number (unsigned long)");
- break;
- case "function":
- test(function() {
- assert_equals(typeof tl[name], "function", name + " attribute of type function");
- }, "TouchList." + name + " attribute is of type function");
- break;
- default:
- break;
- }
- });
- // Each member of tl should be a proper Touch object
- for (var i=0; i < tl.length; i++) {
- check_Touch_object(tl.item(i));
- }
- // TouchList.item(x) should return null if x is >= TouchList.length
- test(function() {
- var t = tl.item(tl.length);
- assert_equals(t, null, "TouchList.item(TouchList.length) must return null");
- }, "TouchList.item returns null if the index is >= the length of the list");
- }
-
- function check_touch_clientXY(touch) {
- assert_equals(touch.clientX, touch.pageX - window.pageXOffset, "touch.clientX is touch.pageX - window.pageXOffset.");
- assert_equals(touch.clientY, touch.pageY - window.pageYOffset, "touch.clientY is touch.pageY - window.pageYOffset.");
- }
-
- function run() {
- var target0 = document.getElementById("target0");
- var touch1, touch2;
-
- test(function() {
- touch1 = document.createTouch(window, target0, 42, 15, 20, 35, 40);
- assert_equals(touch1.target, target0, "touch.target is target0");
- assert_equals(touch1.identifier, 42, "touch.identifier is requested value");
- assert_equals(touch1.pageX, 15, "touch.pageX is requested value");
- assert_equals(touch1.pageY, 20, "touch.pageY is requested value");
- check_touch_clientXY(touch1);
- assert_equals(touch1.screenX, 35, "touch.screenX is requested value");
- assert_equals(touch1.screenY, 40, "touch.screenY is requested value");
- }, "document.createTouch exists and creates a Touch object with requested properties");
-
- touch2 = document.createTouch(window, target0, 44, 25, 30, 45, 50);
-
- var touchList;
-
- test(function() {
- touchList = document.createTouchList();
- assert_equals(touchList.length, 0, "touchList.length is 0");
- }, "document.createTouchList exists and correctly creates a TouchList from zero Touch objects");
-
- if (touchList)
- check_TouchList_object(touchList);
-
- test(function() {
- touchList = document.createTouchList(touch1);
- assert_equals(touchList.length, 1, "touchList.length is 1");
- assert_equals(touchList.item(0), touch1, "touchList.item(0) is input touch1");
- }, "document.createTouchList exists and correctly creates a TouchList from a single Touch");
-
- if (touchList)
- check_TouchList_object(touchList);
-
- test(function() {
- touchList = document.createTouchList(touch1, touch2);
- assert_equals(touchList.length, 2, "touchList.length is 2");
- assert_equals(touchList.item(0), touch1, "touchList.item(0) is input touch1");
- assert_equals(touchList.item(1), touch2, "touchList.item(1) is input touch2");
- }, "document.createTouchList exists and correctly creates a TouchList from two Touch objects");
-
- if (touchList)
- check_TouchList_object(touchList);
-
- target0.innerHTML = "Test complete."
- done();
- }
-</script>
-<style>
- div {
- margin: 0em;
- padding: 2em;
- }
- #target0 {
- background: yellow;
- border: 1px solid orange;
- }
-</style>
-</head>
-<body onload="run()">
- <h1>Touch Events: createTouch and createTouchList tests</h1>
- <div id="target0">Please wait for test to complete...</div>
- <div id="log"></div>
-</body>
-</html>