--- /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:
+ Yu, XiaoyanX <xiaoyanx.yu@intel.com>
+ Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+Revision history:
+Date Author Description
+08-29-2012 Yu, XiaoyanX <xiaoyanx.yu@intel.com> case creation
+
+-->
+
+<html>
+ <head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+ <title>check if FrameRquestCallback ignores optional passed arguments</title>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <link rel="stylesheet" href="../resources/testharness.css" />
+ </head>
+ <body>
+ <div id="log"></div>
+ <script>
+ setup({timeout:500});
+ var t = async_test("check if FrameRquestCallback ignores optional passed arguments");
+ var reqAnimAPI = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || oRequestAnimationFrame;
+ try{
+ reqAnimAPI(CallbackOptArgs, "foo");
+ }catch(e){
+ t.step(function() {
+ assert_true(false, "The browser does not support requestAnimationFrame method");
+ });
+ t.done();
+ }
+
+ function CallbackOptArgs(timestamp, arg){
+ t.step(function() {
+ assert_true(arg == undefined, "ignores optional passed arguments");
+ });
+ t.done();
+ }
+ </script>
+ </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:
+ Yu, XiaoyanX <xiaoyanx.yu@intel.com>
+ HaoYunfen <yunfenx.hao@intel.com>
+ Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+-->
+<html>
+ <head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+ <title>Multiple callback registrations occur</title>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <link rel="stylesheet" href="../resources/testharness.css" />
+ </head>
+ <body>
+ <div id="log"></div>
+ <script>
+ setup({timeout:500});
+ var t = async_test("Multiple same callback registrations occur.Callback 4 of 4");
+ var reqAnimAPI = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || oRequestAnimationFrame;
+ var multCallbackCount=4;
+ var callbackCount=0;
+ var expCallbackCount=4;
+
+ try {
+ for(var i = 0; i < multCallbackCount; i++){
+ reqAnimAPI(callback);
+ }
+ reqAnimAPI(CallbackOptArgs);
+ } catch(e) {
+ t.step(function() {
+ assert_true(false, "The browser does not support requestAnimationFrame method");
+ });
+ t.done();
+ }
+ function CallbackOptArgs(timestamp){
+ t.step(function() {
+ assert_true(callbackCount==expCallbackCount, "Multiple same callback registrations occur");
+ });
+ t.done();
+ }
+ function callback(time){
+ callbackCount++;
+ }
+ </script>
+ </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:
+ Yu, XiaoyanX <xiaoyanx.yu@intel.com>
+ Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+Revision history:
+Date Author Description
+08-29-2012 Yu, XiaoyanX <xiaoyanx.yu@intel.com> case creation
+
+-->
+
+<html>
+ <head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+ <title>Check whether FrameRequestCallback contains a valid timestamp</title>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <link rel="stylesheet" href="../resources/testharness.css" />
+ </head>
+ <body>
+ <div id="log"></div>
+ <script>
+ setup({timeout:500});
+ var t = async_test("Check whether FrameRequestCallback contains a valid timestamp");
+ var reqAnimAPI = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || oRequestAnimationFrame;
+ try{
+ reqAnimAPI(Callback);
+ }catch(e){
+ t.step(function() {
+ assert_true(false,"The browser does not support requestAnimationFrame method");
+ });
+ t.done();
+ }
+ function Callback(timestamp)
+ {
+ //Check that requestAnimationFrame has a timestamp
+ var callbackTime = new Date(timestamp);
+ var msg = "FrameRequestCallback contains a valid timestamp: " + callbackTime.toTimeString();
+
+ t.step(function() {
+ assert_not_equals(callbackTime.valueOf(), NaN, msg);
+ });
+ t.done();
+ }
+ </script>
+ </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:
+ Yu, XiaoyanX <xiaoyanx.yu@intel.com>
+ Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+-->
+
+<html>
+ <head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+ <title>Check whether window.cancelRequestAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelAnimationFrame || window.msCancelAnimationFrame || window.oCancelAnimationFrame; can be used normally with invalid parameter boolean</title>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <link rel="stylesheet" href="../resources/testharness.css" />
+ <script type="text/javascript" src="w3c/paintnotificationharness.js"></script>
+ </head>
+ <body onload="start()">
+ <p>PASS If a red box moves from left to right, when click "Stop" button, the red box won't stop </p>
+ <p>FAIL If screen displays no animation or animation stops when click "Stop" button</p>
+ <div id="log"></div>
+ <script>
+ var reqAnimAPI = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || oRequestAnimationFrame;
+ var cancelAnimAPI = window.cancelRequestAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelAnimationFrame || window.msCancelAnimationFrame || window.oCancelAnimationFrame;;
+ var requestId = 0;
+ var handle=true;
+ function animate(time) {
+ document.getElementById("animated").style.left =
+ (time - animationStartTime) % 2000 / 4 + "px";
+ requestId = reqAnimAPI(animate);
+ }
+ function start() {
+ animationStartTime = Date.now();
+ requestId =reqAnimAPI(animate);
+ }
+ function stop() {
+ if (requestId)
+ cancelAnimAPI(handle);
+ requestId=0;
+ }
+ </script>
+ <button onclick="stop()">Stop</button>
+ <div id="animated" style="position: absolute; left: 10px; padding: 50px;
+ background: crimson; color: white"></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:
+ Yu, XiaoyanX <xiaoyanx.yu@intel.com>
+ Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+-->
+
+<html>
+ <head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+ <title>Check whether window.cancelRequestAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelAnimationFrame || window.msCancelAnimationFrame || window.oCancelAnimationFrame; can be used normally with invalid parameter negative number</title>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <link rel="stylesheet" href="../resources/testharness.css" />
+ <script type="text/javascript" src="w3c/paintnotificationharness.js"></script>
+ </head>
+ <body onload="start()">
+ <p>PASS If a red box moves from left to right, when click "Stop" button, the red box won't stop </p>
+ <p>FAIL If screen displays no animation or animation stops when click "Stop" button</p>
+ <div id="log"></div>
+ <script>
+ var reqAnimAPI = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || oRequestAnimationFrame;
+ var cancelAnimAPI = window.cancelRequestAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelAnimationFrame || window.msCancelAnimationFrame || window.oCancelAnimationFrame;;
+ var requestId = 0;
+ var handle=-10;
+ function animate(time) {
+ document.getElementById("animated").style.left =
+ (time - animationStartTime) % 2000 / 4 + "px";
+ requestId =reqAnimAPI(animate);
+ }
+ function start() {
+ animationStartTime = Date.now();
+ requestId =reqAnimAPI(animate);
+ }
+ function stop() {
+ cancelAnimAPI(handle);
+ }
+ </script>
+ <button onclick="stop()">Stop</button>
+ <div id="animated" style="position: absolute; left: 10px; padding: 50px;
+ background: crimson; color: white"></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:
+ Yu, XiaoyanX <xiaoyanx.yu@intel.com>
+ Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+-->
+
+<html>
+ <head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+ <title>Check whether window.cancelRequestAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelAnimationFrame || window.msCancelAnimationFrame || window.oCancelAnimationFrame; can be used normally with invalid parameter string</title>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <link rel="stylesheet" href="../resources/testharness.css" />
+ <script type="text/javascript" src="w3c/paintnotificationharness.js"></script>
+ </head>
+ <body onload="start()">
+ <p>PASS If a red box moves from left to right, when click "Stop" button, the red box won't stop </p>
+ <p>FAIL If screen displays no animation or animation stops when click "Stop" button</p>
+ <div id="log"></div>
+ <script>
+ var reqAnimAPI = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || oRequestAnimationFrame;
+ var cancelAnimAPI = window.cancelRequestAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelAnimationFrame || window.msCancelAnimationFrame || window.oCancelAnimationFrame;;
+ var requestId = 0;
+ var handle="abc";
+ function animate(time) {
+ document.getElementById("animated").style.left =
+ (time - animationStartTime) % 2000 / 4 + "px";
+ requestId =reqAnimAPI(animate);
+ }
+ function start() {
+ animationStartTime = Date.now();
+ requestId =reqAnimAPI(animate);
+ }
+ function stop() {
+ cancelAnimAPI(handle);
+ }
+ </script>
+ <button onclick="stop()">Stop</button>
+ <div id="animated" style="position: absolute; left: 10px; padding: 50px;
+ background: crimson; color: white"></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:
+ Yu, XiaoyanX <xiaoyanx.yu@intel.com>
+ Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+-->
+
+<html>
+ <head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+ <title>Check whether window.cancelRequestAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelAnimationFrame || window.msCancelAnimationFrame || window.oCancelAnimationFrame; can be used normally with invalid parameter undefined</title>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <link rel="stylesheet" href="../resources/testharness.css" />
+ <script type="text/javascript" src="w3c/paintnotificationharness.js"></script>
+ </head>
+ <body onload="start()">
+ <p>PASS If a red box moves from left to right, when click "Stop" button, the red box won't stop </p>
+ <p>FAIL If screen displays no animation or animation stops when click "Stop" button</p>
+ <div id="log"></div>
+ <script>
+ var reqAnimAPI = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || oRequestAnimationFrame;
+ var cancelAnimAPI = window.cancelRequestAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelAnimationFrame || window.msCancelAnimationFrame || window.oCancelAnimationFrame;;
+ var requestId = 0;
+ function animate(time) {
+ document.getElementById("animated").style.left =
+ (time - animationStartTime) % 2000 / 4 + "px";
+ requestId =reqAnimAPI(animate);
+ }
+ function start() {
+ animationStartTime = Date.now();
+ requestId =reqAnimAPI(animate);
+ }
+ function stop() {
+ cancelAnimAPI(undefined);
+ }
+ </script>
+ <button onclick="stop()">Stop</button>
+ <div id="animated" style="position: absolute; left: 10px; padding: 50px;
+ background: crimson; color: white"></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:
+ Yu, XiaoyanX <xiaoyanx.yu@intel.com>
+ Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+-->
+
+<html>
+ <head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+ <title>Check window.cancelRequestAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelAnimationFrame || window.msCancelAnimationFrame || window.oCancelAnimationFrame; can be called normally with the parameter returned by window.webkitRequestAnimationFrame</title>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <link rel="stylesheet" href="../resources/testharness.css" />
+ <script type="text/javascript" src="w3c/paintnotificationharness.js"></script>
+ </head>
+ <body onload="start()">
+ <p>PASS If a red box moves from left to right, when click the "Stop" buttonthe red box should stop</p>
+ <p>FAIL If screen deosn't have any animation or red box won't stop when clicks the "Stop" button</p>
+ <div id="log"></div>
+ <script>
+ var reqAnimAPI = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || oRequestAnimationFrame;
+ var cancelAnimAPI = window.cancelRequestAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelAnimationFrame || window.msCancelAnimationFrame || window.oCancelAnimationFrame;;
+ var requestId = 0;
+ function animate(time) {
+ document.getElementById("animated").style.left =
+ (time - animationStartTime) % 2000 / 4 + "px";
+ requestId = reqAnimAPI(animate);
+ }
+ function start() {
+ animationStartTime = Date.now();
+ requestId =reqAnimAPI(animate);
+ }
+ function stop() {
+ if (requestId)
+ cancelAnimAPI(requestId);
+ requestId=0;
+ }
+ </script>
+ <button onclick="stop()">Stop</button>
+ <div id="animated" style="position: absolute; left: 10px; padding: 50px;
+ background: crimson; color: white"></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:
+ Yu, XiaoyanX <xiaoyanx.yu@intel.com>
+ HaoYunfen <yunfenx.hao@intel.com>
+ Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+-->
+<html>
+ <head>
+ <title>Check whether window.webkitRequestAnimationFrame accepts inline script</title>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script>
+ setup({timeout:500});
+ var t = async_test("Check whether window.webkitRequestAnimationFrame accepts inline script");
+ var reqAnimAPI = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || oRequestAnimationFrame;
+ t.step(function(){
+ var foo = t.step_func(function(){
+ t.done();
+ });
+ reqAnimAPI(foo);
+ });
+ </script>
+ </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:
+ Yu, XiaoyanX <xiaoyanx.yu@intel.com>
+ HaoYunfen <yunfenx.hao@intel.com>
+ Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+-->
+
+<html>
+ <head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+ <title>Check whether window.webkitRequestAnimationFrame expects parameter</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <link rel="stylesheet" href="../resources/testharness.css" />
+ <script type="text/javascript" src="w3c/paintnotificationharness.js"></script>
+ </head>
+ <body onload="start()">
+ <div id=log></div>
+ <script>
+ setup({timeout:500});
+ var t = async_test("Check if FrameRequestCallback calls expected arguments");
+ var reqAnimAPI = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || oRequestAnimationFrame;
+ var requestId = 0;
+ function animate(time) {
+ t.step(function() {
+ assert_not_equals(time,null);
+ });
+ t.done();
+ }
+
+ function start() {
+ try{
+ animationStartTime = Date.now();
+ requestId =reqAnimAPI(animate);
+ }catch(e){
+ t.step(function() {
+ assert_true(false,"The browser does not support requestAnimationFrame method");
+ });
+ t.done();
+ }
+ }
+ </script>
+ </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:
+ Yu, XiaoyanX <xiaoyanx.yu@intel.com>
+ Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+-->
+
+<html>
+ <head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+ <title>Check if window.cancelRequestAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelAnimationFrame || window.msCancelAnimationFrame || window.oCancelAnimationFrame; and RequestAnimationFrame invoked sucessfully</title>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <link rel="stylesheet" href="../resources/testharness.css" />
+ </head>
+ <body>
+ <p>PASS If a red box will move from left to right while click the button "Start". The red box will stop while click the button "Stop"</p>
+ <p>FAIL If the screen doesn't have any animation or red box does not stop while clicks the "Stop" button</p>
+ <div id="log"></div>
+ <script>
+ var reqAnimAPI = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || oRequestAnimationFrame;
+ var cancelAnimAPI = window.cancelRequestAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelAnimationFrame || window.msCancelAnimationFrame || window.oCancelAnimationFrame;;
+ var requestId = 0;
+ function animate(time) {
+ document.getElementById("animated").style.left =
+ (time - animationStartTime) % 2000 / 4 + "px";
+ requestId = reqAnimAPI(animate);
+ }
+ function start() {
+ animationStartTime = Date.now();
+ requestId =reqAnimAPI(animate);
+ }
+ function stop() {
+ if (requestId)
+ cancelAnimAPI(requestId);
+ }
+ </script>
+ <button onclick="start()">Start</button>
+ <button onclick="stop()">Stop</button>
+ <div id="animated" style="position: absolute; left: 10px; padding: 50px;
+ background: crimson; color: white"></div>
+ </body>
+</html>
-<!DOCTYPE HTML>
+<!DOCTYPE html>
<!--
-Copyright (c) 2012 Intel Corporation.
+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:
--- /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:
+ Yu, XiaoyanX <xiaoyanx.yu@intel.com>
+ HaoYunfen <yunfenx.hao@intel.com>
+ Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+-->
+
+<html>
+ <head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+ <title>Check if document's hidden attribute is false, window.webkitRequestAnimationFrame invoked sucessfully</title>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <link rel="stylesheet" href="../resources/testharness.css" />
+ <script type="text/javascript" src="w3c/paintnotificationharness.js"></script>
+ </head>
+ <body onload="start()">
+ <div id="log"></div>
+ <script>
+ var t = async_test("Check if document's hidden attribute is false, window.webkitRequestAnimationFrame invoked sucessfully");
+ var reqAnimAPI = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || oRequestAnimationFrame;
+ var cancelAnimAPI = window.cancelRequestAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelAnimationFrame || window.msCancelAnimationFrame || window.oCancelAnimationFrame;;
+ var requestId = 0;
+ function animate(time) {
+ t.step(function() {
+ assert_true(!document.hidden);
+ });
+ t.done();
+ }
+ function start() {
+ requestId =reqAnimAPI(animate);
+ }
+ </script>
+ </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:
+ Yu, XiaoyanX <xiaoyanx.yu@intel.com>
+ HaoYunfen <yunfenx.hao@intel.com>
+ Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+-->
+
+<html>
+ <head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+ <title>check if window.webkitRequestAnimationFrame performs callback when optional arguments are passed</title>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <link rel="stylesheet" href="../resources/testharness.css" />
+ </head>
+ <body>
+ <div id="log"></div>
+ <script>
+ setup({timeout:500});
+ var t = async_test("check if window.webkitRequestAnimationFrame performs callback when optional arguments are passed");
+ var reqAnimAPI = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || oRequestAnimationFrame;
+ try{
+ reqAnimAPI(CallbackOptArgs, "foo");
+ }catch(e){
+ t.step(function() {
+ assert_true(false, "The browser does not support requestAnimationFrame method");
+ });
+ t.done();
+ }
+ function CallbackOptArgs(timestamp, arg){
+ t.step(function() {
+ assert_not_equals(timestamp,null, "expects callback to be invoked");
+ });
+ t.done();
+ }
+ </script>
+ </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:
+ Yu, XiaoyanX <xiaoyanx.yu@intel.com>
+ Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+Revision history:
+Date Author Description
+08-29-2012 Yu, XiaoyanX <xiaoyanx.yu@intel.com> case creation
+
+-->
+
+<html>
+ <head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+ <title>Check whether window.webkitRequestAnimationFrame can invoke second callback normally</title>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <link rel="stylesheet" href="../resources/testharness.css" />
+ </head>
+ <body>
+ <div id="log"></div>
+ <script>
+ var t = async_test("Check whether window.webkitRequestAnimationFrame can invoke second callback normally");
+ var reqAnimAPI = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || oRequestAnimationFrame;
+ var callbackNumber = 0;
+ try{
+ reqAnimAPI(Callback1);
+ reqAnimAPI(Callback2);
+ }catch(e){
+ t.step(function() {
+ assert_true(false,"The browser does not support requestAnimationFrame method");
+ });
+ t.done();
+ }
+ function Callback1(timestamp) {
+ callbackNumber++;
+ }
+
+ function Callback2(timestamp) {
+ callbackNumber++;
+ t.step(function() {
+ assert_equals(callbackNumber, 2, "Check whether window.webkitRequestAnimationFrame can invoke second callback normally");
+ });
+ t.done();
+ }
+ </script>
+ </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:
+ Yu, XiaoyanX <xiaoyanx.yu@intel.com>
+ Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+-->
+
+<html>
+ <head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+ <title>check if requestAnimationFrame only schedules a single animation</title>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <link rel="stylesheet" href="../resources/testharness.css" />
+ </head>
+ <body onload="start()">
+ <p>PASS If a red box display a text "500px" on screen </p>
+ <p>FAIL If a red box dosen't display a text "500px" on screen </p>
+ <div id="log"></div>
+ <script>
+ var reqAnimAPI = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || oRequestAnimationFrame;
+ var requestId = 0;
+ function animate(time) {
+ document.getElementById("animated").style.left ="500px";
+ document.getElementById("animated").innerHTML="500px";
+ }
+ function start() {
+ requestId =reqAnimAPI(animate);
+ }
+ </script>
+ <div id="animated" style="position: absolute; left: 10px; padding: 50px;
+ background: crimson; color: white"></div>
+ </body>
+</html>
--- /dev/null
+This test suite comes from
+http://w3c-test.org/webperf/tests/submission/Microsoft/requestAnimationFrame/
+without any modification except (1) the necessary
+adjustment on reference path to test harness,
+(2) adding vendor prefix to requestAnimationFrame/cancelRequestAnimationFrame
+
+These tests are copyright by W3C and/or the author listed in the test
+file. The tests are dual-licensed under the W3C Test Suite License:
+http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
+and the BSD 3-clause License:
+http://www.w3.org/Consortium/Legal/2008/03-bsd-license
+under W3C's test suite licensing policy:
+http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright
+
--- /dev/null
+w3c_SCRIPTS = *
+w3cdir = /opt/tct-animationtiming-w3c-tests/animationtiming/w3c
+EXTRA_DIST = $(w3c_SCRIPTS)
--- /dev/null
+/*
+Distributed under both the W3C Test Suite License [1] and the W3C
+3-clause BSD License [2]. To contribute to a W3C Test Suite, see the
+policies and contribution forms [3].
+
+[1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
+[2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license
+[3] http://www.w3.org/2004/10/27-testcases
+*/
+
+/* Add vendor prefix for cross-browser testing */
+var reqAnimAPI = window.requestAnimationFrame ||
+ window.webkitRequestAnimationFrame ||
+ window.mozRequestAnimationFrame ||
+ window.msRequestAnimationFrame ||
+ oRequestAnimationFrame;
+var cancelAnimAPI = window.cancelRequestAnimationFrame ||
+ window.webkitCancelRequestAnimationFrame ||
+ window.mozCancelAnimationFrame ||
+ window.msCancelAnimationFrame ||
+ window.oCancelAnimationFrame;
+
+var skip_all_tests = false;
+var feature_check = false;
+var BailEarly = null;
+
+var old_test = test;
+test = function(func, msg)
+{
+ if ((null == BailEarly) && (reqAnimAPI == undefined))
+ {
+ BailEarly = (reqAnimAPI == undefined) ? true : false;
+ //We haven't yet printed the window.requestAnimationFrame undefined error
+ old_test(function() { assert_true(reqAnimAPI !== undefined, msg); }, msg);
+ }
+
+ if (!BailEarly)
+ {
+ old_test(func, msg);
+ }
+}
+
+function test_paint_interface()
+{
+ test(function()
+ {
+ assert_true(reqAnimAPI !== undefined &&
+ reqAnimAPI != null,
+ "window.requestAnimationFrame is defined and not null.");
+ }, "window.requestAnimationFrame is defined and not null.");
+
+ test(function()
+ {
+ assert_true(cancelAnimAPI !== undefined &&
+ cancelAnimAPI != null,
+ "window.cancelRequestAnimationFrame is defined and not null.");
+ }, "window.cancelRequestAnimationFrame is defined and not null.");
+}
+
+
+
+
+//Animation globals
+var startTime;
+var obj1; //animation object
+
+//Callback globals
+var runCancelled = false;
+var callbackCount = 0;
+var multCallbackCount = 3;
+var expCallbackCount = 6;
+
+//Paint alignment to refresh rate globals
+var defaultRefresh = 60;
+var delta = 5; //Allowed delta from 60Hz
+var it = 0;
+var refresh = 0;
+var SampleSize = 5; //Number of 1 second FPS samplings
+var Sample; //current sample
+
+function RunTests()
+{
+ //Start Animation while performing tests
+ obj1 = document.getElementById("div1");
+ obj1.style.left = "0px";
+ startTime = new Date();
+ reqAnimAPI(step);
+
+ //Perform tests
+ var handle = reqAnimAPI(Callback); //#1 callback
+ var handleMsg = "window.requestAnimationFrame returns a callback handle.";
+ test(function(){assert_true(handle !== undefined, handleMsg);}, handleMsg);
+
+
+ //requestAnimationFrame allows inline script. #2 callback
+ reqAnimAPI(function foo()
+ {
+ callbackCount++;
+ var msg = "window.requestAnimationFrame accepts inline script. " +
+ "Callback " + callbackCount + " of " + expCallbackCount;
+ test(function(){ assert_true(true, msg); }, msg);
+ });
+
+
+ //requestAnimationFrame does not accept optional args
+ reqAnimAPI(CallbackOptArgs, "foo"); //#3 callback
+
+
+ //register for multiple same callbacks. #4 to 4+expCallbackCount
+ //AddNote("#C0C0C0", "Queueing " + multCallbackCount + " multiple same callback attempts.");
+ for (var i = 0; i < multCallbackCount; i++)
+ {
+ reqAnimAPI(MultCallbacks);
+ }
+
+ //register another callback and then cancel it.
+ //the callback count should not increase
+ var temp = reqAnimAPI(CancelledCallback);
+ if (cancelAnimAPI)
+ {
+ cancelAnimAPI(temp);
+ }
+ else
+ {
+ var msg = "cancelRequestAnimationFrame is not defined. Cannot perform cancel test.";
+ test(function() { assert_true(false, msg); }, msg);
+ }
+
+ //Schedule this verification before the final verification. This should fire first.
+ setTimeout(function()
+ {
+ var msg = "window.cancelRequestAnimationFrame cancels callbacks.";
+ test(function(){ assert_false(runCancelled, msg); }, msg);
+
+ }, 100); // 100 ~= 16.6 ms per 60Hz frame * 6 expected callbacks
+
+ setTimeout(function()
+ {
+ var msg = "window.requestAnimationFrame calls all expected callbacks.";
+ test(function(){ assert_equals(callbackCount, expCallbackCount, msg); }, msg);
+
+ }, 100); // 100 ~= 16.6 ms per 60Hz frame * 6 expected callbacks
+}
+
+
+/*
+// ========================================================== //
+// Animation routine
+// ========================================================== //
+*/
+function step(timestamp)
+{
+ var rate = 10;
+ var width = 1000;
+ var progress = timestamp - startTime;
+ obj1.style.left = Math.min(progress / rate, width) + "px";
+ if (progress < (width * rate))
+ {
+ reqAnimAPI(step);
+ }
+}
+
+/*
+// ========================================================== //
+// Callback general verification
+// ========================================================== //
+*/
+
+function Callback(timestamp)
+{
+ callbackCount++;
+
+ var msg1 = "window.requestAnimationFrame queues a callback.";
+ test(function(){ assert_true(true, msg1); }, msg1);
+
+ //Check that requestAnimationFrame has a timestamp
+ var callbackTime = new Date(timestamp);
+
+ var msg2 = "window.requestAnimationFrame contains a valid timestamp: " +
+ callbackTime.toTimeString();
+ test(function(){ assert_not_equals(callbackTime.valueOf(), NaN, msg2); }, msg2);
+}
+
+function MultCallbacks(timestamp)
+{
+ callbackCount++;
+ var msg = "Multiple same callback registrations occur. " +
+ "Callback " + callbackCount + " of " + expCallbackCount;
+ test(function(){ assert_true(true, msg); }, msg);
+}
+
+function CallbackOptArgs(timestamp, arg)
+{
+ callbackCount++;
+
+ var msg1 = "window.requestAnimationFrame performs callback when optional arguments are passed. " +
+ "Callback " + callbackCount + " of " + expCallbackCount;
+ test(function(){ assert_true(true, msg1); }, msg1);
+
+ var msg2 = "window.requestAnimationFrame ignores optional passed arguments.";
+ test(function(){ assert_true(arg == undefined, msg2); }, msg2);
+}
+
+function CancelledCallback(timestamp)
+{
+ callbackCount++;
+ runCancelled = true;
+
+ var msg = "window.cancelRequestAnimationFrame not honored. Callback still occurred.";
+ test(function(){ assert_false(true, msg); }, msg);
+}
+
+
+/*
+// ========================================================== //
+// Callback alignment to paint heart beat functions
+// ========================================================== //
+*/
+Sample = 0;
+function CallbackAlignment()
+{
+ it = 0;
+ reqAnimAPI(align);
+ setTimeout(Calculate, 1000); //Calculate the frames every second
+}
+
+function align(timestamp)
+{
+ //Don't do anything but iterate so as to not consume time within the frame
+ it++;
+ reqAnimAPI(align);
+}
+
+function Calculate()
+{
+ //Throw away the first sample
+ if (Sample != 0)
+ {
+ var report = it - refresh;
+ test_within_delta(report,
+ defaultRefresh,
+ delta,
+ "window.requestAnimationFrame aligns with the paint heartbeat: " + report);
+ }
+
+ refresh = it;
+
+ //Restart animation
+ if (Sample++ < (SampleSize + 1)) //+1 because we throw away the first sample
+ {
+ CallbackAlignment();
+ }
+}
+
+function test_within_delta(value, base, delta, msg)
+{
+ test(function()
+ {
+ assert_true((value <= (base + delta)) && (value >= (base - delta)), msg);
+ }, msg);
+}
--- /dev/null
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+ <title>Paint Notification API Test Suite</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+
+ <script type="text/javascript" src="../../resources/testharness.js"></script>
+ <link rel="stylesheet" href="../../resources/testharness.css" />
+ <script type="text/javascript" src="paintnotificationharness.js"></script>
+
+ <style type="text/css">
+ #div1
+ {
+ position:absolute;
+ background-color:Blue;
+ height:50px;
+ width:50px;
+ }
+ </style>
+
+ </head>
+ <body onload="DoTest();">
+ <h1>Description</h1>
+ <p>This test validates the existence and functionality of the
+ <a href="http://www.w3.org/TR/animation-timing/">WindowAnimationTiming</a> interface
+ (window.requestAnimationFrame).</p>
+
+ <p><b>Note:</b> 60Hz is assumed to be the refresh rate of the display.
+ When verifying that the callbacks align with the display refresh rate, a delta of 5 is permitted.
+ </p>
+
+ <div id="log"></div>
+
+ <script type="text/javascript" >
+ setup({ explicit_done: true, timeout:20*1000 });
+
+ function DoTest()
+ {
+ test_paint_interface();
+
+ if (reqAnimAPI !== undefined)
+ {
+ RunTests();
+ CallbackAlignment();
+ setTimeout(done, (SampleSize + 1) * 1500);
+ }
+ else
+ {
+ done();
+ }
+ }
+
+ </script>
+
+ <div id="div1"></div>
+ </body>
+</html>
AC_CONFIG_FILES([Makefile \
animationtiming/Makefile \
+animationtiming/w3c/Makefile \
resources/Makefile testkit/Makefile])
AC_OUTPUT
</spec>
</specs>
</testcase>
+ <testcase purpose="check if FrameRquestCallback ignores optional passed arguments" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Timing control for script-based animations" execution_type="auto" priority="P2" id="AnimationTiming_Callback_FrameRequestCallback_ignoreOptionalArgs">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>check if FrameRquestCallback ignores optional passed arguments</step_desc>
+ <expected>pass the check</expected>
+ </step>
+ </steps>
+ <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-animationtiming-w3c-tests/animationtiming/AnimationTiming_Callback_FrameRequestCallback_ignoreOptionalArgs.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="FrameRequestCallback" interface="Callback" specification="Timing control for script-based animations" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-animation-timing-20120221/</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check whether window.requestAnimationFrame can invoke second callback normally" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Timing control for script-based animations" execution_type="auto" priority="P2" id="AnimationTiming_WindowAnimationTiming_requestAnimationFrame_invokeSecondCallback">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Check whether window.requestAnimationFrame can invoke second callback normally</step_desc>
+ <expected>pass the check</expected>
+ </step>
+ </steps>
+ <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-animationtiming-w3c-tests/animationtiming/AnimationTiming_WindowAnimationTiming_requestAnimationFrame_invokeSecondCallback.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="requestAnimationFrame" interface="WindowAnimationTiming" specification="Timing control for script-based animations" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-animation-timing-20120221/</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check whether window.requestAnimationFrame accepts inline script" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Timing control for script-based animations" execution_type="auto" priority="P2" id="AnimationTiming_WindowAnimationTiming_requestAnimationFrame_AcceptInlineScript">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Check whether window.requestAnimationFrame accepts inline script</step_desc>
+ <expected>pass the check</expected>
+ </step>
+ </steps>
+ <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-animationtiming-w3c-tests/animationtiming/AnimationTiming_WindowAnimationTiming_requestAnimationFrame_AcceptInlineScript.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="requestAnimationFrame" interface="WindowAnimationTiming" specification="Timing control for script-based animations" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-animation-timing-20120221/</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check whether FrameRequestCallback contains a valid timestamp" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Timing control for script-based animations" execution_type="auto" priority="P2" id="AnimationTiming_Callback_FrameRequestCallback_validTimestamp">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Check whether FrameRequestCallback contains a valid timestamp</step_desc>
+ <expected>pass the check</expected>
+ </step>
+ </steps>
+ <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-animationtiming-w3c-tests/animationtiming/AnimationTiming_Callback_FrameRequestCallback_validTimestamp.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="FrameRequestCallback" interface="Callback" specification="Timing control for script-based animations" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-animation-timing-20120221/</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="check if window.requestAnimationFrame performs callback when optional arguments are passed" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Timing control for script-based animations" execution_type="auto" priority="P2" id="AnimationTiming_WindowAnimationTiming_requestAnimationFrame_ignoreOptionalArgs">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>check if window.requestAnimationFrame performs callback when optional arguments are passed</step_desc>
+ <expected>pass the check</expected>
+ </step>
+ </steps>
+ <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-animationtiming-w3c-tests/animationtiming/AnimationTiming_WindowAnimationTiming_requestAnimationFrame_ignoreOptionalArgs.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="requestAnimationFrame" interface="WindowAnimationTiming" specification="Timing control for script-based animations" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-animation-timing-20120221/</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Multiple callback registrations occur.Callback 4 of 4" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Timing control for script-based animations" execution_type="auto" priority="P2" id="AnimationTiming_Callback_FrameRequestCallback_multipleCalls">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Multiple callback registrations occur.Callback 4 of 4</step_desc>
+ <expected>pass the check</expected>
+ </step>
+ </steps>
+ <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-animationtiming-w3c-tests/animationtiming/AnimationTiming_Callback_FrameRequestCallback_multipleCalls.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="FrameRequestCallback" interface="Callback" specification="Timing control for script-based animations" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-animation-timing-20120221/</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check whether window.requestAnimationFrame expects parameter" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Timing control for script-based animations" execution_type="auto" priority="P2" id="AnimationTiming_WindowAnimationTiming_requestAnimationFrame_NeedParameter">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Check whether window.requestAnimationFrame expects parameter</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-animationtiming-w3c-tests/animationtiming/AnimationTiming_WindowAnimationTiming_requestAnimationFrame_NeedParameter.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="requestAnimationFrame" interface="WindowAnimationTiming" specification="Timing control for script-based animations" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-animation-timing-20120221/</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check whether window.cancelAnimationFrame can be used normally with invalid parameter boolean" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Timing control for script-based animations" execution_type="manual" priority="P2" id="AnimationTiming_WindowAnimationTiming_cancelAnimationFrame_boolean">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Click the Stop button</step_desc>
+ <expected>A red box moves from left to right, when click Stop button, the red box won't stop</expected>
+ </step>
+ </steps>
+ <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-animationtiming-w3c-tests/animationtiming/AnimationTiming_WindowAnimationTiming_cancelAnimationFrame_boolean.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="cancelAnimationFrame" interface="WindowAnimationTiming" specification="Timing control for script-based animations" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-animation-timing-20120221/</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check whether window.cancelAnimationFrame can be used normally with invalid parameter string" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Timing control for script-based animations" execution_type="manual" priority="P2" id="AnimationTiming_WindowAnimationTiming_cancelAnimationFrame_string">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Click the Stop button</step_desc>
+ <expected>A red box moves from left to right, when click Stop button, the red box won't stop</expected>
+ </step>
+ </steps>
+ <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-animationtiming-w3c-tests/animationtiming/AnimationTiming_WindowAnimationTiming_cancelAnimationFrame_string.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="cancelAnimationFrame" interface="WindowAnimationTiming" specification="Timing control for script-based animations" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-animation-timing-20120221/</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check whether window.cancelAnimationFrame can be used normally with invalid parameter undefined" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Timing control for script-based animations" execution_type="manual" priority="P2" id="AnimationTiming_WindowAnimationTiming_cancelAnimationFrame_undefined">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Click the Stop button</step_desc>
+ <expected>A red box moves from left to right, when click Stop button, the red box won't stop</expected>
+ </step>
+ </steps>
+ <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-animationtiming-w3c-tests/animationtiming/AnimationTiming_WindowAnimationTiming_cancelAnimationFrame_undefined.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="cancelAnimationFrame" interface="WindowAnimationTiming" specification="Timing control for script-based animations" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-animation-timing-20120221/</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check whether window.cancelAnimationFrame can be used normally with invalid parameter negative number" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Timing control for script-based animations" execution_type="manual" priority="P2" id="AnimationTiming_WindowAnimationTiming_cancelAnimationFrame_neg10">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Click the Stop button</step_desc>
+ <expected>A red box moves from left to right, when click Stop button, the red box won't stop</expected>
+ </step>
+ </steps>
+ <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-animationtiming-w3c-tests/animationtiming/AnimationTiming_WindowAnimationTiming_cancelAnimationFrame_neg10.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="cancelAnimationFrame" interface="WindowAnimationTiming" specification="Timing control for script-based animations" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-animation-timing-20120221/</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check window.cancelAnimationFrame can be called normally with the parameter returned by window.requestAnimationFrame" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Timing control for script-based animations" execution_type="manual" priority="P2" id="AnimationTiming_WindowAnimationTiming_cancelAnimationFrame_validhandle">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Click the Stop button</step_desc>
+ <expected>Anamition will stop</expected>
+ </step>
+ </steps>
+ <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-animationtiming-w3c-tests/animationtiming/AnimationTiming_WindowAnimationTiming_cancelAnimationFrame_validhandle.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="cancelAnimationFrame" interface="WindowAnimationTiming" specification="Timing control for script-based animations" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-animation-timing-20120221/</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+
+ <testcase purpose="Check if window.cancelAnimationFrame and window.requestAnimationFrame invoked sucessfully" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Timing control for script-based animations" execution_type="manual" priority="P3" id="AnimationTiming_WindowAnimationTiming_requestAnimationFrame_cancelAnimationFrame">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Click the button Start and then click the button Stop</step_desc>
+ <expected>A red box will move from left to right while click the button Start. The red box will stop while click the button Stop</expected>
+ </step>
+ </steps>
+ <test_script_entry timeout="90">/opt/tct-animationtiming-w3c-tests/animationtiming/AnimationTiming_WindowAnimationTiming_requestAnimationFrame_cancelAnimationFrame.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="WindowAnimationTiming" specification="Timing control for script-based animations" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-animation-timing-20120221/</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="check if window.requestAnimationFrame only schedules a single animation" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Timing control for script-based animations" execution_type="manual" priority="P3" id="AnimationTiming_WindowAnimationTiming_requestAnimationFrame_singleAnimation">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>check if requestAnimationFrame only schedules a single animation</step_desc>
+ <expected>A red box display a text 500px on screen</expected>
+ </step>
+ </steps>
+ <test_script_entry timeout="90">/opt/tct-animationtiming-w3c-tests/animationtiming/AnimationTiming_WindowAnimationTiming_requestAnimationFrame_singleAnimation.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="WindowAnimationTiming" specification="Timing control for script-based animations" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-animation-timing-20120221/</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if document's hidden attribute is false, window.requestAnimationFrame invoked sucessfully" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Timing control for script-based animations" execution_type="auto" priority="P3" id="AnimationTiming_WindowAnimationTiming_requestAnimationFrame_hidden">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>Check if document's hidden attribute is false, window.requestAnimationFrame invoked sucessfully</step_desc>
+ <expected>PASS</expected>
+ </step>
+ </steps>
+ <test_script_entry timeout="90">/opt/tct-animationtiming-w3c-tests/animationtiming/AnimationTiming_WindowAnimationTiming_requestAnimationFrame_hidden.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="WindowAnimationTiming" specification="Timing control for script-based animations" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2012/WD-animation-timing-20120221/</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
</set>
</suite>
</test_definition>