--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 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:
+ Xinx, liu <xinx.liu@intel.com>
+ Peng,keli <kelix.peng@intel.com>
+
+-->
+<html>
+ <head>
+ <title>Screen Test:Screen_lockOrientation_parameter_not_in_allowed_orientations</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-screen-orientation-20120522/#extensions-to-the-screen-interface" />
+ <meta name="flags" content="interact" />
+ <meta name="assert" content="Check the method lockOrientation of interface Screen when parameter is not in allowed orientations" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ <script src="../resources/blacklist.js" type="text/javascript"></script>
+ </head>
+ <body>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var allowed_orientations = new Array("portrait","landscape","portrait-primary","portrait-secondary","landscape-primary","landscape-secondary")
+ function show() {
+ try {
+ var orientation="dsdsf";
+ //parameter orientation not in allowed_orientations
+ var aa=screen.lockOrientation(orientation);
+ t.step(function () {
+ assert_true(aa == false,"Check the method lockOrientation of interface Screen when parameter is not in allowed orientations");
+ });
+ t.done();
+ } catch (err) {
+ t.step(function () {
+ assert_true(err.name == "NOT_SUPPORTED_ERROR","Mark the case as \"PASS\" because the platform actually doesn't support the interface");
+ });
+ t.done();
+ }
+ }
+ show();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 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:
+ Xinx, liu <xinx.liu@intel.com>
+ Peng,keli <kelix.peng@intel.com>
+
+-->
+<html>
+ <head>
+ <title>Screen Test:Screen_lockOrientation_parameter_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-screen-orientation-20120522/#extensions-to-the-screen-interface" />
+ <meta name="flags" content="interact" />
+ <meta name="assert" content="Check the method lockOrientation of interface Screen when parameter is null" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ <script src="../resources/blacklist.js" type="text/javascript"></script>
+ </head>
+ <body>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ //var current_orientation = new Array("portrait-primary","portrait-secondary","landscape-primary","landscape-secondary")
+ function show() {
+ try {
+ try{
+ var aa=screen.lockOrientation();
+ t.step(function () {
+ assert_true(aa == false,"Check the method lockOrientation of interface Screen when parameter is null");
+ });
+ t.done();
+ }catch(err){
+ t.step(function () {
+ assert_true(true,"This may throws exe");
+ });
+ t.done();
+ }
+ } catch (err) {
+ t.step(function () {
+ assert_true(err.name == "NOT_SUPPORTED_ERROR","Mark the case as \"PASS\" because the platform actually doesn't support the interface");
+ });
+ t.done();
+ }
+ }
+ screen.addEventListener("orientationchange", show, false);
+ show();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 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:
+ Xinx, liu <xinx.liu@intel.com>
+ Peng,keli <kelix.peng@intel.com>
+
+-->
+<html>
+ <head>
+ <title>Screen Test:Screen_lockOrientation_parameter_right </title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-screen-orientation-20120522/#extensions-to-the-screen-interface" />
+ <meta name="flags" content="interact" />
+ <meta name="assert" content="Check the method lockOrientation of interface Screen when parameter is rigth" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ <script src="../resources/blacklist.js" type="text/javascript"></script>
+ </head>
+ <body>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var allowed_orientations = new Array("portrait","landscape","portrait-primary","portrait-secondary","landscape-primary","landscape-secondary")
+ function show() {
+ try {
+ var orientation=screen.orientation;
+ var param;
+ for(var i=0;i<allowed_orientations.length;i++){
+ if(allowed_orientations[i] == orientation){
+ param=allowed_orientations[i];
+ break;
+ }
+ }
+ var aa=screen.lockOrientation(param);
+ t.step(function () {
+ assert_true(aa == true,"Check the method lockOrientation of interface Screen when parameter is rigth");
+ });
+ t.done();
+ } catch (err) {
+ t.step(function () {
+ assert_true(err.name == "NOT_SUPPORTED_ERROR","Mark the case as \"PASS\" because the platform actually doesn't support the interface");
+ });
+ t.done();
+ }
+ }
+ screen.addEventListener("orientationchange", show, false);
+ show();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 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:
+ Xinx, liu <xinx.liu@intel.com>
+ Peng,keli <kelix.peng@intel.com>
+
+-->
+<html>
+ <head>
+ <title>Screen Test:Screen_lockOrientation_return_type</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-screen-orientation-20120522/#extensions-to-the-screen-interface" />
+ <meta name="flags" content="interact" />
+ <meta name="assert" content="Check the method lockOrientation of interface Screen return type" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ <script src="../resources/blacklist.js" type="text/javascript"></script>
+ </head>
+ <body>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ //var current_orientation = new Array("portrait-primary","portrait-secondary","landscape-primary","landscape-secondary")
+ function show() {
+ try {
+ var aa=screen.lockOrientation(screen.orientation);
+ var type = typeof aa ;
+ t.step(function () {
+ assert_true(type == "boolean","Check the method lockOrientation of interface Screen return type");
+ });
+ t.done();
+ } catch (err) {
+ t.step(function () {
+ assert_true(err.name == "NOT_SUPPORTED_ERROR","Mark the case as \"PASS\" because the platform actually doesn't support the interface");
+ });
+ t.done();
+ }
+ }
+ show();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 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:
+ Xinx, liu <xinx.liu@intel.com>
+ Peng,keli <kelix.peng@intel.com>
+
+-->
+<html>
+ <head>
+ <title>Screen Test:Screen_onorientationchange_return_type</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-screen-orientation-20120522/#extensions-to-the-screen-interface" />
+ <meta name="flags" content="interact" />
+ <meta name="assert" content="Check the attribute onorientationchange of interface Screen return type" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ <script src="../resources/blacklist.js" type="text/javascript"></script>
+ </head>
+ <body>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ function show() {
+ try {
+ var type = typeof screen.onorientationchange;
+ t.step(function () {
+ if(type=="function"||type=="object"){
+ assert_true(true,"Check the attribute onorientationchange of interface Screen return type");
+ }
+ });
+ t.done();
+ } catch (err) {
+ t.step(function () {
+ assert_true(err.name == "NOT_SUPPORTED_ERROR","Mark the case as \"PASS\" because the platform actually doesn't support the interface");
+ });
+ t.done();
+ }
+ }
+ show();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 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:
+ Xinx, liu <xinx.liu@intel.com>
+ Peng,keli <kelix.peng@intel.com>
+
+-->
+<html>
+ <head>
+ <title>Screen Test:Screen_orientation_in_currentorientation</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-screen-orientation-20120522/#extensions-to-the-screen-interface" />
+ <meta name="flags" content="interact" />
+ <meta name="assert" content="Check the attribute orientation value of interface Screen must in current orientation" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ <script src="../resources/blacklist.js" type="text/javascript"></script>
+ </head>
+ <body>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var current_orientation = new Array("portrait-primary","portrait-secondary","landscape-primary","landscape-secondary")
+ function show() {
+ try {
+ t.step(function () {
+ if(current_orientation.toString().indexOf(screen.orientation) > -1) {
+ assert_true(true,"Check the attribute orientation value of interface Screen must in current orientation");
+ }else{
+ assert_true(false,"The attribute orientation value of interface Screen not in current orientation");
+ }
+ });
+ t.done();
+ } catch (err) {
+ t.step(function () {
+ assert_true(err.name == "NOT_SUPPORTED_ERROR","Mark the case as \"PASS\" because the platform actually doesn't support the interface");
+ });
+ t.done();
+ }
+ }
+ show();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 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:
+ Xinx, liu <xinx.liu@intel.com>
+ Peng,keli <kelix.peng@intel.com>
+
+-->
+<html>
+ <head>
+ <title>Screen Test:Screen_orientation_readonly</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-screen-orientation-20120522/#extensions-to-the-screen-interface" />
+ <meta name="flags" content="interact" />
+ <meta name="assert" content="Check if the attribute orientation value of interface Screen is readonly" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ <script src="../resources/blacklist.js" type="text/javascript"></script>
+ </head>
+ <body>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ function show() {
+ try {
+ screen.orientation = "aaa";
+ t.step(function () {
+ if(screen.orientation == "aaa"){
+ assert_true(false,"the attribute orientation of interface Screen must be readonly");
+ }else{
+ assert_true(true,"the attribute orientation of interface Screen is readonly");
+ }
+ });
+ t.done();
+ } catch (err) {
+ t.step(function () {
+ assert_true(err.name == "NOT_SUPPORTED_ERROR","Mark the case as \"PASS\" because the platform actually doesn't support the interface");
+ });
+ t.done();
+ }
+ }
+ //screen.addEventListener("orientationchange", show, false);
+ show();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 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:
+ Xinx, liu <xinx.liu@intel.com>
+ Peng,keli <kelix.peng@intel.com>
+
+-->
+<html>
+ <head>
+ <title>Screen Test:Screen_orientation_return_type</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-screen-orientation-20120522/#extensions-to-the-screen-interface" />
+ <meta name="flags" content="interact" />
+ <meta name="assert" content="Check the attribute orientation of interface Screen return type" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ <script src="../resources/blacklist.js" type="text/javascript"></script>
+ </head>
+ <body>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ function show() {
+ try {
+ var type = typeof screen.orientation ;
+ t.step(function () {
+ assert_true(type == "string","Check the attribute orientation of interface Screen return type");
+ });
+ t.done();
+ } catch (err) {
+ t.step(function () {
+ assert_true(err.name == "NOT_SUPPORTED_ERROR","Mark the case as \"PASS\" because the platform actually doesn't support the interface");
+ });
+ t.done();
+ }
+ }
+ //screen.addEventListener("orientationchange", show, false);
+ show();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 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:
+ Xinx, liu <xinx.liu@intel.com>
+ Peng,keli <kelix.peng@intel.com>
+
+-->
+<html>
+ <head>
+ <title>Screen Test:Screen_unlockOrientation_base </title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-screen-orientation-20120522/#extensions-to-the-screen-interface" />
+ <meta name="flags" content="interact" />
+ <meta name="assert" content="Check the method unlockOrientation of interface Screen " />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ <script src="../resources/blacklist.js" type="text/javascript"></script>
+ </head>
+ <body>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var allowed_orientations = new Array("portrait","landscape","portrait-primary","portrait-secondary","landscape-primary","landscape-secondary")
+ function show() {
+ try {
+ var orientation=screen.orientation;
+ var param;
+ for(var i=0;i<allowed_orientations.length;i++){
+ if(allowed_orientations[i] == orientation){
+ param=allowed_orientations[i];
+ break;
+ }
+ }
+ var aa=screen.lockOrientation(param);
+ screen.unlockOrientation();
+ t.step(function () {
+ assert_true(screen.orientation == param,"Check the method unlockOrientation of interface Screen");
+ });
+ t.done();
+ } catch (err) {
+ t.step(function () {
+ assert_true(err.name == "NOT_SUPPORTED_ERROR","Mark the case as \"PASS\" because the platform actually doesn't support the interface");
+ });
+ t.done();
+ }
+ }
+ screen.addEventListener("orientationchange", show, false);
+ show();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
</spec>
</specs>
</testcase>
+ <testcase purpose="Check the method lockOrientation of interface Screen when parameter is not in allowed orientations" type="compliance" status="approved" component="WebAPI/Device/The Screen Orientation API" execution_type="auto" priority="P2" id="Screen_lockOrientation_parameter_not_in_allowed_orientations">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Check the method lockOrientation of interface Screen when parameter is not in allowed orientations</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/tct-screenorientation-w3c-tests/screenorientation/Screen_lockOrientation_parameter_not_in_allowed_orientations.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="lockOrientation" interface="Screen" specification="The Screen Orientation API" section="Device" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-screen-orientation-20120522/#extensions-to-the-screen-interface</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check the method lockOrientation of interface Screen when parameter is null" type="compliance" status="approved" component="WebAPI/Device/The Screen Orientation API" execution_type="auto" priority="P2" id="Screen_lockOrientation_parameter_null">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Check the method lockOrientation of interface Screen when parameter is null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/tct-screenorientation-w3c-tests/screenorientation/Screen_lockOrientation_parameter_null.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="lockOrientation" interface="Screen" specification="The Screen Orientation API" section="Device" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-screen-orientation-20120522/#extensions-to-the-screen-interface</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check the method lockOrientation of interface Screen when parameter is rigth" type="compliance" status="approved" component="WebAPI/Device/The Screen Orientation API" execution_type="auto" priority="P2" id="Screen_lockOrientation_parameter_rigth">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Check the method lockOrientation of interface Screen when parameter is rigth</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/tct-screenorientation-w3c-tests/screenorientation/Screen_lockOrientation_parameter_rigth.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="lockOrientation" interface="Screen" specification="The Screen Orientation API" section="Device" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-screen-orientation-20120522/#extensions-to-the-screen-interface</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check the method lockOrientation of interface Screen return type" type="compliance" status="approved" component="WebAPI/Device/The Screen Orientation API" execution_type="auto" priority="P2" id="Screen_lockOrientation_return_type">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Check the method lockOrientation of interface Screen return type</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/tct-screenorientation-w3c-tests/screenorientation/Screen_lockOrientation_return_type.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="lockOrientation" interface="Screen" specification="The Screen Orientation API" section="Device" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-screen-orientation-20120522/#extensions-to-the-screen-interface</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check the attribute onorientationchange of interface Screen return type" type="compliance" status="approved" component="WebAPI/Device/The Screen Orientation API" execution_type="auto" priority="P2" id="Screen_onorientationchange_return_type">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Check the attribute onorientationchange of interface Screen return type</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/tct-screenorientation-w3c-tests/screenorientation/Screen_onorientationchange_return_type.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="onorientationchange" interface="Screen" specification="The Screen Orientation API" section="Device" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-screen-orientation-20120522/#extensions-to-the-screen-interface</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check the attribute orientation value of interface Screen must in current orientation" type="compliance" status="approved" component="WebAPI/Device/The Screen Orientation API" execution_type="auto" priority="P2" id="Screen_orientation_in_currentorientation">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Check the attribute orientation value of interface Screen must in current orientation</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/tct-screenorientation-w3c-tests/screenorientation/Screen_orientation_in_currentorientation.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="orientation" interface="Screen" specification="The Screen Orientation API" section="Device" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-screen-orientation-20120522/#extensions-to-the-screen-interface</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute orientation value of interface Screen is readonly" type="compliance" status="approved" component="WebAPI/Device/The Screen Orientation API" execution_type="auto" priority="P2" id="Screen_orientation_readonly">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute orientation value of interface Screen is readonly</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/tct-screenorientation-w3c-tests/screenorientation/Screen_orientation_readonly.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="orientation" interface="Screen" specification="The Screen Orientation API" section="Device" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-screen-orientation-20120522/#extensions-to-the-screen-interface</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check the attribute orientation of interface Screen return type" type="compliance" status="approved" component="WebAPI/Device/The Screen Orientation API" execution_type="auto" priority="P2" id="Screen_orientation_return_type">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Check the attribute orientation of interface Screen return type</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/tct-screenorientation-w3c-tests/screenorientation/Screen_orientation_return_type.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="orientation" interface="Screen" specification="The Screen Orientation API" section="Device" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-screen-orientation-20120522/#extensions-to-the-screen-interface</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check the method unlockOrientation of interface Screen" type="compliance" status="approved" component="WebAPI/Device/The Screen Orientation API" execution_type="auto" priority="P2" id="Screen_unlockOrientation_base">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Check the method unlockOrientation of interface Screen</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/tct-screenorientation-w3c-tests/screenorientation/Screen_unlockOrientation_base.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="unlockOrientation" interface="Screen" specification="The Screen Orientation API" section="Device" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-screen-orientation-20120522/#extensions-to-the-screen-interface</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
</set>
</suite>
</test_definition>