summaryrefslogtreecommitdiff
path: root/tests/unit-tests/slider
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit-tests/slider')
-rwxr-xr-xtests/unit-tests/slider/index.html42
-rw-r--r--tests/unit-tests/slider/slider-tests.js58
2 files changed, 0 insertions, 100 deletions
diff --git a/tests/unit-tests/slider/index.html b/tests/unit-tests/slider/index.html
deleted file mode 100755
index 720cabaa..00000000
--- a/tests/unit-tests/slider/index.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <script src="../../../build/tizen-web-ui-fw/latest/js/jquery.js"></script>
- <script src="../../../build/tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.min.js"></script>
- <script src="../../../build/tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js"
- data-framework-theme="tizen-white"
- data-framework-viewport-scale=false>
- </script>
-
- <link rel="stylesheet" href="../../../libs/js/jquery-mobile-1.1.0/external/qunit.css" />
-
- <script src="../../../libs/js/jquery-mobile-1.1.0/external/qunit.js"></script>
- <script src="slider-tests.js"></script>
-
- <title>Slider</title>
-</head>
-
-<body>
-
-<h1 id="qunit-header">Slider</h1>
-<h2 id="qunit-banner"></h2>
-<div id="qunit-testrunner-toolbar"></div>
-<h2 id="qunit-userAgent"></h2>
-<ol id="qunit-tests"></ol>
-
-<div id="qunit-fixture">
-
- <div data-role="page" id="slider">
- <div data-role="header" data-position="fixed">
- <h1>Slider</h1>
- </div>
- <div data-role="content">
- <input id="slider0" data-popupenabled="false" type="range" name="slider" value="50" min="0" max="100">
- <input id="slider1" data-popupenabled="false" type="range" name="slider" value="5" min="0" max="10" data-icon="volume">
- </div>
- </div>
-
-</div>
-
-</body>
-</html>
diff --git a/tests/unit-tests/slider/slider-tests.js b/tests/unit-tests/slider/slider-tests.js
deleted file mode 100644
index 11c59c85..00000000
--- a/tests/unit-tests/slider/slider-tests.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Unit Test: Slider
- *
- * Minkyu Kang <mk7.kang@samsung.com>
- */
-
-(function ($) {
- module("Slider");
-
- var unit_slider = function ( widget ) {
- var slider,
- slider_bg = function ( widget ) {
- if ( widget.jqmData("icon") !== undefined ) {
- return "ui-slider-icon-bg";
- }
- return "ui-slider-bg";
- },
- handle,
- handle_left = function ( widget ) {
- var left = widget.val() * 100 /
- ( widget.attr("max") - widget.attr("min") );
- return left + "%";
- },
- random_move = function ( min, max) {
- return Math.floor( (Math.random() * (max - min + 1)) + min );
- };
-
- /* Create */
- widget.tizenslider();
- slider = widget.next().children(".ui-slider");
- ok( slider, "Create" );
-
- /* Check Background */
- equal( slider.parent().attr("class"), slider_bg( widget ), "Background" );
-
- /* Check Parameters */
- handle = slider.find(".ui-slider-handle");
-
- equal( handle.attr("aria-valuenow"), widget.val(), "Paramter: value" );
- equal( handle.attr("aria-valuemin"), widget.attr("min"), "Paramter: min" );
- equal( handle.attr("aria-valuemax"), widget.attr("max"), "Paramter: max" );
-
- equal( handle.css("left"), handle_left(widget), "Handle Location: Default" );
-
- /* Check APIs */
- widget.val( random_move(widget.attr("min"), widget.attr("max")) );
- widget.trigger("change");
- equal( handle.css("left"), handle_left(widget), "Handle Location: Moved" );
- };
-
- test( "normal slider", function () {
- unit_slider( $("#slider0") );
- });
-
- test( "icon slider", function () {
- unit_slider( $("#slider1") );
- });
-}( jQuery ));