UnitTC: Additional unit testcases have been added
authorhjnim.kim <hjnim.kim@samsung.com>
Mon, 25 Feb 2013 00:47:05 +0000 (09:47 +0900)
committerYoumin Ha <youmin.ha@samsung.com>
Thu, 7 Mar 2013 12:07:09 +0000 (21:07 +0900)
Addtional Web UI FW unit testcases have been added.

Change-Id: I500b2d7aeef0c7dd4dabb7c9b6fb2c5c31f007e6

78 files changed:
tests/additional-unit-tests/autodivider/autodivider-tests.js [new file with mode: 0755]
tests/additional-unit-tests/autodivider/index.html [new file with mode: 0755]
tests/additional-unit-tests/button/button-tests.js [new file with mode: 0755]
tests/additional-unit-tests/button/index.html [new file with mode: 0755]
tests/additional-unit-tests/check/check-tests.js [new file with mode: 0755]
tests/additional-unit-tests/check/index.html [new file with mode: 0755]
tests/additional-unit-tests/collapsible/collapsible-tests.js [new file with mode: 0755]
tests/additional-unit-tests/collapsible/index.html [new file with mode: 0755]
tests/additional-unit-tests/datetimepicker/datetimepicker-tests.js [new file with mode: 0755]
tests/additional-unit-tests/datetimepicker/index.html [new file with mode: 0755]
tests/additional-unit-tests/dayselector/dayselector-tests.js [new file with mode: 0755]
tests/additional-unit-tests/dayselector/index.html [new file with mode: 0755]
tests/additional-unit-tests/extendablelist/extendablelist-tests.js [new file with mode: 0755]
tests/additional-unit-tests/extendablelist/index.html [new file with mode: 0755]
tests/additional-unit-tests/fastscroll/fastscroll-tests.js [new file with mode: 0755]
tests/additional-unit-tests/fastscroll/index.html [new file with mode: 0755]
tests/additional-unit-tests/gallery/01.jpg [new file with mode: 0755]
tests/additional-unit-tests/gallery/02.jpg [new file with mode: 0755]
tests/additional-unit-tests/gallery/03.jpg [new file with mode: 0755]
tests/additional-unit-tests/gallery/04.jpg [new file with mode: 0755]
tests/additional-unit-tests/gallery/05.jpg [new file with mode: 0755]
tests/additional-unit-tests/gallery/06.jpg [new file with mode: 0755]
tests/additional-unit-tests/gallery/07.jpg [new file with mode: 0755]
tests/additional-unit-tests/gallery/08.jpg [new file with mode: 0755]
tests/additional-unit-tests/gallery/09.jpg [new file with mode: 0755]
tests/additional-unit-tests/gallery/10.jpg [new file with mode: 0755]
tests/additional-unit-tests/gallery/11.jpg [new file with mode: 0755]
tests/additional-unit-tests/gallery/gallery-tests.js [new file with mode: 0755]
tests/additional-unit-tests/gallery/index.html [new file with mode: 0755]
tests/additional-unit-tests/gallery3d/gallery3d-tests.js [new file with mode: 0755]
tests/additional-unit-tests/gallery3d/index.html [new file with mode: 0755]
tests/additional-unit-tests/handler/handler-tests.js [new file with mode: 0755]
tests/additional-unit-tests/handler/index.html [new file with mode: 0755]
tests/additional-unit-tests/headerfooter/headerfooter-tests.js [new file with mode: 0755]
tests/additional-unit-tests/headerfooter/index.html [new file with mode: 0755]
tests/additional-unit-tests/index.html [new file with mode: 0755]
tests/additional-unit-tests/list.txt [new file with mode: 0755]
tests/additional-unit-tests/list/index.html [new file with mode: 0755]
tests/additional-unit-tests/list/list-tests.js [new file with mode: 0755]
tests/additional-unit-tests/listdividers/index.html [new file with mode: 0755]
tests/additional-unit-tests/listdividers/listdividers-tests.js [new file with mode: 0755]
tests/additional-unit-tests/loader/index.html [new file with mode: 0755]
tests/additional-unit-tests/loader/loader-tests.js [new file with mode: 0755]
tests/additional-unit-tests/multimediaview/index.html [new file with mode: 0755]
tests/additional-unit-tests/multimediaview/multimediaview-tests.js [new file with mode: 0755]
tests/additional-unit-tests/navigationbar/01_icon.png [new file with mode: 0755]
tests/additional-unit-tests/navigationbar/02_icon.png [new file with mode: 0755]
tests/additional-unit-tests/navigationbar/03_icon.png [new file with mode: 0755]
tests/additional-unit-tests/navigationbar/index.html [new file with mode: 0755]
tests/additional-unit-tests/navigationbar/navigationbar-tests.js [new file with mode: 0755]
tests/additional-unit-tests/notification/index.html [new file with mode: 0755]
tests/additional-unit-tests/notification/notification-tests.js [new file with mode: 0755]
tests/additional-unit-tests/popup/index.html [new file with mode: 0755]
tests/additional-unit-tests/popup/popup-tests.js [new file with mode: 0755]
tests/additional-unit-tests/progressbar/index.html [new file with mode: 0755]
tests/additional-unit-tests/progressbar/progressbar-tests.js [new file with mode: 0755]
tests/additional-unit-tests/radio/index.html [new file with mode: 0755]
tests/additional-unit-tests/radio/radio-tests.js [new file with mode: 0755]
tests/additional-unit-tests/runner.js [new file with mode: 0755]
tests/additional-unit-tests/searchbar/index.html [new file with mode: 0755]
tests/additional-unit-tests/searchbar/searchbar-tests.js [new file with mode: 0755]
tests/additional-unit-tests/segmentcontrol/index.html [new file with mode: 0755]
tests/additional-unit-tests/segmentcontrol/segmentcontrol-tests.js [new file with mode: 0755]
tests/additional-unit-tests/slider/index.html [new file with mode: 0755]
tests/additional-unit-tests/slider/slider-tests.js [new file with mode: 0755]
tests/additional-unit-tests/swipe/index.html [new file with mode: 0755]
tests/additional-unit-tests/swipe/swipe-tests.js [new file with mode: 0755]
tests/additional-unit-tests/tabbar/index.html [new file with mode: 0755]
tests/additional-unit-tests/tabbar/tabbar-tests.js [new file with mode: 0755]
tests/additional-unit-tests/tests.js [new file with mode: 0755]
tests/additional-unit-tests/toggleswitch/index.html [new file with mode: 0755]
tests/additional-unit-tests/toggleswitch/toggleswitch-tests.js [new file with mode: 0755]
tests/additional-unit-tests/tokentextarea/index.html [new file with mode: 0755]
tests/additional-unit-tests/tokentextarea/tokentextarea-tests.js [new file with mode: 0755]
tests/additional-unit-tests/virtualgrid/index.html [new file with mode: 0755]
tests/additional-unit-tests/virtualgrid/virtualgrid-tests.js [new file with mode: 0755]
tests/additional-unit-tests/virtuallist/index.html [new file with mode: 0755]
tests/additional-unit-tests/virtuallist/virtuallist-tests.js [new file with mode: 0755]

diff --git a/tests/additional-unit-tests/autodivider/autodivider-tests.js b/tests/additional-unit-tests/autodivider/autodivider-tests.js
new file mode 100755 (executable)
index 0000000..11b8d50
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Unit Test : autodivider
+ *
+ *
+ */
+/*jslint browser: true*/
+/*global $,  jQuery,  test,  equal,  ok*/
+
+$ ( document ).ready ( function ( ) {
+       module ("Autodivider") ;
+
+       var unit_listdividers_test = function ( widget ) {
+               var li ;
+               /*markup*/
+               equal ( widget.hasClass ("ui-listview") ,  true, "Markup check") ;
+               equal ( widget.find ( ' li.ui-li ' ).length,  24, "Markup check") ;
+               equal ( widget.find (":jqmData(role=list-divider)").length,  8, "Markup check : list dividers count") ;
+               equal ( widget.find ( ' li.ui-li-divider ' ).length,  8, "Markup check : list dividers count") ;
+
+               /*adding element which fits in last divisiov*/
+               li = "<li>Harry</li>";
+               $ ( li ).appendTo ( widget ) ;
+               $ ( widget ).listview ("refresh") ;
+               equal ( widget.find ( ' li.ui-li ' ).length,  25, "API : refresh check") ;
+
+               /*adding element which need new divisiov*/
+               li = "<li>Jack</li>";
+               $ ( li ).appendTo ( widget ) ;
+               $ ( widget ).listview ("refresh") ;
+               equal ( widget.find ( ' li.ui-li ' ).length,  27, "API : refresh check") ;
+       } ;
+
+       test ("Autodivider",  function ( ) {
+               // trigger pagecreate
+               $ ("#autodivider-unit-test").page ( ) ;
+               /* Initialize */
+               $ ( ' #autodividersample ' ).listview ( ) ;
+               unit_listdividers_test ( $ ( ' #autodividersample ' ) ,  {button : ' call ' ,  cancel : true} ) ;
+
+       } ) ;
+
+       test ("autodivider- dynamic",  function ( ) {
+
+               var createEvent = false ,
+                       listHTMML = ' <ul data-role="listview"id="autodividersample1"data-autodividers="alpha"> ' +
+                                                                                        ' <li><a href="#">Adam Kinkaid</a></li> ' +
+                                                                                        ' <li><a href="#">Alex Wickerham</a></li> ' +
+                                                                                        ' <li><a href="#">Avery Johnson</a></li> ' +
+                                                                                        ' <li><a href="#">Bob Cabot</a></li> ' +
+                                                                                        ' <li><a href="#">Caleb Booth</a></li> ' +
+                                                                                        ' <li><a href="#">Christopher Adams</a></li> ' +
+                                                                                        ' <li><a href="#">Culver James</a></li> ' +
+                                                                                        ' <li><a href="#">David Walsh</a></li> ' +
+                                                                                        ' <li><a href="#">Drake Alfred</a></li> ' +
+                                                                                        ' <li><a href="#">Elizabeth Bacon</a></li> ' +
+                                                                                        ' <li><a href="#">Emery Parker</a></li> ' +
+                                                                                        ' <li><a href="#">Enid Voldon</a></li> ' +
+                                                                                        ' <li><a href="#">Francis Wall</a></li> ' +
+                                                                                        ' <li><a href="#">Graham Smith</a></li> ' +
+                                                                                        ' <li><a href="#">Greta Peete</a></li> ' +
+                                                                                        ' <li><a href="#">Harvey Walls</a></li> ' +
+                                                                ' </ul> ' ;
+
+               // trigger pagecreate
+               $ ("#autodivider-unit-test-dynamic").page ( ) ;
+
+               /* Initialize */
+               $ ("#autodivider-unit-test-dynamic").find (":jqmData(role=contents)").append ( listHTMML ) ;
+               equal ( $ ("#autodivider-unit-test-dynamic").find ( ' li ' ).length,  16, "Markup check before autodividers created") ;
+               $ ( ' #autodividersample1 ' ).listview ( {create : function ( ) {
+                       createEvent = true ;
+               }} ) ;
+
+               $ ("#autodivider-unit-test-dynamic").find (":jqmData(role=contents)").trigger ( ' create ' ) ;
+               $ ( ' #autodividersample1 ' ).listview ( ) ;
+
+               equal ( createEvent,  true, "Create Event") ;
+               equal ( $ ("#autodivider-unit-test-dynamic").find ( ' li.ui-li ' ).length,  24, "Markup check after autodividers created") ;
+               unit_listdividers_test ( $ ( ' #autodividersample1 ' ) ) ;
+
+       } ) ;
+
+} ) ;
diff --git a/tests/additional-unit-tests/autodivider/index.html b/tests/additional-unit-tests/autodivider/index.html
new file mode 100755 (executable)
index 0000000..30a04e8
--- /dev/null
@@ -0,0 +1,76 @@
+<!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.2.0/external/qunit.css" />
+               <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+               <script src="autodivider-tests.js"></script>
+               <title>Autodividers</title>
+       </head>
+
+       <body>
+               <h1 id="qunit-header">Autodividers</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="dummy-page">
+                               <div data-role="header" data-position="fixed">
+                                       <h1>Dummy</h1>
+                               </div>
+                               <div data-role="contents">
+                               </div>
+                       </div>
+
+                       <div data-role="page" id="autodivider-unit-test" data-add-back-btn="true">
+                               <div data-role="header" data-position="fixed">
+                                       <h1>Autodividers</h1>
+                                       <input type="search" data-cancel-btn='true' name="search" data-icon="call" id="searchInput" value=""/>
+                               </div>
+                               <div data-role="content" id="autodivider-content">
+                                                               <ul data-role="listview" id='autodividersample' data-autodividers="alpha">
+                                                       
+                                                               <li><a href="#">Adam Kinkaid</a></li>
+                                                               <li><a href="#">Alex Wickerham</a></li>
+                                                               <li><a href="#">Avery Johnson</a></li>
+                                                               
+                                                               <li><a href="#">Bob Cabot</a></li>
+                                                               
+                                                               <li><a href="#">Caleb Booth</a></li>
+                                                               <li><a href="#">Christopher Adams</a></li>
+                                                               <li><a href="#">Culver James</a></li>
+                                                               
+                                                               <li><a href="#">David Walsh</a></li>
+                                                               <li><a href="#">Drake Alfred</a></li>
+                                                               
+                                                               <li><a href="#">Elizabeth Bacon</a></li>
+                                                               <li><a href="#">Emery Parker</a></li>
+                                                               <li><a href="#">Enid Voldon</a></li>
+                                                       
+                                                               <li><a href="#">Francis Wall</a></li>
+                                                               
+                                                               <li><a href="#">Graham Smith</a></li>
+                                                               <li><a href="#">Greta Peete</a></li>
+                                                               
+                                                               <li><a href="#">Harvey Walls</a></li>
+                                                       </ul>
+                               </div>
+                       </div>
+               </div>
+               <div data-role="page" id="autodivider-unit-test-dynamic">
+                               <div data-role="header" data-position="fixed">
+                                       <h1>Dummy</h1>
+                               </div>
+                               <div data-role="contents">
+                               </div>
+                       </div>
+       </body>
+</html>
diff --git a/tests/additional-unit-tests/button/button-tests.js b/tests/additional-unit-tests/button/button-tests.js
new file mode 100755 (executable)
index 0000000..5a53ddb
--- /dev/null
@@ -0,0 +1,224 @@
+/*
+ * Unit Test: Button
+ *
+ * Hyunjung Kim <hjnim.kim@samsung.com>
+ *
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+$("#checkboxpage").live ("pageinit", function ( event ) {
+
+       module ("button") ;
+
+       var unit_button = function ( widget, type ) {
+               var buttonClassPrefix = "ui-btn",
+                       buttonText = type,
+                       icon,
+                       position,
+                       buttonStyle,
+                       hasClass;
+
+               ok ( widget.hasClass ( buttonClassPrefix ) , "Create - Button") ;
+
+               if ( widget.jqmData ("inline") ) {
+                       ok ( widget.hasClass ( buttonClassPrefix + "-inline") , "Style - Inline") ;
+               } else {
+                       ok ( !widget.hasClass ( buttonClassPrefix + "-inline") , "Style - Non Inline") ;
+               }
+
+               if ( !widget.children ( ).first ( ).hasClass ( buttonClassPrefix + "-hastxt") ) {
+                       buttonText = "";
+               }
+
+               // Text Trim, CausejQueryMobile ( JQM ) 1.1 forced to add -"\u00a0"in buttonIcon ( ButtonMarkup )
+               // JQM 1.1 buttonMarkup code :
+               // - if ( buttonIcon ) buttonIcon.appendChild ( document.createTextNode ("\u00a0") ) ;
+               equal ( widget.text ( ).trim ( ) , buttonText , "Button Text") ;
+               icon = widget.jqmData ("icon") ;
+               if ( icon !== undefined ) {
+                       ok ( widget.children ( ).children ( ).hasClass ("ui-icon-" + icon ) , "Style - Button Icon") ;
+               }
+               if ( icon !== undefined && buttonText != "") {
+                       position = widget.jqmData ("iconpos") ;
+                       if ( position === undefined ) {
+                               position = "left";
+                       }
+                       ok ( widget.children ( ).children ( ).first ( ).hasClass ( buttonClassPrefix + "-text-padding-" + position ) , "Style - Button Icon, Text Position") ;
+               }
+
+               buttonStyle = widget.jqmData ("style") ;
+               if ( buttonStyle !== undefined ) {
+                       switch ( buttonStyle ) {
+                       case "circle":
+                               hasClass = ".ui-btn-corner-circle, .ui-btn-icon_only";
+                               break;
+                       case "edit":
+                               hasClass = ".ui-btn-edit";
+                               break;
+                       case "nobg":
+                               hasClass = ".ui-btn-icon-nobg, .ui-btn-icon_only";
+                               break;
+                       }
+                       ok ( widget.children ( ).is ( hasClass ) ) ;
+               }
+
+               // Check APIs
+               widget.button ( ).button ("disable") ;
+               equal ( widget.attr ("disabled") , "disabled", "button disable test") ;
+
+               widget.button ( ).button ("enable") ;
+               equal ( widget.attr ("disable") , undefined, "button enable test") ;
+       },
+
+               unit_button_events = function ( ) {
+
+                       var createEvent = false,
+                               clickEvent = false,
+                               buttonClassPrefix = "ui-btn",
+                               widget,
+                               markup ;
+
+                       //remove all controls form content
+                       $('#checkboxpage').find(":jqmData(role=contents)").empty( ) ;
+                       markup = '<div data-role="button"id="button-0">Text Button Dynamic</div>';
+                       $('#checkboxpage').find(":jqmData(role=contents)").append( markup ) ;
+                       widget = $("#button-0") ;
+
+                       /*Bind Event*/
+                       widget.button( {create: function ( ) {
+                               createEvent = true ;
+                       }} ) ;
+
+                       widget.bind("click", function ( ) {
+                               clickEvent = true ;
+                       } ) ;
+
+                       $('#checkboxpage').find(":jqmData(role=contents)").trigger('create') ;
+                       widget.button ( ) ;
+
+                       /*Check Event*/
+                       $('#checkboxpage').find(":jqmData(role=contents)").trigger('create') ;
+                       ok( widget.hasClass ( buttonClassPrefix ) , "Create - Button") ;
+                       ok( createEvent , "Button Create Event") ;
+                       widget.trigger ('click') ;
+                       ok( clickEvent , "Button Click Event") ;
+               };
+
+       test ("Button", function ( ) {
+               unit_button ( $("#button-0") , "Text Button") ;
+       } ) ;
+
+       test ("Button - Inline", function ( ) {
+               unit_button ( $("#button-1") , "Text Button Inline") ;
+       } ) ;
+
+       test ("Button - Inline, Icon", function ( ) {
+               unit_button ( $("#button-2") , "Call Icon") ;
+       } ) ;
+
+       test ("Button - Inline, Call Icon, Icon Position ( Right )", function ( ) {
+               unit_button ( $("#button-3") , "Icon Text") ;
+       } ) ;
+
+       test ("Button - Inline, Only Icon ( Reveal )", function ( ) {
+               unit_button ( $("#button-4") , "Non Text Button") ;
+       } ) ;
+
+       test ("Button - Inline, Only Icon ( Send ) , circle", function ( ) {
+               unit_button ( $("#button-5") , "Non Text Button") ;
+       } ) ;
+
+       test ("Button - Inline, Only Icon ( Favorite ) , nobackground", function ( ) {
+               unit_button ( $("#button-6") , "Non Text Button") ;
+       } ) ;
+
+       test ("Button", function ( ) {
+               var markup;
+               //remove all controls form content
+               $('#checkboxpage').find (":jqmData(role=contents)").empty ( ) ;
+
+               markup = '<div data-role = "button" id = "button-0">Text Button Dynamic</div>';
+               $('#checkboxpage').find (":jqmData(role=contents)").append ( markup ) ;
+               $('#checkboxpage').find (":jqmData(role=contents)").trigger ( 'create' ) ;
+               unit_button ( $("#button-0") , "Text Button Dynamic") ;
+       } ) ;
+
+       test ("Button - Inline", function ( ) {
+               var markup ;
+               //remove all controls form content
+               $('#checkboxpage').find (":jqmData(role=contents)").empty ( ) ;
+
+               markup = '<div data-role = "button" id = "button-1">Text Button Inline Dynamic</div>';
+               $('#checkboxpage').find (":jqmData(role=contents)").append ( markup ) ;
+               $('#checkboxpage').find (":jqmData(role=contents)").trigger ('create') ;
+               unit_button ( $("#button-1") , "Text Button Inline Dynamic") ;
+
+       } ) ;
+
+       test ("Button - Inline, Icon", function ( ) {
+               var markup;
+               //remove all controls form content
+               $('#checkboxpage').find (":jqmData(role=contents)").empty ( ) ;
+
+               markup = '<div data-role = "button" id = "button-2">Call Icon Dynamic</div>';
+               $('#checkboxpage').find (":jqmData(role=contents)").append ( markup ) ;
+               $('#checkboxpage').find (":jqmData(role=contents)").trigger ('create') ;
+               unit_button ( $("#button-2") , "Call Icon Dynamic") ;
+
+       } ) ;
+
+       test ("Button - Inline, Call Icon, Icon Position ( Right )", function ( ) {
+               var markup;
+               //remove all controls form content
+               $('#checkboxpage').find (":jqmData(role=contents)").empty ( ) ;
+
+               markup = '<div data-role = "button" id = "button-3">Icon Text Dynamic</div>';
+               $('#checkboxpage').find (":jqmData(role=contents)").append ( markup ) ;
+               $('#checkboxpage').find (":jqmData(role=contents)").trigger ('create') ;
+               unit_button ( $("#button-3") , "Icon Text Dynamic") ;
+
+       } ) ;
+
+       test ("Button - Inline, Only Icon ( Reveal )", function ( ) {
+               var markup;
+               //remove all controls form content
+               $('#checkboxpage').find (":jqmData(role=contents)").empty ( ) ;
+
+               markup = '<div data-role = "button" id = "button-4">Non Text Button Dynamic</div>';
+               $('#checkboxpage').find (":jqmData(role=contents)").append ( markup ) ;
+               $('#checkboxpage').find (":jqmData(role=contents)").trigger ('create') ;
+               unit_button ( $("#button-4") , "Non Text Button Dynamic") ;
+
+       } ) ;
+
+       test ("Button - Inline, Only Icon ( Send ) , circle", function ( ) {
+               var markup;
+               //remove all controls form content
+               $('#checkboxpage').find (":jqmData(role=contents)").empty ( ) ;
+
+               markup = '<div data-role = "button" id = "button-5">Non Text Button Dynamic</div>';
+               $('#checkboxpage').find (":jqmData(role=contents)").append ( markup ) ;
+               $('#checkboxpage').find (":jqmData(role=contents)").trigger ('create') ;
+               unit_button ( $("#button-5") , "Non Text Button Dynamic") ;
+
+       } ) ;
+
+       test ("Button - Inline, Only Icon ( Favorite ) , nobackground", function ( ) {
+               var markup;
+               //remove all controls form content
+               $('#checkboxpage').find (":jqmData(role=contents)").empty ( ) ;
+
+               markup = '<div data-role = "button" id = "button-6">Non Text Button Dynamic</div>';
+               $('#checkboxpage').find (":jqmData(role=contents)").append ( markup ) ;
+               $('#checkboxpage').find (":jqmData(role=contents)").trigger ('create') ;
+               unit_button ( $("#button-6") , "Non Text Button Dynamic") ;
+
+       } ) ;
+
+       test ("Button", function ( ) {
+               //remove all controls form content
+               $('#checkboxpage').find (":jqmData(role=contents)").empty ( ) ;
+               unit_button_events ( ) ;
+       } ) ;
+
+} ) ;
diff --git a/tests/additional-unit-tests/button/index.html b/tests/additional-unit-tests/button/index.html
new file mode 100755 (executable)
index 0000000..b23593e
--- /dev/null
@@ -0,0 +1,42 @@
+<!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.2.0/external/qunit.css" />
+
+       <script src="../../../libs/js/jquery-mobile-1.1.0/tests/jquery.testHelper.js"></script>
+       <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+       <script src="button-tests.js"></script>
+       <title>Button</title>
+</head>
+
+<body>
+
+<h1 id="qunit-header">Button</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="checkboxpage">
+               <div data-role="contents">
+                       <div data-role="button" id="button-0">Text Button</div>
+                       <div data-role="button" data-inline="true" id="button-1">Text Button Inline</div>
+                       <div data-role="button" data-inline="true" data-icon="reveal" id="button-2">Call Icon</div>
+                       <div data-role="button" data-inline="true" data-icon="call" data-iconpos="right" id="button-3">Icon Text</div>
+                       <div data-role="button" data-inline="true" data-icon="reveal" id="button-4"></div>
+                       <div data-role="button" data-inline="true" data-icon="send" data-style="circle" id="button-5"></div>
+                       <div data-role="button" data-inline="true" data-icon="favorite" data-style="nobg" id="button-6"></div>
+               </div>
+       </div>
+</div>
+
+</body>
+</html>
diff --git a/tests/additional-unit-tests/check/check-tests.js b/tests/additional-unit-tests/check/check-tests.js
new file mode 100755 (executable)
index 0000000..dbb4187
--- /dev/null
@@ -0,0 +1,196 @@
+/*
+ * Unit Test: Checkbox
+ *
+ * Hyunjung Kim <hjnim.kim@samsung.com>
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+$("#checkpage").live("pageinit", function ( event ) {
+
+       module("checkbox");
+
+       var unit_check = function ( widget, type ) {
+               var checkbox,
+                       label,
+                       checkClass,
+                       classPrefix = "ui-checkbox";
+
+               widget.checkboxradio( );
+               checkbox = widget.parent( );
+               ok( checkbox.hasClass( classPrefix ) , "Create - Checkbox");
+
+               checkClass = classPrefix + "-on";
+               if ( !widget.is(":checked") ) {
+                       checkClass = classPrefix + "-off";
+               }
+               if ( widget.hasClass("favorite") ) {
+                       ok( checkbox.hasClass("favorite"), "Style - Favorite");
+               }
+
+               // Text Trim, Cause jQueryMobile( JQM ) 1.1 forced to add -"\u00a0"in buttonIcon( ButtonMarkup )
+               // JQM 1.1 buttonMarkup code :
+               // - if ( buttonIcon ) buttonIcon.appendChild( document.createTextNode("\u00a0") );
+               label = checkbox.children( ).last( );
+               equal ( label.text( ).trim( ), type, "label, type string must be same");
+
+               label.trigger("vclick");
+               if ( !widget.is(":disabled") ) {
+                       checkClass = classPrefix + "-on";
+                       ok( label.hasClass( checkClass ) , "Click - Normal Checkbox On");
+
+                       checkClass = classPrefix + "-off";
+                       label.trigger("vclick");
+                       ok( label.hasClass( checkClass ) , "Click - Normal Checkbox Off");
+               } else {
+                       ok( label.hasClass( checkClass ) , "Click - Disable Checkbox");
+                       label.trigger("vclick");
+                       ok( label.hasClass( checkClass ) , "Click - click event doesn't have effect");
+               }
+
+               /*markup check */
+               ok( label.find('.ui-btn-hastxt'), "Markup check for text");
+               ok( label.find('.ui-btn-text') , "Markup check for text");
+               equal( label.find('.ui-btn-hastxt span.ui-btn-text').last( ).html( ), type , "Markup check for text value");
+
+
+               /*API check*/
+               widget.checkboxradio('disable') ;
+               equal( widget.is(":disabled") , true, "API check disable") ;
+               ok( checkbox.hasClass("ui-disabled") , "API disable - Disable Checkbox");
+
+               widget.checkboxradio('enable') ;
+               equal( widget.is(":disabled") , false, "API check enable") ;
+               equal( checkbox.hasClass("ui-disabled") , false, "API enable - Disable Checkbox");
+
+
+       },
+
+               unit_check_events = function ( widget, type ) {
+                       var createEvent = false,
+                               changeEvent = false,
+                               checkbox,
+                               label;
+
+                       widget.checkboxradio({create: function ( ) {
+                               createEvent = true ;
+                       }}  ) ;
+                       checkbox = widget.parent( );
+                       label = checkbox.children( ).last( );
+
+                       widget.bind("change", function ( ) {
+                               changeEvent = true ;
+                       } ) ;
+
+                       $('#checkpage').find(":jqmData(role=controlgroup)").trigger('create') ;
+                       ok( createEvent , "Checkbox Create Event");
+
+                       widget.trigger("click");
+                       ok( changeEvent , "Checkbox Change Event");
+               };
+
+       test("checkbox - Normal", function ( ) {
+               unit_check( $("#checkbox-1"), "Normal");
+       } );
+
+       test("checkbox - Checked, Disabled", function ( ) {
+               unit_check( $("#checkbox-2"), "Checked, Disabled");
+       } );
+
+       test("checkbox - Disabled", function ( ) {
+               unit_check( $("#checkbox-3"), "Disabled");
+       } );
+
+       test("Favorite - Favorite", function ( ) {
+               unit_check( $("#checkbox-4"), "Favorite");
+       } );
+
+       test("Favorite - Favorite Checked, Disabled", function ( ) {
+               unit_check( $("#checkbox-5"), "Favorite Checked, Disabled");
+       } );
+
+       test("Favorite - Favorite, Disabled", function ( ) {
+               unit_check( $("#checkbox-6"), "Favorite, Disabled");
+       } );
+
+       test("checkbox - Normal Dynamic", function ( ) {
+
+               var markup;
+               //remove all controls form content
+               $('#checkpage').find(":jqmData(role=controlgroup)").empty( );
+
+               markup = '<input type= "checkbox"name= "checkbox-1"id= "checkbox-1"/><label for= "checkbox-1">Normal Dynamic</label>';
+               $('#checkpage').find(":jqmData(role=controlgroup)").append( markup ) ;
+               $('#checkpage').find(":jqmData(role=controlgroup)").trigger('create') ;
+
+               unit_check( $("#checkbox-1"), "Normal Dynamic");
+       } );
+
+
+       test("checkbox - Checked, Disabled Dynamic", function ( ) {
+
+               var markup;
+               //remove all controls form content
+               $('#checkpage').find(":jqmData(role=controlgroup)").empty( );
+
+               markup = '<input type= "checkbox"name= "checkbox-2"id= "checkbox-2"checked= "checked"disabled= "true"/><label for= "checkbox-2">Checked, Disabled Dymanic</label>';
+               $('#checkpage').find(":jqmData(role=controlgroup)").append( markup ) ;
+               $('#checkpage').find(":jqmData(role=controlgroup)").trigger('create') ;
+               unit_check( $("#checkbox-2"), "Checked, Disabled Dymanic");
+       } );
+
+       test("checkbox - Disabled Dynamic", function ( ) {
+               var markup;
+               //remove all controls form content
+               $('#checkpage').find(":jqmData(role=controlgroup)").empty( );
+
+               markup = '<input type= "checkbox"name= "checkbox-3"id= "checkbox-3"disabled= "true"/><label for= "checkbox-3">Disabled Dynamic</label>';
+               $('#checkpage').find(":jqmData(role=controlgroup)").append( markup ) ;
+               $('#checkpage').find(":jqmData(role=controlgroup)").trigger('create') ;
+               unit_check( $("#checkbox-3"), "Disabled Dynamic");
+       } );
+
+       test("Favorite - Favorite Dynamic", function ( ) {
+               var markup;
+               //remove all controls form content
+               $('#checkpage').find(":jqmData(role=controlgroup)").empty( );
+
+               markup = '<input type= "checkbox"name= "checkbox-4"id= "checkbox-4"class= "favorite"/><label for= "checkbox-4">Favorite Dynamic</label>';
+               $('#checkpage').find(":jqmData(role=controlgroup)").append( markup ) ;
+               $('#checkpage').find(":jqmData(role=controlgroup)").trigger('create') ;
+               unit_check( $("#checkbox-4"), "Favorite Dynamic");
+       } );
+
+       test("Favorite - Favorite Checked, Disabled Dynamic", function ( ) {
+               var markup;
+               //remove all controls form content
+               $('#checkpage').find(":jqmData(role=controlgroup)").empty( );
+
+               markup = '<input type= "checkbox"name= "checkbox-5"id= "checkbox-5"checked= "checked"disabled= "true"class= "favorite"/><label for= "checkbox-5">Favorite Checked, Disabled Dynamic</label>';
+               $('#checkpage').find(":jqmData(role=controlgroup)").append( markup ) ;
+               $('#checkpage').find(":jqmData(role=controlgroup)").trigger('create') ;
+               unit_check( $("#checkbox-5"), "Favorite Checked, Disabled Dynamic");
+       } );
+
+       test("Favorite - Favorite, Disabled Dynamic", function ( ) {
+               var markup;
+               //remove all controls form content
+               $('#checkpage').find(":jqmData(role=controlgroup)").empty( );
+
+               markup = '<input type= "checkbox"name= "checkbox-6"id= "checkbox-6"disabled= "disabled"class= "favorite"/><label for= "checkbox-6">Favorite, Disabled Dynamic</label>';
+               $('#checkpage').find(":jqmData(role=controlgroup)").append( markup ) ;
+               $('#checkpage').find(":jqmData(role=controlgroup)").trigger('create') ;
+               unit_check( $("#checkbox-6"), "Favorite, Disabled Dynamic");
+       } );
+
+       test("Favorite - Favorite, Disabled Dynamic Events", function ( ) {
+               var markup ;
+               //remove all controls form content
+               $('#checkpage').find(":jqmData(role=controlgroup)").empty( );
+
+               markup = '<input type= "checkbox"name= "checkbox-6"id= "checkbox-6"disabled= "disabled"class= "favorite"/><label for= "checkbox-6">Favorite, Disabled Dynamic Events</label>';
+               $('#checkpage').find(":jqmData(role=controlgroup)").append( markup ) ;
+               //$('#checkpage').find(":jqmData(role=controlgroup)").trigger('create') ;
+               unit_check_events( $("#checkbox-6"), "Favorite, Disabled Dynamic Events");
+       } );
+
+} );
diff --git a/tests/additional-unit-tests/check/index.html b/tests/additional-unit-tests/check/index.html
new file mode 100755 (executable)
index 0000000..284169b
--- /dev/null
@@ -0,0 +1,52 @@
+<!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.2.0/external/qunit.css" />
+       <script src="../../../libs/js/jquery-mobile-1.1.0/tests/jquery.testHelper.js"></script>
+       <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+       <script src="check-tests.js"></script>
+
+       <title>Check-Box</title>
+</head>
+
+<body>
+
+<h1 id="qunit-header">Check-Box</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="checkpage">
+               <div data-role="header" data-position="fixed">
+                       <h1>Checkbox</h1>
+               </div>
+               <div data-role="contents">
+                       <fieldset data-role="controlgroup">
+                       <input type="checkbox" name="checkbox-1" id="checkbox-1"/>
+                       <label for="checkbox-1">Normal</label>
+                       <input type="checkbox" name="checkbox-2" id="checkbox-2" checked="checked" disabled="true"/>
+                       <label for="checkbox-2">Checked, Disabled</label>
+                       <input type="checkbox" name="checkbox-3" id="checkbox-3" disabled="true"/>
+                       <label for="checkbox-3">Disabled</label>
+                       <input type="checkbox" name="checkbox-4" id="checkbox-4" class="favorite"/>
+                       <label for="checkbox-4">Favorite</label>
+                       <input type="checkbox" name="checkbox-5" id="checkbox-5" checked="checked" disabled="true" class="favorite"/>
+                       <label for="checkbox-5">Favorite Checked, Disabled</label>
+                       <input type="checkbox" name="checkbox-6" id="checkbox-6" disabled="disabled" class="favorite"/>
+                       <label for="checkbox-6">Favorite, Disabled</label>
+                       </fieldset>
+               </div>
+       </div>
+</div>
+
+</body>
+</html>
diff --git a/tests/additional-unit-tests/collapsible/collapsible-tests.js b/tests/additional-unit-tests/collapsible/collapsible-tests.js
new file mode 100755 (executable)
index 0000000..b6a17ef
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * collapse unit tests
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+( function ( $ ) {
+       module("collapse test");
+
+       var unit_collapse = function ( widget ) {
+               var created_collapse = widget.collapsible( ),
+                       obj_collapse = created_collapse.data("collapsible");
+
+               ok( created_collapse, "Create");
+
+               /*Markup check*/
+               equal( widget.hasClass('ui-collapsible'), true, "Markup check") ;
+
+               /* Check Option */
+               equal( obj_collapse.options.expandCueText, " click to expand contents", "Collapsed test -> expandCueText");
+               equal( obj_collapse.options.collapseCueText, " click to collapse contents", "Collapsed test -> collapseCueText");
+               equal( obj_collapse.options.collapsed, true, "Collapsed test -> collapsed");
+               equal( obj_collapse.options.heading, "h1,h2,h3,h4,h5,h6,legend,li", "Collapsed test -> heading");
+               equal( obj_collapse.options.theme, 's', "Collapsed test -> theme");
+               equal( obj_collapse.options.contentTheme, null, "Collapsed test -> contentTheme");
+
+               /* Check event */
+               created_collapse.trigger("collpase");
+               equal( created_collapse.hasClass("ui-collapsible-collapsed") , true, "API test -> collapse");
+
+               created_collapse.trigger("expand");
+               equal( created_collapse.hasClass("ui-collapsible-collapsed") , false, "API test -> expand");
+       };
+
+       test("collapse test", function ( ) {
+               unit_collapse( $("#collapsedContent") );
+       } );
+} ( jQuery ));
diff --git a/tests/additional-unit-tests/collapsible/index.html b/tests/additional-unit-tests/collapsible/index.html
new file mode 100755 (executable)
index 0000000..fc150a8
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html lang="en">
+<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.2.0/external/qunit.css" />
+
+       <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+
+  <script src="collapsible-tests.js"></script>
+</head>
+<body>
+
+<h1 id="qunit-header">Collapsible</h1>
+<h2 id="qunit-banner"></h2>
+<h2 id="qunit-userAgent"></h2>
+<ol id="qunit-tests">
+</ol>
+
+<div data-nstest-role="page" data-add-back-btn="true" id='collapsiblepage'>
+       <div data-nstest-role="header" data-nstest-position="fixed">
+               <h1>Collapsible</h1>
+       </div>
+       <div data-nstest-role="content">
+               <div data-role="collapsible" id="collapsedContent">
+                        <h3>I'm a header</h3>
+                       <a>test</a>
+                       <p>Some content would be here</p>
+               </div>
+       </div>
+</div>
+</body>
+</html>
diff --git a/tests/additional-unit-tests/datetimepicker/datetimepicker-tests.js b/tests/additional-unit-tests/datetimepicker/datetimepicker-tests.js
new file mode 100755 (executable)
index 0000000..45326a4
--- /dev/null
@@ -0,0 +1,497 @@
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok, asyncTest, Globalize, start, stop, deepEqual, range*/
+$(document).ready( function () {
+
+       module( "Date Time Picker" );
+
+       var datetime,
+               date,
+               time,
+               custom,
+               make2digit,
+               isLeapYear,
+               getDay,
+               getCurDate,
+               objDatetime,
+               objDate,
+               objTime,
+               objCustom,
+               markup,
+               datetime2 ,
+               date2,
+               time2 ,
+               custom2 ,
+               objDatetime2,
+               objDate2 ,
+               objTime2,
+               objCustom2;
+
+       // trigger pagecreate
+       $( "#page-1" ).page();
+
+       datetime = $( "#datetime" )[0];
+       date = $( "#date" )[0];
+       time = $( "#time" )[0];
+       custom = $( "#custom" )[0];
+
+       make2digit = function (arr) {
+               var i, ret;
+               for ( i = 0;  i < arr.length;  i++ ) {
+                       arr[i] = arr[i].toString();
+                       ret = arr[i].toString(10);
+                       if ( arr[i] < 10 ) {
+                               arr[i] = "0" + arr[i];
+                       }
+               }
+               return arr;
+       } ;
+
+       isLeapYear = function ( year ) {
+               return year % 4 ? 0 : ( year % 100 ? 1 : ( year % 400 ? 0 : 1 ) );
+       } ;
+
+       getDay = function () {
+               var date = new Date( "May 2 18:30:00 2012" ),
+                       daysInMonth = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ],
+                       day = daysInMonth[ date.getMonth() ];
+               if ( day == 28 ) {
+                       day += isLeapYear( date.getFullYear() );
+               }
+               return day;
+       } ;
+
+       getCurDate = function () {
+               var date = new Date( "May 2 18:30:00 2012" );
+               return date.getDate();
+       } ;
+
+       //Dymanically creating datetimepicker
+       objDatetime = $(datetime).data( "datetimepicker" );
+       objDate = $(date).data( "datetimepicker" );
+       objTime = $(time).data( "datetimepicker" );
+       objCustom = $(custom).data( "datetimepicker" );
+       markup = '<ul data-role="listview" id="datetimeList2">' +
+                                               '<li class="ui-li-2line-sub-main">' +
+                                                       '<span class="ui-li-text-main">' +
+                                                               '<input type="datetime" id="datetime2" />' +
+                                                       '</span>' +
+                                                       '<span class="ui-li-text-sub">DateTimePicker</span>' +
+                                               '</li>' +
+                                               '<li class="ui-li-2line-sub-main">' +
+                                                       '<span class="ui-li-text-main">' +
+                                                               '<input type="date" id="date2"/>' +
+                                                       '</span>' +
+                                                       '<span class="ui-li-text-sub">DatePicker</span>' +
+                                               '</li>' +
+                                               '<li class="ui-li-2line-sub-main">' +
+                                                       '<span class="ui-li-text-main">' +
+                                                               '<input type="time" id="time2"/>' +
+                                                       '</span>' +
+                                                       '<span class="ui-li-text-sub">TimePicker</span>' +
+                                               '</li>' +
+                                               '<li class="ui-li-2line-sub-main">' +
+                                                       '<span class="ui-li-text-main">' +
+                                                               '<input type="datetime" id="custom2" data-format="MMM dd yyyy hh:mm tt" value="2012-06-30T00:00:00+00:00" />' +
+                                                       '</span>' +
+                                                       '<span class="ui-li-text-sub">DateTimePicker</span>' +
+                                               '</li>' +
+                                       '</ul>';
+
+       // trigger pagecreate
+       $( "#page-1" ).page();
+       $('#page-1').find( ":jqmData(role=content)" ).append(markup);
+       $('#page-1').find( ":jqmData(role=content)" ).trigger('create');
+
+       datetime2 = $( "#datetime2" )[0];
+       date2 = $( "#date2" )[0];
+       time2 = $( "#time2" )[0];
+       custom2 = $( "#custom2" )[0];
+
+       objDatetime2 = $(datetime2).data( "datetimepicker" );
+       objDate2 = $(date2).data( "datetimepicker" );
+       objTime2 = $(time2).data( "datetimepicker" );
+       objCustom2 = $(custom2).data( "datetimepicker" );
+       /* End of dynamic creation*/
+
+       asyncTest( "Auto-initialization", function () {
+               ok( objDatetime, "should Date/Time instace created" );
+               ok( objDate, "should Date instance created" );
+               ok( objTime, "should Time instance created" );
+               ok( objCustom, "should Custom format instance created" );
+               start();
+       });
+
+       asyncTest( "Options", function () {
+               equal( objDatetime.options.type, "datetime", "should 'datetime' type created." );
+               equal( objDate.options.type, "date", "should 'date' type created." );
+               equal( objTime.options.type, "time", "should 'time' type created." );
+               equal( objCustom.options.type, "datetime", "should custom format created as 'datetime' type." );
+               equal( objCustom.options.format, "MMM dd yyyy hh:mm tt", "should accept custom format string." );
+               equal( objCustom.options.date.toString(), new Date( "Jun 30 00:00:00 UTC+0000 2012" ).toString(), "should accept preset date." );
+               start();
+       });
+
+       asyncTest( "Private Methods", function () {
+               var months, updateFieldTest ;
+               ok( ( function () {
+                       var year = 0,
+                               expect = false,
+                               actual = false;
+
+                       try {
+                               for ( year = 1;  year < 2100;  year++ ) {
+                                       expect = new Date( year, 1, 29 ).getDate() == 29;
+                                       actual = objDatetime._isLeapYear( year );
+                                       if ( expect != actual ) {
+                                               throw year + " is wrong";
+                                       }
+                               }
+                       } catch ( exception ) {
+                               console.log( exception );
+                               return false;
+                       }
+                       return true;
+               }()), "should be able to check leap year" );
+
+               updateFieldTest = function ( format, value, obj, expect ) {
+                       var target = $('<div data-pat=' + format + '></div>');
+                       obj._updateField( target, value );
+
+                       return target.text();
+               } ;
+
+               deepEqual(
+                       [
+                               updateFieldTest( "h", 0, objTime2 ),
+                               updateFieldTest( "hh", 1, objTime2 ),
+                               updateFieldTest( "H", 13 , objTime2),
+                               updateFieldTest( "HH", 9, objTime2 ),
+                               updateFieldTest( "m", 9, objTime2 ),
+                               updateFieldTest( "mm", 9 , objTime2),
+                               updateFieldTest( "s", 1, objTime2 ),
+                               updateFieldTest( "ss", 10 , objTime2),
+                               updateFieldTest( "MMM", 3 , objTime2),
+                               updateFieldTest( "MMMM", 3, objTime2 ),
+                               updateFieldTest( "yy", 95, objTime2 ),
+                               updateFieldTest( "yyyy", 95, objTime2 )
+                       ],
+                       [
+                               "12", "01", "13", "09", "9", "09", "1" , "10", Globalize.culture().calendar.months.namesAbbr[2], Globalize.culture().calendar.months.names[2], "95", "0095"
+                       ],
+                       "should update field to given value with format"
+               );
+
+               deepEqual(
+                       [
+                               updateFieldTest( "h", 0, objDate2),
+                               updateFieldTest( "hh", 1, objDate2 ),
+                               updateFieldTest( "H", 13 , objDate2),
+                               updateFieldTest( "HH", 9, objDate2 ),
+                               updateFieldTest( "m", 9, objDate2 ),
+                               updateFieldTest( "mm", 9, objDate2 ),
+                               updateFieldTest( "s", 1, objDate2 ),
+                               updateFieldTest( "ss", 10 , objDate2),
+                               updateFieldTest( "MMM", 3 , objDate2),
+                               updateFieldTest( "MMMM", 3 , objDate2),
+                               updateFieldTest( "yy", 9, objDate2 ),
+                               updateFieldTest( "yyyy", 9, objDate2 )
+                       ],
+                       [
+                               "12", "01", "13", "09", "9", "09", "1" , "10", Globalize.culture().calendar.months.namesAbbr[2], Globalize.culture().calendar.months.names[2], "09", "0009"
+                       ],
+                       "should update field to given value with format"
+               );
+
+               ok( ( function () {
+                       var beforeNoon = objTime.options.date.getHours() < 12;
+                       objTime._switchAmPm();
+                       return beforeNoon != objTime.options.date.getHours() < 12;
+               }()), "should change AM/PM by AMPM button" );
+
+               deepEqual( [ "MMMM", " ", "dd", " ", "yyyy", " ", "hh", ":", "mm", " ", "dummy space" ],
+                       objTime._parsePattern( "MMMM dd yyyy hh:mm 'dummy space'" ), "should parse DTF string as array" );
+
+               objDatetime.options.date = new Date( "May 2 18:30:00 2012" );
+
+               months = Globalize.culture().calendar.months.namesAbbr.slice();
+               if ( months.length > 12 ) {
+                       months.length = 12;
+               }
+
+
+               deepEqual(
+                       [
+                               {
+                                       values : make2digit( range( 1, getDay() )),
+                                       data : range( 1, getDay() ),
+                                       current : getCurDate() - 1,
+                                       numItems : getDay()
+                               },
+                               {
+                                       values : make2digit (range( 0, 59 )),
+                                       data : range(0, 59),
+                                       numItems : 60,
+                                       current : 0
+                               },
+                               {
+                                       values : range( 1900, 2100 ),
+                                       data : range( 1900, 2100 ),
+                                       numItems : 201,
+                                       current : 112
+                               },
+                               { // hour h 6
+                                       values : [ "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" ],
+                                       data : [ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 12 ],
+                                       numItems : 12,
+                                       current : 5
+                               },
+                               { // hour H 6
+                                       values : range( 0, 23 ),
+                                       data : range( 0, 23 ),
+                                       numItems : 24,
+                                       current : 18
+                               },
+                               {
+                                       values : months,
+                                       data : range( 1, 12 ),
+                                       numItems : 12,
+                                       current : 4
+                               },
+
+                       ],
+                       [
+                               objDatetime._populateDataSelector( "day", "dd", objDatetime ),
+                               objDatetime._populateDataSelector( "sec", "ss", objDatetime ),
+                               objDatetime._populateDataSelector( "year", "YYYY", objDatetime ),
+                               objDatetime._populateDataSelector( "hour", "hh", objDatetime ),
+                               objDatetime._populateDataSelector( "hour", "H", objDatetime ),
+                               objDatetime._populateDataSelector( "month", "MMM", objDatetime ),
+
+                       ],
+                       "should populate data selector by given field and pattern"
+               );
+
+               /*date Value Api*/
+               objDate.value( "Jan 1 09:00:00 2012" );
+               equal(objDate.value( ) , "2012-01-01" , "Set and get value for date" );
+
+               /*date Value Api*/
+               objTime.value( "Jan 1 09:00:00 2012" );
+               equal(objTime.value( ) , "09:00:00" , "Set and get value for time" );
+               start();
+       });
+
+       asyncTest( "Public Methods", function () {
+               objDatetime.value.call( objDatetime, "Jan 1 09:00:00 2012" );
+               equal( "2012-01-01T09:00:00", objDatetime.value(), "should set and get value by API" );
+               var format = "yyyy MM dd hh mm";
+               objDatetime._setFormat( format );
+               equal( objDatetime.option( "format" ), format, "should set type and format" );
+               start();
+       });
+
+       asyncTest( "Events", function () {
+               var str = "May 2 18:00:00 2012";
+
+               $(datetime).bind( "date-changed", function (e, date) {
+                       equal( objDatetime.value(), "2012-05-02T18:00:00", "Should invoke event when date changed" );
+                       start();
+               });
+
+               objDatetime.value( str );
+       });
+
+
+       asyncTest( "Auto-initialization Dynamic", function () {
+               ok( objDatetime2, "should Date/Time instace created" );
+               ok( objDate2, "should Date instance created" );
+               ok( objTime2, "should Time instance created" );
+               ok( objCustom2, "should Custom format instance created" );
+               start();
+       });
+
+       asyncTest( "Options Dynamic", function () {
+               equal( objDatetime2.options.type, "datetime", "should 'datetime' type created." );
+               equal( objDate2.options.type, "date", "should 'date' type created." );
+               equal( objTime2.options.type, "time", "should 'time' type created." );
+               equal( objCustom2.options.type, "datetime", "should custom format created as 'datetime' type." );
+               equal( objCustom2.options.format, "MMM dd yyyy hh:mm tt", "should accept custom format string." );
+               equal( objCustom2.options.date.toString(), new Date( "Jun 30 00:00:00 UTC+0000 2012" ).toString(), "should accept preset date." );
+
+               start();
+       });
+
+       asyncTest( "Private Methods Dynamic", function () {
+               var months, updateFieldTest ;
+               ok( ( function () {
+                       var year = 0,
+                               expect = false,
+                               actual = false;
+
+                       try {
+                               for ( year = 1;  year < 2100;  year++ ) {
+                                       expect = new Date( year, 1, 29 ).getDate() == 29;
+                                       actual = objDatetime2._isLeapYear( year );
+                                       if ( expect != actual ) {
+                                               throw year + " is wrong";
+                                       }
+                               }
+                       } catch ( exception ) {
+                               console.log( exception );
+                               return false;
+                       }
+                       return true;
+               }()), "should be able to check leap year" );
+
+               updateFieldTest = function ( format, value, obj, expect ) {
+                       var target = $('<div data-pat=' + format + '></div>');
+                       obj._updateField( target, value );
+
+                       return target.text();
+               } ;
+
+               deepEqual(
+                       [
+                               updateFieldTest( "h", 0, objTime2 ),
+                               updateFieldTest( "hh", 1, objTime2 ),
+                               updateFieldTest( "H", 13 , objTime2),
+                               updateFieldTest( "HH", 9, objTime2 ),
+                               updateFieldTest( "m", 9, objTime2 ),
+                               updateFieldTest( "mm", 9 , objTime2),
+                               updateFieldTest( "s", 1, objTime2 ),
+                               updateFieldTest( "ss", 10 , objTime2),
+                               updateFieldTest( "MMM", 3 , objTime2),
+                               updateFieldTest( "MMMM", 3, objTime2 ),
+                               updateFieldTest( "yy", 95, objTime2 ),
+                               updateFieldTest( "yyyy", 95, objTime2 )
+                       ],
+                       [
+                               "12", "01", "13", "09", "9", "09", "1" , "10", Globalize.culture().calendar.months.namesAbbr[2], Globalize.culture().calendar.months.names[2], "95", "0095"
+                       ],
+                       "should update field to given value with format"
+               );
+
+               deepEqual(
+                       [
+                               updateFieldTest( "h", 0, objDate2),
+                               updateFieldTest( "hh", 1, objDate2 ),
+                               updateFieldTest( "H", 13 , objDate2),
+                               updateFieldTest( "HH", 9, objDate2 ),
+                               updateFieldTest( "m", 9, objDate2 ),
+                               updateFieldTest( "mm", 9, objDate2 ),
+                               updateFieldTest( "s", 1, objDate2 ),
+                               updateFieldTest( "ss", 10 , objDate2),
+                               updateFieldTest( "MMM", 3 , objDate2),
+                               updateFieldTest( "MMMM", 3 , objDate2),
+                               updateFieldTest( "yy", 9, objDate2 ),
+                               updateFieldTest( "yyyy", 9, objDate2 )
+                       ],
+                       [
+                               "12", "01", "13", "09", "9", "09", "1" , "10", Globalize.culture().calendar.months.namesAbbr[2], Globalize.culture().calendar.months.names[2], "09", "0009"
+                       ],
+                       "should update field to given value with format"
+               );
+
+               ok( ( function () {
+                       var beforeNoon = objTime2.options.date.getHours() < 12;
+                       objTime2._switchAmPm();
+                       return beforeNoon != objTime2.options.date.getHours() < 12;
+               }()), "should change AM/PM by AMPM button" );
+
+               deepEqual(
+                       [ "MMMM", " ", "dd", " ", "yyyy", " ", "hh", ":", "mm", " ", "dummy space" ],
+                       objTime2._parsePattern( "MMMM dd yyyy hh:mm 'dummy space'" ),
+                       "should parse DTF string as array"
+               );
+
+               objDatetime2.options.date = new Date( "May 2 18:30:00 2012" );
+
+               months = Globalize.culture().calendar.months.namesAbbr.slice();
+               if ( months.length > 12 ) {
+                       months.length = 12;
+               }
+
+               deepEqual(
+                       [
+                               {
+                                       values : make2digit( range( 1, getDay() )),
+                                       data : range( 1, getDay() ),
+                                       current : getCurDate() - 1,
+                                       numItems : getDay()
+                               },
+                               {
+                                       values : make2digit (range( 0, 59 )),
+                                       data : range(0, 59),
+                                       numItems : 60,
+                                       current : 0
+                               },
+                               {
+                                       values : range( 1900, 2100 ),
+                                       data : range( 1900, 2100 ),
+                                       numItems : 201,
+                                       current : 112
+                               },
+                               { // hour h 6
+                                       values : [ "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" ],
+                                       data : [ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 12 ],
+                                       numItems : 12,
+                                       current : 5
+                               },
+                               { // hour H 6
+                                       values : range( 0, 23 ),
+                                       data : range( 0, 23 ),
+                                       numItems : 24,
+                                       current : 18
+                               },
+                               {
+                                       values : months,
+                                       data : range( 1, 12 ),
+                                       numItems : 12,
+                                       current : 4
+                               },
+
+                       ],
+                       [
+                               objDatetime2._populateDataSelector( "day", "dd", objDatetime2 ),
+                               objDatetime2._populateDataSelector( "sec", "ss", objDatetime2 ),
+                               objDatetime2._populateDataSelector( "year", "YYYY", objDatetime2 ),
+                               objDatetime2._populateDataSelector( "hour", "hh", objDatetime2 ),
+                               objDatetime2._populateDataSelector( "hour", "H", objDatetime2 ),
+                               objDatetime2._populateDataSelector( "month", "MMM", objDatetime2 ),
+
+                       ],
+                       "should populate data selector by given field and pattern"
+               );
+
+               /*date Value Api*/
+               objDate2.value( "Jan 1 09:00:00 2012" );
+               equal(objDate2.value( ) , "2012-01-01" , "Set and get value for date" );
+
+               /*date Value Api*/
+               objTime2.value( "Jan 1 09:00:00 2012" );
+               equal(objTime2.value( ) , "09:00:00" , "Set and get value for time" );
+
+               start();
+       });
+
+       asyncTest( "Public Methods Dynamic", function () {
+               objDatetime2.value.call( objDatetime2, "Jan 1 09:00:00 2012" );
+               equal( "2012-01-01T09:00:00", objDatetime2.value(), "should set and get value by API" );
+               var format = "yyyy MM dd hh mm";
+               objDatetime2._setFormat( format );
+               equal( objDatetime2.option( "format" ), format, "should set type and format" );
+               start();
+       });
+
+       asyncTest( "Events Dynamic", function () {
+               var str = "May 2 18:00:00 2012";
+               $(datetime2).bind( "date-changed", function (e, date) {
+                       equal( objDatetime2.value(), "2012-05-02T18:00:00", "Should invoke event when date changed" );
+                       start();
+               });
+
+               objDatetime2.value( str );
+       });
+
+
+});
diff --git a/tests/additional-unit-tests/datetimepicker/index.html b/tests/additional-unit-tests/datetimepicker/index.html
new file mode 100755 (executable)
index 0000000..f56a916
--- /dev/null
@@ -0,0 +1,74 @@
+<!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.2.0/external/qunit.css" />
+
+       <script src="../../../libs/js/jquery-mobile-1.1.0/tests/jquery.testHelper.js"></script>
+       <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+       <script src="datetimepicker-tests.js"></script>
+
+       <title>Date Time Picker</title>
+</head>
+
+<body>
+
+<h1 id="qunit-header">Date Time Picker</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="dummy-page">
+               <div data-role="header" data-position="fixed">
+                       <h1>Dummy</h1>
+               </div>
+               <div data-role="contents">
+               </div>
+       </div>
+       <div data-role="page" id="page-1">
+               <div data-role="header" data-position="fixed">
+                       <h1>Date Time Picker</h1>
+               </div>
+               <div data-role="content">
+                       <ul data-role="listview">
+                               <li class="ui-li-2line-sub-main">
+                                       <span class="ui-li-text-main">
+                                               <input type="datetime" id="datetime" />
+                                       </span>
+                                       <span class="ui-li-text-sub">DateTimePicker</span>
+                               </li>
+                               <li class="ui-li-2line-sub-main">
+                                       <span class="ui-li-text-main">
+                                               <input type="date" id="date"/>
+                                       </span>
+                                       <span class="ui-li-text-sub">DatePicker</span>
+                               </li>
+                               <li class="ui-li-2line-sub-main">
+                                       <span class="ui-li-text-main">
+                                               <input type="time" id="time"/>
+                                       </span>
+                                       <span class="ui-li-text-sub">TimePicker</span>
+                               </li>
+                               <li class="ui-li-2line-sub-main">
+                                       <span class="ui-li-text-main">
+                                               <input type="datetime" id="custom" data-format="MMM dd yyyy hh:mm tt" value="2012-06-30T00:00:00+00:00" />
+                                       </span>
+                                       <span class="ui-li-text-sub">DateTimePicker</span>
+                               </li>
+                       </ul>
+               </div>
+       </div>
+
+</div>
+
+</body>
+</html>
+
diff --git a/tests/additional-unit-tests/dayselector/dayselector-tests.js b/tests/additional-unit-tests/dayselector/dayselector-tests.js
new file mode 100755 (executable)
index 0000000..8363e91
--- /dev/null
@@ -0,0 +1,159 @@
+/*
+ * Unit Test: Dayselector
+ * modified by : Koeun Choi <koeun.choi@samsung.com>
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+( function ( $ ) {
+
+       module("Day selector");
+
+       var unit_dayselector = function ( elt, expectedType, expectedTheme ) {
+               var days = 7,
+                       checkbox,
+                       label,
+                       expectedId,
+                       i;
+
+               elt.dayselector( );
+
+               ok( elt.hasClass( 'ui-dayselector '), "day-selector has 'ui-dayselector 'class.");
+               // main element should be a controlgroup
+               ok( elt.hasClass( 'ui-controlgroup '), "day-selector has 'ui-controlgroup 'class.");
+
+               equal( elt.attr( 'data- '+ $.mobile.ns + 'type '), expectedType, "should have '"+ expectedType +"'type");
+
+               for ( i = 0; i < days ; i++ ) {
+                       expectedId = elt.attr( 'id ') + '_ '+ i;
+                       checkbox = elt.find( '.ui-checkbox :checkbox[value= '+ i + '][id= '+ expectedId + '] ');
+                       equal( checkbox.length, 1, "should be one checkbox per day");
+                       equal( checkbox.prop( 'value '), String( i ), "should have correct day value");
+
+                       label = checkbox.siblings( ).first( );
+                       equal( label.length, 1, "should be one label per day");
+                       equal( label.attr( 'for '), expectedId, "should associate correctly with checkbox");
+                       ok( label.hasClass( 'ui-dayselector-label- '+ i ), "should have the right label class");
+                       equal( label.jqmData( 'theme '), expectedTheme, "should have '"+ expectedTheme +"'theme");
+               }
+       };
+
+       /* Test 1. Default Configuration Check */
+       asyncTest("Default Configuration Check", function ( ) {
+
+               $.testHelper.pageSequence( [
+                       function ( ) {
+                               $.testHelper.openPage( '#dayselector-test-configuration ');
+                       },
+
+                       function ( ) {
+                               var expectedType = 'horizontal ',
+                                       testPage = $( '#dayselector-test-configuration '),
+                                       expectedTheme = 's ',
+                                       daySelector;
+
+                               // test default values are applied correctly
+                               daySelector = testPage.find( '#dayselector-test-configuration-default ');
+                               unit_dayselector( daySelector, expectedType, expectedTheme );
+
+                               start( );
+                       }
+               ] );
+       } );
+
+       /* Test 2. Theme Configuration Check */
+       asyncTest("Theme Configuration Check", function ( ) {
+
+               $.testHelper.pageSequence( [
+                       function ( ) {
+                               $.testHelper.openPage( '#dayselector-test-configuration ');
+                       },
+
+                       function ( ) {
+                               var expectedType = 'horizontal ',
+                                       testPage = $( '#dayselector-test-configuration '),
+                                       expectedTheme,
+                                       daySelector;
+
+                               // test user theme is applied to dayselector winset correctly
+                               daySelector = testPage.find( '#dayselector-test-configuration-theme ');
+                               daySelector.dayselector( );
+                               expectedTheme = daySelector.jqmData( 'theme ');
+                               equal( expectedTheme, 'a ', "dayselector fieldset theme is 'a '");
+                               unit_dayselector( daySelector, expectedType, expectedTheme );
+
+                               start( );
+                       }
+
+               ] );
+       } );
+
+       /* Test 3. Custom Configuration Check */
+       asyncTest("Custom Configuration Check", function ( ) {
+
+               $.testHelper.pageSequence( [
+                       function ( ) {
+                               $.testHelper.openPage( '#dayselector-test-configuration ');
+                       },
+
+                       function ( ) {
+                               var expectedType = 'vertical ',
+                                       testPage = $( '#dayselector-test-configuration '),
+                                       expectedTheme = 'a ',
+                                       daySelector;
+
+                               // test custom config is applied correctly
+                               daySelector = testPage.find( '#dayselector-test-configuration-custom ');
+
+                               daySelector.dayselector( { type: expectedType, theme: expectedTheme } );
+                               unit_dayselector( daySelector, expectedType, expectedTheme );
+
+                               start( );
+                       }
+
+               ] );
+       } );
+
+       /* Test 4. Check Event and APIs */
+       asyncTest("Check Event and APIs", function ( ) {
+
+               $.testHelper.pageSequence( [
+                       function ( ) {
+                               $.testHelper.openPage( '#dayselector-test-select ');
+                       },
+
+                       function ( ) {
+                               var testPage,
+                                       daySelectorElem,
+                                       wednesday,
+                                       friday;
+                               testPage = $( '#dayselector-test-select ');
+                               ok( testPage.hasClass( 'ui-page-active ') );
+
+                               // test defaults are applied correctly
+                               daySelectorElem = testPage.find( '#dayselector-test-select-1 ');
+
+                               // nothing should be selected yet
+                               deepEqual( daySelectorElem.dayselector( 'value '), [] );
+
+                               // click on Wednesday and Friday to switch them on
+                               wednesday = daySelectorElem.find( '.ui-checkbox ')[3];
+                               $( wednesday ).find( 'label ').trigger( 'click ');
+
+                               friday = daySelectorElem.find( '.ui-checkbox ')[5];
+                               $( friday ).find( 'label ').trigger( 'click ');
+                               deepEqual( daySelectorElem.dayselector( 'value '), [ '3 ', '5 '] );
+
+                               // turn off Wednesday and Friday
+                               $( wednesday ).find( 'label ').trigger( 'click ');
+                               $( friday ).find( 'label ').trigger( 'click ');
+                               deepEqual( daySelectorElem.dayselector( 'value '), [] );
+
+                               // test the selectAll( ) method
+                               daySelectorElem.dayselector( 'selectAll ');
+                               deepEqual( daySelectorElem.dayselector( 'value '), [ '0 ', '1 ', '2 ', '3 ', '4 ', '5 ', '6 '] );
+
+                               start( );
+                       }
+               ] );
+       } );
+} )( jQuery );
diff --git a/tests/additional-unit-tests/dayselector/index.html b/tests/additional-unit-tests/dayselector/index.html
new file mode 100755 (executable)
index 0000000..57c3d35
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+       <title>jQuery Mobile Day Selector Tests</title>
+
+       <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>
+
+       <script src="../../../libs/js/jquery-mobile-1.1.0/tests/jquery.testHelper.js"></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="dayselector-tests.js"></script>
+       </head>
+       <body>
+
+       <h1 id="qunit-header">jQuery Mobile Day Selector Tests</h1>
+       <h2 id="qunit-banner"></h2>
+       <h2 id="qunit-userAgent"></h2>
+<ol id="qunit-tests">
+</ol>
+
+<div data-nstest-role="page" id="dayselector-test-configuration">
+       <div data-nstest-role="header" data-nstest-position="inline">
+               <h1>Day Selector Tests - configuration</h1>
+       </div>
+       <div data-nstest-role="content">
+         <fieldset id="dayselector-test-configuration-default" data-nstest-role="dayselector"> </fieldset>
+         <fieldset id="dayselector-test-configuration-theme" data-nstest-theme="a" data-nstest-role="dayselector"></fieldset>
+         <fieldset id="dayselector-test-configuration-custom"></fieldset>
+       </div>
+</div>
+
+<div data-nstest-role="page" id="dayselector-test-select">
+       <div data-nstest-role="header" data-nstest-position="inline">
+               <h1>Day Selector Tests - selection</h1>
+       </div>
+       <div data-nstest-role="content">
+         <fieldset id="dayselector-test-select-1" data-nstest-role="dayselector"></fieldset>
+       </div>
+</div>
+
+</body>
+</html>
diff --git a/tests/additional-unit-tests/extendablelist/extendablelist-tests.js b/tests/additional-unit-tests/extendablelist/extendablelist-tests.js
new file mode 100755 (executable)
index 0000000..2cffa86
--- /dev/null
@@ -0,0 +1,124 @@
+/*
+ * Unit Test: Extendable list
+ *
+ * Wongi Lee <wongi11.lee@samsung.com>
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+$( document ).ready( function ( ) {
+
+       module("Extendable List");
+       var unit_extendablelist_test = function ( widget ) {
+
+               var $elContainer = widget,
+                       $elElements = widget.find("li"),
+                       $spanElements = widget.find("span.ui-li-text-main"),
+                       elOptions = widget.extendablelist("option");
+
+               widget.extendablelist( );
+               console.dir( elOptions );
+               /* Initialize and create method */
+               ok( $elContainer );
+               equal( $elElements.length, 51 );        /* 50 <li> items + one button. */
+               equal( $spanElements.length, 50 );      /* 50 <li> items + one button. */
+               /* Options */
+               equal( elOptions.id, "#" + widget.attr('id') );
+               equal( elOptions.childSelector, " li");
+               //equal( elOptions.dbtable, "JSON_DATA");
+               equal( elOptions.template, widget.jqmData('template') );
+               equal( elOptions.extenditems, 50 );
+               equal( elOptions.scrollview, true );
+
+               /*markup check*/
+               ok( widget.hasClass('ui-extendable-list-container'), "Markup check") ;
+
+               /* Click Load more button */
+               ok ( ( function ( ) {
+                       /* Click Button */
+                       $("#load_more_message").click( );
+
+                       $elElements = $("ul#extendable_list_main li");
+                       $spanElements = widget.find("span.ui-li-text-main") ;
+                       console.log( $elElements.length );
+
+                       try {
+                               equal ( $elElements.length, 101 );
+                               equal( $spanElements.length, 100 );     /* 50 <li> items + one button. */
+                       } catch ( exception ) {
+                               console.log("click load more button :" + exception );
+                               return false;
+                       }
+                       return true;
+               }( ) ), "Click Load More button( )");
+
+               ok ( ( function ( ) {
+                       var i = 0,
+                               newJSON = [],
+                               newItem,
+                               firstLI,
+                               result = true;
+
+                       /* make short JSON array */
+                       for ( i = 0; i < 200; i++ ) {
+                               newJSON.push( window.JSON_DATA[ ( i + 100 ) ] );
+                       }
+
+                       /* Call recreate */
+                       $("ul#extendable_list_main").extendablelist("recreate", newJSON );
+
+                       $elContainer = $("ul#extendable_list_main");
+                       $elElements = $("ul#extendable_list_main li");
+
+                       /* Check new List */
+                       ok( $elContainer );
+                       equal( $elElements.length, 51 );        /* 50 <li> items + one button. */
+
+                       newItem = window.JSON_DATA[ 100 ];
+
+                       firstLI = $("ul#extendable_list_main li:first");
+
+                       try {
+                               equal( newItem.NAME, $( firstLI ).find("span.ui-li-text-main").text( ) );
+                       } catch ( exception ) {
+                               console.log( exception );
+                               return false;
+                       }
+
+                       return true;
+               }( ) ), "recreate( )");
+
+               /* Destroy method */
+               ok ( ( function ( ) {
+                       /* Call destroy */
+                       $("ul#extendable_list_main").extendablelist("destroy");
+
+                       var destoyedelElements = $("ul#extendable_list_main li");
+                       console.log( destoyedelElements.length );
+
+                       try {
+                               equal ( destoyedelElements.length, 0 );
+                       } catch ( exception ) {
+                               console.log("destroy :" + exception );
+                               return false;
+                       }
+                       return true;
+               }( ) ), "destroy( )");
+       } ;
+
+       /* Load Dummy Data and Init Extendable List widget*/
+       if ( window.JSON_DATA ) {
+               $("ul").filter( function ( ) {
+                       return $( this ).data("role") == "extendablelist";
+               } ).addClass("elLoadSuccess");
+
+               // trigger pagecreate
+               $("#extendablelist-unit-test").page( );
+               $("ul#extendable_list_main").extendablelist("create");
+
+               test("Extendable list test", function ( ) {
+                       unit_extendablelist_test( $('#extendable_list_main') ) ;
+               } );
+       } else {
+               console.log ("Extendable List Init Fail.");
+       }
+} );
diff --git a/tests/additional-unit-tests/extendablelist/index.html b/tests/additional-unit-tests/extendablelist/index.html
new file mode 100755 (executable)
index 0000000..f2d714b
--- /dev/null
@@ -0,0 +1,69 @@
+<!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.2.0/external/qunit.css" />
+               <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+               <script src = "../../../demos/tizen-gray/widgets/list/virtuallist-db-demo.js"></script>
+               <script src="extendablelist-tests.js"></script>
+               <title>Extendable</title>
+       </head>
+
+       <body>
+               <h1 id="qunit-header">Extendablelist</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="dummy-page">
+                               <div data-role="header" data-position="fixed">
+                                       <h1>Dummy</h1>
+                               </div>
+                               <div data-role="contents">
+                               </div>
+                       </div>
+                       <div data-role="page" id="extendablelist-unit-test" data-add-back-btn="true">
+                               <script id="tmp-1line" type="text/x-jquery-tmpl">
+                                       <li class="ui-li-1line"><span class="ui-li-text-main">${NAME}</span></li>
+                               </script>
+                               <script id="tmp_load_more" type="text/x-jquery-tmpl">
+                                       <li class="ui-li-1line" style="text-align:center; margin:0 auto">
+                                               <div data-role="button">Load ${NUM_MORE_ITEMS} more items</div>
+                                       </li>
+                               </script>
+                               <div data-role="header" data-position="fixed">
+                                       <h1>extendable list</h1>
+                               </div>
+                               <div data-role="content">
+                                       <ul id = "extendable_list_main" data-role="extendablelist" data-extenditems="50" data-template="tmp-1line" data-dbtable="JSON_DATA">
+                                       </ul>
+                               </div>
+                       </div>
+                       <div data-role="page" id="extendablelist-unit-test-dynamic" data-add-back-btn="true">
+                               <script id="tmp-2line-" type="text/x-jquery-tmpl">
+                                       <li class="ui-li-1line"><span class="ui-li-text-main">${NAME}</span></li>
+                               </script>
+                               <script id="tmp_load_more2" type="text/x-jquery-tmpl">
+                                       <li class="ui-li-1line" style="text-align:center; margin:0 auto">
+                                               <div data-role="button">Load ${NUM_MORE_ITEMS} more items</div>
+                                       </li>
+                               </script>
+                               <div data-role="header" data-position="fixed">
+                                       <h1>extendable list</h1>
+                               </div>
+                               <div data-role="content">
+                                       
+                               </div>
+                       </div>
+                       
+               </div>
+       </body>
+</html>
diff --git a/tests/additional-unit-tests/fastscroll/fastscroll-tests.js b/tests/additional-unit-tests/fastscroll/fastscroll-tests.js
new file mode 100755 (executable)
index 0000000..1083b37
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Unit Test: FastScroll
+ *
+ * Minkyu Kang <mk7.kang@samsung.com>
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+( function ( $ ) {
+       module("FastScroll");
+
+       var unit_fastscroll = function ( list ) {
+               var widget,
+                       shortcut,
+                       divider,
+                       fastpopup,
+                       i;
+
+               widget = list.parentsUntil(".ui-content").parent( ).find(".ui-fastscroll");
+               ok( widget , "Markup check: fast scroll");
+               fastpopup = list.parentsUntil(".ui-content").parent( ).find(".ui-fastscroll-popup");
+               ok( fastpopup , "Markup check: fastscroll popup");
+
+               /* Create */
+               ok( widget.hasClass("ui-fastscroll"), "Create");
+               shortcut = widget.find("li");
+               divider = list.find(".ui-li-divider");
+
+               /* Shortcuts */
+               for ( i = 0; i < divider.length; i++ ) {
+                       equal( $( divider[i] ).text( ), $( shortcut[i] ).text( ), "Shortcut");
+               }
+       };
+
+       test("shortcut", function ( ) {
+               unit_fastscroll( $("#shortcut") );
+       } );
+
+}( jQuery ) );
diff --git a/tests/additional-unit-tests/fastscroll/index.html b/tests/additional-unit-tests/fastscroll/index.html
new file mode 100755 (executable)
index 0000000..755bf1c
--- /dev/null
@@ -0,0 +1,90 @@
+<!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.2.0/external/qunit.css" />
+
+       <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+       <script src="fastscroll-tests.js"></script>
+
+       <title>Fast Scroll</title>
+</head>
+
+<body>
+
+<h1 id="qunit-header">Fast Scroll</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="fastscroll">
+               <div data-role="header" data-position="fixed">
+                       <h1>Fast Scroll</h1>
+               </div>
+               <div data-role="content">
+                       <ul id="shortcut" data-role="listview" data-fastscroll="true">
+                               <li data-role="list-divider">A</li>
+                               <li>Anton</li>
+                               <li>Arabella</li>
+                               <li>Art</li>
+                               <li data-role="list-divider">B</li>
+                               <li>Barry</li>
+                               <li>Bibi</li>
+                               <li>Billy</li>
+                               <li>Bob</li>
+                               <li data-role="list-divider">D</li>
+                               <li>Daisy</li>
+                               <li>Derek</li>
+                               <li>Desmond</li>
+                               <li data-role="list-divider">E</li>
+                               <li>Eric</li>
+                               <li>Ernie</li>
+                               <li>Esme</li>
+                               <li data-role="list-divider">F</li>
+                               <li>Fay</li>
+                               <li>Felicity</li>
+                               <li>Francis</li>
+                               <li>Frank</li>
+                               <li data-role="list-divider">H</li>
+                               <li>Harry</li>
+                               <li>Herman</li>
+                               <li>Horace</li>
+                               <li data-role="list-divider">J</li>
+                               <li>Jack</li>
+                               <li>Jane</li>
+                               <li>Jill</li>
+                               <li data-role="list-divider">K</li>
+                               <li>Katherine</li>
+                               <li>Katy</li>
+                               <li>Keith</li>
+                               <li data-role="list-divider">L</li>
+                               <li>Larry</li>
+                               <li>Lee</li>
+                               <li>Lola</li>
+                               <li data-role="list-divider">M</li>
+                               <li>Mark</li>
+                               <li>Milly</li>
+                               <li>Mort</li>
+                               <li data-role="list-divider">N</li>
+                               <li>Nigel</li>
+                               <li>Norman</li>
+                               <li data-role="list-divider">O</li>
+                               <li>Organza</li>
+                               <li>Orlando</li>
+                       </ul>
+               </div>
+       </div>
+
+</div>
+
+</body>
+</html>
diff --git a/tests/additional-unit-tests/gallery/01.jpg b/tests/additional-unit-tests/gallery/01.jpg
new file mode 100755 (executable)
index 0000000..df471b3
Binary files /dev/null and b/tests/additional-unit-tests/gallery/01.jpg differ
diff --git a/tests/additional-unit-tests/gallery/02.jpg b/tests/additional-unit-tests/gallery/02.jpg
new file mode 100755 (executable)
index 0000000..7cd3f0f
Binary files /dev/null and b/tests/additional-unit-tests/gallery/02.jpg differ
diff --git a/tests/additional-unit-tests/gallery/03.jpg b/tests/additional-unit-tests/gallery/03.jpg
new file mode 100755 (executable)
index 0000000..a976675
Binary files /dev/null and b/tests/additional-unit-tests/gallery/03.jpg differ
diff --git a/tests/additional-unit-tests/gallery/04.jpg b/tests/additional-unit-tests/gallery/04.jpg
new file mode 100755 (executable)
index 0000000..9305cd0
Binary files /dev/null and b/tests/additional-unit-tests/gallery/04.jpg differ
diff --git a/tests/additional-unit-tests/gallery/05.jpg b/tests/additional-unit-tests/gallery/05.jpg
new file mode 100755 (executable)
index 0000000..120cd41
Binary files /dev/null and b/tests/additional-unit-tests/gallery/05.jpg differ
diff --git a/tests/additional-unit-tests/gallery/06.jpg b/tests/additional-unit-tests/gallery/06.jpg
new file mode 100755 (executable)
index 0000000..11f4ef9
Binary files /dev/null and b/tests/additional-unit-tests/gallery/06.jpg differ
diff --git a/tests/additional-unit-tests/gallery/07.jpg b/tests/additional-unit-tests/gallery/07.jpg
new file mode 100755 (executable)
index 0000000..c7178f2
Binary files /dev/null and b/tests/additional-unit-tests/gallery/07.jpg differ
diff --git a/tests/additional-unit-tests/gallery/08.jpg b/tests/additional-unit-tests/gallery/08.jpg
new file mode 100755 (executable)
index 0000000..b6adfee
Binary files /dev/null and b/tests/additional-unit-tests/gallery/08.jpg differ
diff --git a/tests/additional-unit-tests/gallery/09.jpg b/tests/additional-unit-tests/gallery/09.jpg
new file mode 100755 (executable)
index 0000000..33d4d66
Binary files /dev/null and b/tests/additional-unit-tests/gallery/09.jpg differ
diff --git a/tests/additional-unit-tests/gallery/10.jpg b/tests/additional-unit-tests/gallery/10.jpg
new file mode 100755 (executable)
index 0000000..7b556da
Binary files /dev/null and b/tests/additional-unit-tests/gallery/10.jpg differ
diff --git a/tests/additional-unit-tests/gallery/11.jpg b/tests/additional-unit-tests/gallery/11.jpg
new file mode 100755 (executable)
index 0000000..a712a66
Binary files /dev/null and b/tests/additional-unit-tests/gallery/11.jpg differ
diff --git a/tests/additional-unit-tests/gallery/gallery-tests.js b/tests/additional-unit-tests/gallery/gallery-tests.js
new file mode 100755 (executable)
index 0000000..830ffce
--- /dev/null
@@ -0,0 +1,144 @@
+/*
+ * Unit Test: gallery
+ *
+ * Minkyu Kang <mk7.kang@samsung.com>
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+$( document ).ready( function ( ) {
+       module("gallery");
+
+       var unit_gallery = function ( widget, count ) {
+               var imagesldier,
+                       refresh = function ( widget ) {
+                               widget.gallery("refresh", "1");
+                               return widget.find(".ui-gallery-bg");
+                       },
+                       imageWrapperDiv = widget.find(".ui-gallery-bg"),
+                       imageCount = widget.find(".ui-gallery-bg img"),
+                       index = widget.jqmData("index"),
+                       alignment = widget.jqmData("vertical-align"),
+                       gallery,
+                       temp_img;
+
+               /* Create */
+               widget.gallery( );
+
+               gallery = widget.find(".ui-gallery-bg");
+               ok( gallery, "Create");
+
+               /* Initialize */
+               equal( gallery.length, count, "Initialize");
+
+               /*Initail image count*/
+               equal( imageCount.length, 3, "Makrup : image tag count");
+               equal( imageWrapperDiv.length, count, "Markup : wrapper div count");
+
+               /* current image*/
+               equal( index , 3, "Property: data-index");
+
+               /* vartical alignment image*/
+               equal( alignment , "middle", "Property: data-vertical-align");
+
+               /*Current Image Check*/
+               temp_img = widget.find('.ui-gallery-bg:eq(' + index + ' ) img');
+               equal( temp_img.attr("src") , "04.jpg", "Current Image Check");
+
+               /* API: length */
+               equal( widget.gallery("length"), count, "API: length");
+
+               /* API: del */
+               widget.gallery("remove", count - 1 );
+               gallery = refresh( widget );
+               equal( gallery.length, count - 1, "API: del");
+
+               /* API: add */
+               widget.gallery("add", "06.jpg");
+               gallery = refresh( widget );
+               equal( gallery.length, count , "API: add");
+
+               /* vartical alignment image*/
+               widget.jqmData("vertical-align", 'top') ;
+               gallery = refresh( widget );
+               alignment = widget.jqmData("vertical-align") ;
+               equal( alignment , "top", "Property change: data-vertical-align");
+
+               /* vartical alignment image*/
+               widget.jqmData("vertical-align", 'bottom') ;
+               gallery = refresh( widget );
+               alignment = widget.jqmData("vertical-align") ;
+               equal( alignment , "bottom", "Property change: data-vertical-align");
+
+               /* API: length */
+               equal( widget.gallery("value"), 1, "API: value");
+
+               /* API: del */
+               widget.gallery("remove", -1 );
+               gallery = refresh( widget );
+               equal( gallery.length, count , "API: remove with invalid index");
+               widget.gallery("remove", 1 );
+               gallery = refresh( widget );
+               count-- ;
+               equal( gallery.length, count , "API: remove with index less then current index");
+
+               widget.gallery("remove", 3 );
+               gallery = refresh( widget );
+               count-- ;
+               equal( gallery.length, count , "API: remove with index greater then current index");
+
+               widget.gallery("remove", 2 );
+               gallery = refresh( widget );
+               count-- ;
+               equal( gallery.length, count, "API: remove with current index");
+
+               /* API: empty */
+               widget.gallery("empty");
+               gallery = refresh( widget );
+               equal( gallery.length, 0, "API: empty");
+               count = 0 ;
+
+               /* API: add */
+               widget.gallery("add", "06.jpg");
+               widget.gallery("add", "07.jpg");
+               widget.gallery("add", "08.jpg");
+               count = 3;
+               gallery = refresh( widget );
+               equal( gallery.length, count , "API: add");
+               widget.gallery("remove", 1 );
+               gallery = refresh( widget );
+               count-- ;
+               equal( gallery.length, count, "API: remove with current index");
+               widget.gallery("remove", 0 );
+               gallery = refresh( widget );
+               count-- ;
+               equal( gallery.length, count, "API: remove with current index");
+
+               widget.gallery("hide");
+               gallery = refresh( widget );
+               equal( gallery.find('ui-gallery-bg').attr('style'), undefined , "API: hide");
+               widget.gallery("show");
+               gallery = refresh( widget );
+               equal( gallery.find('ui-gallery-bg').attr('style'), undefined , "API: show");
+       };
+
+       test("gallery", function ( ) {
+               $('#gallery-page-test').page( );
+               unit_gallery( $("#gallery"), 5 );
+       } );
+
+       test("Gallery Dynamic", function ( ) {
+
+               var markup = '<div data-role="gallery"id="gallery2"data-index="3"data-vertical-align="middle">' +
+                                                               '<img src="01.jpg"/>' +
+                                                               '<img src="02.jpg"/>' +
+                                                               '<img src="03.jpg"/>' +
+                                                               '<img src="04.jpg"/>' +
+                                                       '</div>';
+               $('#gallery-page-test-dynamic').page( );
+               $('#gallery-page-test-dynamic').find(":jqmData(role=content)").append( markup ) ;
+               $('#gallery-page-test-dynamic').find(":jqmData(role=content)").trigger('create') ;
+               unit_gallery( $("#gallery2"), 5 );
+
+       } );
+
+} );
diff --git a/tests/additional-unit-tests/gallery/index.html b/tests/additional-unit-tests/gallery/index.html
new file mode 100755 (executable)
index 0000000..0058b47
--- /dev/null
@@ -0,0 +1,55 @@
+<!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.2.0/external/qunit.css" />
+
+       <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+       <script src="gallery-tests.js"></script>
+
+       <title>Gallery</title>
+</head>
+
+<body>
+
+<h1 id="qunit-header">Gallery</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='gallery-page-test'>
+               <div data-role="header" data-position="fixed">
+                       <h1>Gallery</h1>
+               </div>
+               <div data-role="content" data-scroll="none" id='gallerycontent'>
+                       <div data-role="gallery" id="gallery" data-index="3" data-vertical-align="middle">
+                               <img src="01.jpg">
+                               <img src="02.jpg">
+                               <img src="03.jpg">
+                               <img src="04.jpg">
+                               <img src="05.jpg">
+                       </div>
+               </div>
+       </div>
+       
+       <div data-role="page" id='gallery-page-test-dynamic'>
+               <div data-role="header" data-position="fixed">
+                       <h1>Gallery</h1>
+               </div>
+               <div data-role="content" data-scroll="none" id='gallerycontentdynamic'></div>
+       </div>
+       
+
+</div>
+
+</body>
+</html>
diff --git a/tests/additional-unit-tests/gallery3d/gallery3d-tests.js b/tests/additional-unit-tests/gallery3d/gallery3d-tests.js
new file mode 100755 (executable)
index 0000000..85d7314
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * Unit Test: Gallery3d
+ *
+ * Wonseop Kim <wonseop.kim@samsung.com>
+ */
+
+(function ($) {
+       $.mobile.defaultTransition = "none";
+
+       module("Galley3d");
+
+       asyncTest( "create & select", function() {
+               var widget = $( "#galley3dTest1" ),
+                       imageList = [],
+                       path = widget.attr( "data-json-url" ),
+                       key = widget.attr( "data-json-key" ),
+                       elem = "ui-gallery3d";
+
+               $.ajax({
+                       async : false,
+                       url : path,
+                       dataType: "json",
+                       success : function ( result ) {
+                               imageList = result[key];
+                       }
+               });
+
+               /* Create */
+               widget.gallery3d();
+               ok( widget.hasClass( elem ), "Create" );
+
+               /* API */
+               widget.gallery3d( "select", 1 );
+               setTimeout( function () {
+                       equal( widget.gallery3d( "select" ), imageList[1].src, "API : select" );
+                       start();
+               }, 2400 );
+       });
+
+       asyncTest( "remove", function() {
+               var widget = $( "#galley3dTest2" ),
+                       imageList = [],
+                       path = widget.attr( "data-json-url" ),
+                       key = widget.attr( "data-json-key" ),
+                       currentSource;
+
+               $.ajax({
+                       async : false,
+                       url : path,
+                       dataType: "json",
+                       success : function ( result ) {
+                               imageList = result[key];
+                       }
+               });
+
+               widget.gallery3d();
+               currentSource = widget.gallery3d( "select" );
+
+               /* API */
+               widget.gallery3d( "remove" );
+               notEqual( widget.gallery3d( "select" ), currentSource, "API : remove" );
+               start();
+       });
+
+       asyncTest( "move", function() {
+               var widget = $( "#galley3dTest3" ),
+                       imageList = [],
+                       path = widget.attr( "data-json-url" ),
+                       key = widget.attr( "data-json-key" ),
+                       currentSource;
+
+               $.ajax({
+                       async : false,
+                       url : path,
+                       dataType: "json",
+                       success : function ( result ) {
+                               imageList = result[key];
+                       }
+               });
+
+               widget.gallery3d();
+               currentSource = widget.gallery3d( "select" );
+
+               /* API */
+               widget.gallery3d( "moveNext" );
+               setTimeout( function () {
+                       equal( widget.gallery3d( "select" ), imageList[1].src, "API : moveNext" );
+                       start();
+
+                       stop();
+                       widget.gallery3d( "movePrev" );
+                       setTimeout( function () {
+                               equal( widget.gallery3d( "select" ), imageList[0].src, "API : movePrev" );
+                               start();
+                       }, 300 );
+               }, 2400 );
+       });
+
+}( jQuery ));
diff --git a/tests/additional-unit-tests/gallery3d/index.html b/tests/additional-unit-tests/gallery3d/index.html
new file mode 100755 (executable)
index 0000000..7935a4b
--- /dev/null
@@ -0,0 +1,65 @@
+<!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.js"></script>
+       <script src="../../../build/tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js"
+               data-framework-theme="tizen-gray"
+               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="gallery3d-tests.js"></script>
+
+       <title>Galley3d</title>
+</head>
+
+<body>
+
+<h1 id="qunit-header">Galley3d</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">
+               <div data-role="header" data-position="fixed">
+                       <h1>Galley3d</h1>
+               </div>
+               <div data-role="content">
+                       <div id="galley3dTest1" data-role="galley3d" style="width: 100%;"
+                               data-json-url="../../../demos/tizen-gray/widgets/gallery3d/gallery3d-db.json"
+                               data-json-key="JSON_DATA" > </div>
+               </div>
+       </div>
+
+       <div data-role="page">
+               <div data-role="header" data-position="fixed">
+                       <h1>Galley3d</h1>
+               </div>
+               <div data-role="content">
+                       <div id="galley3dTest2" data-role="galley3d" style="width: 100%;"
+                               data-json-url="../../../demos/tizen-gray/widgets/gallery3d/gallery3d-db.json"
+                               data-json-key="JSON_DATA" > </div>
+               </div>
+       </div>
+
+       <div data-role="page">
+               <div data-role="header" data-position="fixed">
+                       <h1>Galley3d</h1>
+               </div>
+               <div data-role="content">
+                       <div id="galley3dTest3" data-role="galley3d" style="width: 100%;"
+                               data-json-url="../../../demos/tizen-gray/widgets/gallery3d/gallery3d-db.json"
+                               data-json-key="JSON_DATA" > </div>
+               </div>
+       </div>
+
+</div>
+
+</body>
+</html>
diff --git a/tests/additional-unit-tests/handler/handler-tests.js b/tests/additional-unit-tests/handler/handler-tests.js
new file mode 100755 (executable)
index 0000000..d63ac8e
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Unit Test: Handler
+ *
+ * Wonseop Kim <wonseop.kim@samsung.com>
+ */
+/*jslint browser: true*/
+/*global $,  jQuery,  test,  equal,  ok*/
+( function ( $ ) {
+       module("Handler");
+
+       var unit_handler = function ( widget ) {
+               var elem = ".ui-handler",
+                       handler;
+
+               /* Create */
+               widget.scrollview( );
+               handler = widget.find( elem );
+               ok( ( handler.length > 0 ), "Create");
+
+               /* API */
+               widget.scrollview("enableHandler",  false );
+               ok( handler.is(":hidden"), "API: enableHandler( false )");
+               widget.scrollview("enableHandler",  true );
+               ok( handler.is(":visible"), "API: enableHandler( true )");
+       };
+
+       test("handler",  function ( ) {
+               $('#handler0').page( );
+               unit_handler( $("#handlerY") );
+       } );
+
+       test( "handler - dynamic",  function ( ) {
+               var listHTML = '<div id= "handlerY"data-role= "content"data-scroll= "y"data-handler= "true">' +
+                                                                       '<ul data-role= "listview">                                                                                     ' +
+                                                                               '<li><a href= "#">Graham Smith</a></li>' +
+                                                                               '<li><a href= "#">Greta Peete</a></li>' +
+                                                                               '<li data-role= "list-divider">H</li>' +
+                                                                               '<li><a href= "#">Harvey Walls</a></li>' +
+                                                                       '</ul>' +
+                                                               '</div>';
+
+               $('#handler1').page( );
+               $('#handler1').find(":jqmData(role=content)").empty( );
+               $('#handler1').find(":jqmData(role=content)").append( listHTML ).trigger('create') ;
+               unit_handler( $("#handlerY") );
+       } );
+}( jQuery ) );
diff --git a/tests/additional-unit-tests/handler/index.html b/tests/additional-unit-tests/handler/index.html
new file mode 100755 (executable)
index 0000000..6233d48
--- /dev/null
@@ -0,0 +1,77 @@
+<!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.2.0/external/qunit.css" />
+
+       <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+       <script src="handler-tests.js"></script>
+
+       <title>Handler</title>
+</head>
+
+<body>
+
+<h1 id="qunit-header">Handler</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="handler0">
+               <div data-role="header" data-position="fixed">
+                       <h1>Handler</h1>
+               </div>
+               <div data-role="content" >
+                       <div id="handlerY" data-role="content" data-scroll="y" data-handler="true">
+                               <ul data-role="listview">
+                                       <li data-role="list-divider">A</li>
+                                       <li><a href="#">Adam Kinkaid</a></li>
+                                       <li><a href="#">Alex Wickerham</a></li>
+                                       <li><a href="#">Avery Johnson</a></li>
+                                       <li data-role="list-divider">B</li>
+                                       <li><a href="#">Bob Cabot</a></li>
+                                       <li data-role="list-divider">C</li>
+                                       <li><a href="#">Caleb Booth</a></li>
+                                       <li><a href="#">Christopher Adams</a></li>
+                                       <li><a href="#">Culver James</a></li>
+                                       <li data-role="list-divider">D</li>
+                                       <li><a href="#">David Walsh</a></li>
+                                       <li><a href="#">Drake Alfred</a></li>
+                                       <li data-role="list-divider">E</li>
+                                       <li><a href="#">Elizabeth Bacon</a></li>
+                                       <li><a href="#">Emery Parker</a></li>
+                                       <li><a href="#">Enid Voldon</a></li>
+                                       <li data-role="list-divider">F</li>
+                                       <li><a href="#">Francis Wall</a></li>
+                                       <li data-role="list-divider">G</li>
+                                       <li><a href="#">Graham Smith</a></li>
+                                       <li><a href="#">Greta Peete</a></li>
+                                       <li data-role="list-divider">H</li>
+                                       <li><a href="#">Harvey Walls</a></li>
+                               </ul>
+                       </div>
+               </div>
+       </div>
+       
+       
+       <div data-role="page" id="handler1">
+               <div data-role="header" data-position="fixed">
+                       <h1>Handler</h1>
+               </div>
+               <div data-role="content" >
+                       
+               </div>
+       </div>
+</div>
+
+</body>
+</html>
diff --git a/tests/additional-unit-tests/headerfooter/headerfooter-tests.js b/tests/additional-unit-tests/headerfooter/headerfooter-tests.js
new file mode 100755 (executable)
index 0000000..44fcf71
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Unit Test: Header Footer
+ *
+ *
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+$( document ).ready( function ( ) {
+
+       module("Header Footer");
+
+       var unit_headerfooter_test = function ( widget, type ) {
+               var html ;
+
+               /*Markuo check*/
+               equal( widget.hasClass('ui-' + type ), true, "Markup check") ;
+
+               equal( widget.jqmData('position'), 'fixed', "jqmData - position") ;
+               equal( $('.ui.page-active').find('.ui-footer a.ui-btn-back').length, 0, "markup check back button present") ;
+               equal( widget.css('display'), 'block', "CSS check for display") ;
+
+               /*hide show API*/
+               widget.hide( );
+               equal( widget.css('display'), 'none', "API hide") ;
+               widget.show( );
+               equal( widget.css('display'), 'block', "API show") ;
+
+               /*add text */
+               html = "<h1>Sample text</h1>";
+               widget.html( html );
+               $('.ui.page-active').page('refresh') ;
+               equal( widget.html( ) , html, "Markup check after adding text") ;
+       } ;
+
+       test("Header", function ( ) {
+               // trigger pagecreate
+               $("#headerfooter-unit-test").page( );
+               unit_headerfooter_test( $("#headerfooter-unit-test").find(':jqmData(role=header)') , 'header') ;
+
+       } );
+
+       test("footer", function ( ) {
+               // trigger pagecreate
+               $("#headerfooter-unit-test-footer").page( );
+               unit_headerfooter_test( $("#headerfooter-unit-test-footer").find(':jqmData(role=footer)'), 'footer') ;
+
+       } );
+
+} );
diff --git a/tests/additional-unit-tests/headerfooter/index.html b/tests/additional-unit-tests/headerfooter/index.html
new file mode 100755 (executable)
index 0000000..5c426d7
--- /dev/null
@@ -0,0 +1,52 @@
+<!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.2.0/external/qunit.css" />
+               <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+               <script src="headerfooter-tests.js"></script>
+               <title>Header Footer</title>
+       </head>
+
+       <body>
+               <h1 id="qunit-header">Header Footer</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="dummy-page">
+                               <div data-role="header" data-position="fixed">
+                                       <h1>Dummy</h1>
+                               </div>
+                               <div data-role="contents">
+                               </div>
+                       </div>
+
+                       <div data-role="page" id="headerfooter-unit-test" data-add-back-btn="true">
+                               <div data-role="header" data-position="fixed">
+                                       <h1>Header Footer</h1>                                  
+                               </div>
+                               <div data-role="content" id="headerfooter-content" >                                                            
+                               </div>
+                               <div data-role="footer" data-position="fixed">
+                                       <h1>Dummy</h1>
+                               </div>
+                       </div>
+               </div>
+               <div data-role="page" id="headerfooter-unit-test-footer" data-add-back-btn="true">
+                               <div data-role="contents">
+                               </div>
+                               <div data-role="footer" data-position="fixed">
+                                       <h1>Dummy</h1>
+                               </div>
+                       </div>
+       </body>
+</html>
diff --git a/tests/additional-unit-tests/index.html b/tests/additional-unit-tests/index.html
new file mode 100755 (executable)
index 0000000..454dfef
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="utf-8">
+
+  <link rel="stylesheet" href="../../libs/js/jquery-mobile-1.2.0/external/qunit.css"/>
+  <script src="../../build/tizen-web-ui-fw/latest/js/jquery.js"></script>
+  <script src="../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+  <script src="../jqm-tchelper/cookie.js"></script>
+  <script src="tests.js"></script>
+  <script src="runner.js"></script>
+  <style type="text/css">
+    html, body {
+      width:100%;
+      height:100%;
+      margin:0px;
+      padding:0px;
+    }
+
+    #testFrame {
+      float: left;
+      border: 0px;
+      height: 100%;
+      width: 60%;
+    }
+
+    #results {
+      float: left;
+      width: 30%;
+    }
+  </style>
+</head>
+<body>
+  <div id="results">
+    <h1 id="qunit-header"><a href="#">jQuery Mobile Test Suite</a></h1>
+    <h2 id="qunit-banner"></h2>
+    <ol id="qunit-tests">
+    </ol>
+  </div>
+       <iframe data-src="{{testfile}}" name="testFrame" id="testFrame" scrolling="no">
+       </iframe>
+</body>
+</html>
diff --git a/tests/additional-unit-tests/list.txt b/tests/additional-unit-tests/list.txt
new file mode 100755 (executable)
index 0000000..d14642d
--- /dev/null
@@ -0,0 +1,31 @@
+autodivider/autodivider-tests.js
+button/button-tests.js
+check/check-tests.js
+collapsible/collapsible-tests.js
+datetimepicker/datetimepicker-tests.js
+dayselector/dayselector-tests.js
+extendablelist/extendablelist-tests.js
+fastscroll/fastscroll-tests.js
+gallery3d/gallery3d-tests.js
+gallery/gallery-tests.js
+handler/handler-tests.js
+headerfooter/headerfooter-tests.js
+listdividers/listdividers-tests.js
+list/list-tests.js
+loader/loader-tests.js
+multimediaview/multimediaview-tests.js
+navigationbar/navigationbar-tests.js
+notification/notification-tests.js
+popupwindow_ctxpopup/ctxpopup-tests.js
+popupwindow/popup-tests.js
+progressbar/progressbar-tests.js
+radio/radio-tests.js
+searchbar/searchbar-tests.js
+segmentcontrol/segmentcontrol-tests.js
+slider/slider-tests.js
+swipe/swipe-tests.js
+tabbar/tabbar-tests.js
+toggleswitch/toggleswitch-tests.js
+tokentextarea/tokentextarea-tests.js
+virtualgrid/virtualgrid-tests.js
+virtuallist/virtuallist-tests.js
diff --git a/tests/additional-unit-tests/list/index.html b/tests/additional-unit-tests/list/index.html
new file mode 100755 (executable)
index 0000000..7a33f79
--- /dev/null
@@ -0,0 +1,58 @@
+<!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.2.0/external/qunit.css" />
+               <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+               <script src="list-tests.js"></script>
+               <title>List</title>
+       </head>
+
+       <body>
+               <h1 id="qunit-header">List</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="dummy-page">
+                               <div data-role="header" data-position="fixed">
+                                       <h1>Dummy</h1>
+                               </div>
+                               <div data-role="contents">
+                               </div>
+                       </div>
+
+                       <div data-role="page" id="list-unit-test" data-add-back-btn="true">
+                               <div data-role="header" data-position="fixed">
+                                       <h1>List</h1>
+                                       <input type="search" data-cancel-btn='true' name="search" data-icon="call" id="searchInput" value=""/>
+                               </div>
+                               <div data-role="content" id="list-content">
+                                       <ul id="listsample" data-role="listview" data-fastscroll="true">
+                                               <li>Anton</li>
+                                               <li class='ui-li-multiline'>    Arabella        <span class='ui-li-text-sub'>Subtext</span></li>
+                                               <li>Art<a href='#dummy-page'>1line-sub with anchor<span class='ui-li-text-sub'>Subtext</span></a>       </li>
+                                               <li>Barry<img src='thumbnail.jpg' class='ui-li-bigicon'/>1line-bigicon1</li></li>
+                                               <li>Bibi</li>
+                                               <li>Billy</li>
+                                               <li>Bob</li>
+                                       </ul>
+                               </div>
+                       </div>
+               </div>
+               <div data-role="page" id="list-unit-test-dynamic">
+                               <div data-role="header" data-position="fixed">
+                                       <h1>Dummy</h1>
+                               </div>
+                               <div data-role="contents">
+                               </div>
+                       </div>
+       </body>
+</html>
diff --git a/tests/additional-unit-tests/list/list-tests.js b/tests/additional-unit-tests/list/list-tests.js
new file mode 100755 (executable)
index 0000000..f71cdd1
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Unit Test: list
+ *
+ *
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+$( document ).ready( function ( ) {
+
+       module("List");
+
+       var unit_list_test = function ( widget ) {
+               var li ;
+
+               /*markup*/
+               equal( widget.hasClass("ui-listview"), true, "Markup check") ;
+               equal( widget.find('li.ui-li').length, 7, "Markup check") ;
+               equal( widget.find('li.ui-li-multiline').length, 1, "Markup check: multiline text") ;
+               equal( widget.find('li.ui-li-multiline span.ui-li-text-sub').length, 1, "Markup check: multiline text") ;
+               equal( widget.find('li.ui-li a.ui-link-inherit').length, 1, "Markup check:item with anchor") ;
+               equal( widget.find('li.ui-li-has-thumb img.ui-li-bigicon').length, 1, "Markup check: item with icon") ;
+
+               li = "<li>1line</li>";
+               $( li ).appendTo( widget );
+               $( widget ).listview("refresh");
+               equal( widget.find('li.ui-li').length, 8, "Markup check") ;
+       } ;
+
+       test("List", function ( ) {
+               // trigger pagecreate
+               $("#list-unit-test").page( );
+               /* Initialize */
+               $('#listsample').listview( );
+               unit_list_test( $('#listsample'), {button : 'call', cancel : true} ) ;
+
+       } );
+
+       test("List- dynamic", function ( ) {
+
+               var createEvent = false,
+                       listHTMML = '<ul id= "listsample1"data-role= "listview"data-fastscroll= "true">' +
+                                                                       '<li>Anton</li>' +
+                                                                       '<li class= "ui-li-multiline"> Arabella <span class= "ui-li-text-sub">Subtext</span></li>' +
+                                                                       '<li>Art<a href= "#dummy-page">1line-sub with anchor<span class= "ui-li-text-sub">Subtext</span></a> </li>' +
+                                                                       '<li>Barry<img src= "thumbnail.jpg"class= "ui-li-bigicon"/>1line-bigicon1</li></li>' +
+                                                                       '<li>Bibi</li>' +
+                                                                       '<li>Billy</li>' +
+                                                                       '<li>Bob</li>' +
+                                                               '</ul>';
+
+               // trigger pagecreate
+               $("#list-unit-test-dynamic").page( );
+               /* Initialize */
+               $("#list-unit-test-dynamic").find(":jqmData(role=contents)").append( listHTMML ) ;
+               $('#listsample1').listview( {create : function ( ) {
+                       createEvent = true ;
+               }} );
+
+               $("#list-unit-test-dynamic").find(":jqmData(role=contents)").trigger('create') ;
+               $('#listsample1').listview( ) ;
+
+               equal( createEvent, true, "Create Event") ;
+               unit_list_test( $('#listsample1') ) ;
+
+       } );
+
+} );
diff --git a/tests/additional-unit-tests/listdividers/index.html b/tests/additional-unit-tests/listdividers/index.html
new file mode 100755 (executable)
index 0000000..16916e4
--- /dev/null
@@ -0,0 +1,76 @@
+<!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.2.0/external/qunit.css" />
+               <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+               <script src="listdividers-tests.js"></script>
+               <title>List Dividers</title>
+       </head>
+
+       <body>
+               <h1 id="qunit-header">List Divider</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="dummy-page">
+                               <div data-role="header" data-position="fixed">
+                                       <h1>Dummy</h1>
+                               </div>
+                               <div data-role="contents">
+                               </div>
+                       </div>
+
+                       <div data-role="page" id="listdividers-unit-test" data-add-back-btn="true">
+                               <div data-role="header" data-position="fixed">
+                                       <h1>List Divider</h1>
+                                       <input type="search" data-cancel-btn='true' name="search" data-icon="call" id="searchInput" value=""/>
+                               </div>
+                               <div data-role="content" id="listdividers-content">
+                                                               <ul data-role="listview" id='listdividerssample'>
+                                                               <li data-role="list-divider">A</li>
+                                                               <li><a href="#">Adam Kinkaid</a></li>
+                                                               <li><a href="#">Alex Wickerham</a></li>
+                                                               <li><a href="#">Avery Johnson</a></li>
+                                                               <li data-role="list-divider" data-style='dialogue'>B</li>
+                                                               <li><a href="#">Bob Cabot</a></li>
+                                                               <li data-role="list-divider" data-style='check'>C</li>
+                                                               <li><a href="#">Caleb Booth</a></li>
+                                                               <li><a href="#">Christopher Adams</a></li>
+                                                               <li><a href="#">Culver James</a></li>
+                                                               <li data-role="list-divider" data-style='expandable'>D</li>
+                                                               <li><a href="#">David Walsh</a></li>
+                                                               <li><a href="#">Drake Alfred</a></li>
+                                                               <li data-role="list-divider" data-style='checkexpandable'>E</li>
+                                                               <li><a href="#">Elizabeth Bacon</a></li>
+                                                               <li><a href="#">Emery Parker</a></li>
+                                                               <li><a href="#">Enid Voldon</a></li>
+                                                               <li data-role="list-divider">F</li>
+                                                               <li><a href="#">Francis Wall</a></li>
+                                                               <li data-role="list-divider">G</li>
+                                                               <li><a href="#">Graham Smith</a></li>
+                                                               <li><a href="#">Greta Peete</a></li>
+                                                               <li data-role="list-divider">H</li>
+                                                               <li><a href="#">Harvey Walls</a></li>
+                                                       </ul>
+                               </div>
+                       </div>
+               </div>
+               <div data-role="page" id="listdividers-unit-test-dynamic">
+                               <div data-role="header" data-position="fixed">
+                                       <h1>Dummy</h1>
+                               </div>
+                               <div data-role="contents">
+                               </div>
+                       </div>
+       </body>
+</html>
diff --git a/tests/additional-unit-tests/listdividers/listdividers-tests.js b/tests/additional-unit-tests/listdividers/listdividers-tests.js
new file mode 100755 (executable)
index 0000000..a9393b4
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Unit Test: listdividers
+ *
+ *
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+$( document ).ready( function ( ) {
+
+       module("List dividers");
+
+       var unit_listdividers_test = function ( widget ) {
+               var li ;
+
+               /*markup*/
+               equal( widget.hasClass("ui-listview"), true, "Markup check") ;
+               equal( widget.find('li.ui-li').length, 24, "Markup check") ;
+               equal( widget.find(":jqmData(role=list-divider)").length, 8, "List dividers count");
+               equal( widget.find('li.ui-li-divider').length, 8, "Markup check : list dividers count") ;
+
+               li = "<li>1line</li>";
+               $( li ).appendTo( widget );
+               $( widget ).listview("refresh");
+               equal( widget.find('li.ui-li').length, 25, "Markup check") ;
+       } ;
+
+       test("Listdividers", function ( ) {
+               // trigger pagecreate
+               $("#listdividers-unit-test").page( );
+               /* Initialize */
+               $('#listdividerssample').listview( );
+               unit_listdividers_test( $('#listdividerssample'), {button : 'call', cancel : true} ) ;
+
+       } );
+
+       test("Listdividers- dynamic", function ( ) {
+               var createEvent = false,
+                       listHTMML = '<ul data-role= "listview"id= "listdividerssample1">' +
+                                                                                       '<li data-role= "list-divider">A</li>' +
+                                                                                       '<li><a href= "#">Adam Kinkaid</a></li>' +
+                                                                                       '<li><a href= "#">Alex Wickerham</a></li>' +
+                                                                                       '<li><a href= "#">Avery Johnson</a></li>' +
+                                                                                       '<li data-role= "list-divider"data-style= "dialogue">B</li>' +
+                                                                                       '<li><a href= "#">Bob Cabot</a></li>' +
+                                                                                       '<li data-role= "list-divider"data-style= "check">C</li>' +
+                                                                                       '<li><a href= "#">Caleb Booth</a></li>' +
+                                                                                       '<li><a href= "#">Christopher Adams</a></li>' +
+                                                                                       '<li><a href= "#">Culver James</a></li>' +
+                                                                                       '<li data-role= "list-divider"data-style= "expandable">D</li>' +
+                                                                                       '<li><a href= "#">David Walsh</a></li>' +
+                                                                                       '<li><a href= "#">Drake Alfred</a></li>' +
+                                                                                       '<li data-role= "list-divider"data-style= "checkexpandable">E</li>' +
+                                                                                       '<li><a href= "#">Elizabeth Bacon</a></li>' +
+                                                                                       '<li><a href= "#">Emery Parker</a></li>' +
+                                                                                       '<li><a href= "#">Enid Voldon</a></li>' +
+                                                                                       '<li data-role= "list-divider">F</li>' +
+                                                                                       '<li><a href= "#">Francis Wall</a></li>' +
+                                                                                       '<li data-role= "list-divider">G</li>' +
+                                                                                       '<li><a href= "#">Graham Smith</a></li>' +
+                                                                                       '<li><a href= "#">Greta Peete</a></li>' +
+                                                                                       '<li data-role= "list-divider">H</li>' +
+                                                                                       '<li><a href= "#">Harvey Walls</a></li>' +
+                                                                               '</ul>';
+
+               // trigger pagecreate
+               $("#listdividers-unit-test-dynamic").page( );
+               /* Initialize */
+               $("#listdividers-unit-test-dynamic").find(":jqmData(role=contents)").append( listHTMML ) ;
+
+               $('#listdividerssample1').listview( {create : function ( ) {
+                       createEvent = true ;
+               }} );
+
+               $("#listdividers-unit-test-dynamic").find(":jqmData(role=contents)").trigger('create') ;
+               $('#listdividerssample1').listview( ) ;
+
+               equal( createEvent, true, "Create Event") ;
+               unit_listdividers_test( $('#listdividerssample1') ) ;
+
+       } );
+
+} );
diff --git a/tests/additional-unit-tests/loader/index.html b/tests/additional-unit-tests/loader/index.html
new file mode 100755 (executable)
index 0000000..b3d5825
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+       <meta charset="utf-8">
+       <meta name="viewport" content="width=device-width, initial-scale=1">
+       <title>loader test</title>
+       <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.js"></script>
+       <script src="../../../build/tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js"
+               data-framework-theme="tizen-white"></script>
+       <script src="../../../libs/js/jquery-mobile-1.1.0/tests/unit/jquery.setNameSpace.js"></script>
+       <script src="../../../libs/js/jquery-mobile-1.1.0/tests/jquery.testHelper.js"></script>
+       <script src="../../../libs/js/jquery-mobile-1.1.0/external/qunit.js"></script>
+
+       <link rel="stylesheet" href="../../../libs/js/jquery-mobile-1.1.0/external/qunit.css"/>
+
+       <script src="loader-tests.js"></script>
+</head>
+<body>
+       <!-- QUnit template -->
+       <h1 id="qunit-header">Test : loader</h1>
+       <h2 id="qunit-banner"></h2>
+       <h2 id="qunit-userAgent"></h2>
+       <ol id="qunit-tests"></ol>
+
+       <div id="qunit-fixture">
+
+       </div>
+</body>
+</html>
diff --git a/tests/additional-unit-tests/loader/loader-tests.js b/tests/additional-unit-tests/loader/loader-tests.js
new file mode 100755 (executable)
index 0000000..41e272b
--- /dev/null
@@ -0,0 +1,56 @@
+/**
+ * Loader test
+ *
+ * Youmin Ha <youmin.ha@samsung.com>
+ *
+ */
+ /*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+( function ( $ ) {
+       $.mobile.defaultTransition = " none " ;
+
+       module( " Loader " );
+
+       var tizen = $.tizen.__tizen__;
+
+       test( " util.getScaleFactor( ) " , function ( ) {
+               var util = tizen.util, 
+                       expected = 1, 
+                       defaultWidth = 720;
+
+               if ( window.scale ) {
+                       expected = window.scale;
+               } else {
+                       expected = screen.width / defaultWidth;
+                       if ( expected > 1 ) {   // Don ' t allow expansion
+                               expected = 1;
+                       }
+               }
+
+               // Test value
+               equal( util.getScaleFactor( ), expected, " Scale factor value should calculated properly. " );
+       } );
+
+       test( " util.isMobileBrowser( ) " , function ( ) {
+               var appVersion = window.navigator.appVersion, 
+                       mobile = appVersion.match( " Mobile " ), 
+                       isMobile = mobile ? true : false;
+
+               equal( tizen.util.isMobileBrowser( ), isMobile, " Mobile browser must be detected. " );
+
+               /* NOTE:
+                * Is this test OK? How are both cases( mobile/non-mobile ) tested?
+                */
+       } );
+
+       test( " css.addElementToHead( ) " , function ( ) {
+               var css = tizen.css, 
+                       scarecrow = $( ' <meta name= " scarecrow " /> ' ), 
+                       selected;
+
+               css.addElementToHead( scarecrow );
+               selected = $( ' head ' ).children( ' meta[name=scarecrow] ' );
+               ok( selected.length > 0, ' Object must be added to header. ' );
+       } );
+} ) ( jQuery );
+
diff --git a/tests/additional-unit-tests/multimediaview/index.html b/tests/additional-unit-tests/multimediaview/index.html
new file mode 100755 (executable)
index 0000000..4daf4b2
--- /dev/null
@@ -0,0 +1,80 @@
+<!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.2.0/external/qunit.css" />
+
+       <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+       
+
+       <title>MultiMediaView</title>
+</head>
+
+<body>
+
+<h1 id="qunit-header">MultiMediaView</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="multimediaview0">
+               <div data-role="header" data-position="fixed">
+                       <h1>MultiMediaView (video)</h1>
+               </div>
+               <div data-role="content">
+                       <video data-controls="true" style="width:100%;" id="video">
+                               <source src="http://www.w3schools.com/html5/mov_bbb.mp4" type="video/mp4" />
+                               <source src="http://www.w3schools.com/html5/mov_bbb.ogg" type="video/ogg" />
+                               <source src="http://www.w3schools.com/html5/mov_bbb.webm" type="video/webm" />
+                               <p>Your browser does not support the video tag.</p>
+                       </video>
+               </div>
+       </div>
+       
+       <div data-role="page" id="multimediaview01">
+               <div data-role="header" data-position="fixed">
+                       <h1>MultiMediaView (video)</h1>
+               </div>
+               <div data-role="content">
+                       
+               </div>
+       </div>
+
+       <div data-role="page" id="multimediaview1">
+               <div data-role="header" data-position="fixed">
+                       <h1>MultiMediaView (audio)</h1>
+               </div>
+               <div data-role="content">
+                       <audio data-controls="true" style="width:100%;" id="audio">
+                               <source src="http://www.w3schools.com/html5/mov_bbb.mp4" type="audio/mp4" />
+                               <source src="http://www.w3schools.com/html5/mov_bbb.ogg" type="audio/ogg" />
+                               <p>Your browser does not support the audio tag.</p>
+                       </audio>
+               </div>
+       </div>
+       <div data-role="page" id="multimediaview11">
+               <div data-role="header" data-position="fixed">
+                       <h1>MultiMediaView (audio)</h1>
+               </div>
+               <div data-role="content">
+                       <audio data-controls="true" style="width:100%;" id="audio">
+                               <source src="http://www.w3schools.com/html5/mov_bbb.mp4" type="audio/mp4" />
+                               <source src="http://www.w3schools.com/html5/mov_bbb.ogg" type="audio/ogg" />
+                               <p>Your browser does not support the audio tag.</p>
+                       </audio>
+               </div>
+       </div>
+
+</div>
+<script src="multimediaview-tests.js"></script>
+</body>
+</html>
diff --git a/tests/additional-unit-tests/multimediaview/multimediaview-tests.js b/tests/additional-unit-tests/multimediaview/multimediaview-tests.js
new file mode 100755 (executable)
index 0000000..9148c6e
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * Unit Test: MultiMediaView
+ *
+ * Wonseop Kim <wonseop.kim@samsung.com>
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+$( document ).ready( function ( ) {
+       module("MultiMediaView");
+
+       var unit_multimediaview = function ( widget, type ) {
+               var control,
+                       fullscreenButton,
+                       width,
+                       height,
+                       played,
+                       fullScreen,
+                       timeupdated,
+                       ended,
+                       param,
+                       volumebutton,
+                       seekerbar,
+                       playpause;
+
+               /* Create */
+               widget.multimediaview( );
+               ok( widget.hasClass("ui-multimediaview") , "Create");
+
+               playpause = widget.parent( ).find('.ui-playpausebutton') ;
+               ok( playpause.hasClass("ui-play-icon") , "Markup: Play button present");
+               if ( type == 'vedio') {
+                       fullScreen = widget.parent( ).find('.ui-fullscreenbutton') ;
+                       ok( fullScreen.hasClass("ui-fullscreen-on") , "Markup: fullscreen button present");
+               }
+               volumebutton = widget.parent( ).find('.ui-volumebutton') ;
+               ok( volumebutton.hasClass("ui-volume-icon") , "Markup: Volume button present");
+               seekerbar = widget.parent( ).find('.ui-seekbar') ;
+               equal( seekerbar.find(".ui-currenttime").css('width'), '0px', "Markup: initial current time");
+               ok( widget.parent( ).find(".ui-durationlabel"), "Markup : duration label");
+               ok( widget.parent( ).find(".ui-timestamplabel"), "Markup : current time label");
+               ok( widget.parent( ).find(".ui-volumecontrol"), "Markup : volume control");
+
+               /* width */
+               width = 100;
+               widget.multimediaview("width", width );
+               equal( width, widget.width( ), "API: width");
+
+               equal( width, widget.multimediaview("width") , "API: width multimediaview");
+
+               /* height */
+               height = 200;
+               widget.multimediaview("height", height );
+               equal( height, widget.height( ), "API: height");
+               equal( height, widget.multimediaview("height") , "API: height multimediaview");
+               if ( type === "video") {
+
+                       /* fullscreen */
+                       fullscreenButton = widget.parent( ).find(".ui-fullscreenbutton");
+                       equal( false, widget.multimediaview("fullScreen") , "API: fullScreen initially value - multimediaview");
+
+                       widget.multimediaview("fullScreen", true );
+                       ok( fullscreenButton.hasClass("ui-fullscreen-off"), "API: fullScreen ( on ) - markup");
+                       equal( true, widget.multimediaview("fullScreen") , "API: fullScreen set to true - multimediaview");
+                       equal( $("body")[0].clientHeight - 1 , widget.height( ), "API: height after full screen on");
+                       equal( $("body")[0].clientWidth , widget.width( ), "API: width after full screen on");
+
+                       widget.multimediaview("fullScreen", false );
+                       ok( fullscreenButton.hasClass("ui-fullscreen-on"), "API: fullScreen ( off ) - markup");
+                       equal( false, widget.multimediaview("fullScreen") , "API: fullScreen set to true - multimediaview");
+                       equal( widget.height( ) , height, "API: height after full screen off");
+                       equal( widget.width( ) , width, "API: width after full screen off");
+
+               }
+       };
+
+       test("video", function ( ) {
+               $('#multimediaview0').page( );
+               unit_multimediaview( $("#video"), "video");
+       } );
+
+       test("audio", function ( ) {
+               $('#multimediaview1').page( );
+               unit_multimediaview( $("#audio"), "audio");
+       } );
+
+       test("audio dymanic", function ( ) {
+
+               var createEvent = false,
+                       audioHTML = '<audio data-controls= "false"style= "width:100%;"id= "audioControl2"data-fullscreen= "false"class= "multimediaobjetc">' +
+                                                                               '<source src= "http://www.w3schools.com/html5/mov_bbb.mp4"type= "audio/mp4"/>' +
+                                                                               '<source src= "http://www.w3schools.com/html5/mov_bbb.ogg"type= "audio/ogg"/>' +
+                                                                               '<p>Your browser does not support the audio tag.</p>' +
+                                                                       '</audio>';
+               $('#multimediaview11').page( );
+               $('#multimediaview11').find(":jqmData(role=content)").append( audioHTML );
+
+               $("#audioControl").bind("create", function ( ) {
+                       createEvent = true ;
+               } );
+
+               $('#audioControl2').trigger("create") ;
+               equal( createEvent, true, "Audio Create Event") ;
+               unit_multimediaview( $("#audioControl2"), "audio");
+       } );
+
+       test("video dymanic", function ( ) {
+
+               var createEvent = false,
+                       videoHTML = '<video data-controls= "true"style= "width:100%;"id= "vedioControl1"data-fullscreen= "false"class= "multimediaobjetc">' +
+                                                                       '<source src= "http://www.w3schools.com/html5/mov_bbb.mp4"type= "video/mp4"/>' +
+                                                                       '<source src= "http://www.w3schools.com/html5/mov_bbb.ogg"type= "video/ogg"/>' +
+                                                                       '<source src= "http://www.w3schools.com/html5/mov_bbb.webm"type= "video/webm"/>' +
+                                                                       '<p>Your browser does not support the video tag.</p>' +
+                                                               '</video>';
+               $('#multimediaview01').page( );
+               $('#multimediaview01').find(":jqmData(role=content)").append( videoHTML ) ;
+
+               $("#vedioControl1").bind("create", function ( ) {
+                       createEvent = true ;
+               } );
+               $('#vedioControl1').trigger("create") ;
+               equal( createEvent, true, "Vedio Create Event") ;
+               unit_multimediaview( $("#vedioControl1"), "video");
+       } );
+
+} );
diff --git a/tests/additional-unit-tests/navigationbar/01_icon.png b/tests/additional-unit-tests/navigationbar/01_icon.png
new file mode 100755 (executable)
index 0000000..768d8db
Binary files /dev/null and b/tests/additional-unit-tests/navigationbar/01_icon.png differ
diff --git a/tests/additional-unit-tests/navigationbar/02_icon.png b/tests/additional-unit-tests/navigationbar/02_icon.png
new file mode 100755 (executable)
index 0000000..bc2e48b
Binary files /dev/null and b/tests/additional-unit-tests/navigationbar/02_icon.png differ
diff --git a/tests/additional-unit-tests/navigationbar/03_icon.png b/tests/additional-unit-tests/navigationbar/03_icon.png
new file mode 100755 (executable)
index 0000000..20eae31
Binary files /dev/null and b/tests/additional-unit-tests/navigationbar/03_icon.png differ
diff --git a/tests/additional-unit-tests/navigationbar/index.html b/tests/additional-unit-tests/navigationbar/index.html
new file mode 100755 (executable)
index 0000000..0195fa4
--- /dev/null
@@ -0,0 +1,286 @@
+<!DOCTYPE html>
+<html lang="en">
+<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.2.0/external/qunit.css" />
+
+       <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+
+       <script src="navigationbar-tests.js"></script>
+</head>
+<body>
+
+<h1 id="qunit-header">Navigationbar</h1>
+<h2 id="qunit-banner"></h2>
+<h2 id="qunit-userAgent"></h2>
+<ol id="qunit-tests">
+</ol>
+
+
+<div data-nstest-role="page">
+       <div data-nstest-role="header" id="normalnavigation1">
+               <h1>Navigationbar Test - markup</h1>
+       </div>
+       <div data-nstest-role="content">
+       </div>
+       <div data-nstest-role="footer">
+       </div>
+</div>
+
+<div data-nstest-role="page">
+       <div data-nstest-role="header" >
+               
+       </div>
+       <div data-nstest-role="content">
+       </div>
+       <div data-nstest-role="footer" id="normalnavigation12">
+               <h1>Navigationbar Test - markup</h1>
+       </div>
+</div>
+
+<div data-nstest-role="page">
+       <div data-nstest-role="header" id="normalnavigation11">
+               
+       </div>
+       <div data-nstest-role="content">
+       </div>
+       <div data-nstest-role="footer">
+       </div>
+</div>
+
+<div data-nstest-role="page">
+       <div data-nstest-role="header">
+               
+       </div>
+       <div data-nstest-role="content">
+       </div>
+       <div data-nstest-role="footer"  id="normalnavigation111">
+       </div>
+</div>
+
+
+<div data-nstest-role="page">
+       <div data-nstest-role="header" id="normalnavigation2">
+               <h1>Navigationbar Test - markup</h1>
+               <a>Button</a>
+       </div>
+       <div data-nstest-role="content">
+       </div>
+       <div data-nstest-role="footer">
+       </div>
+</div>
+
+<div data-nstest-role="page">
+       <div data-nstest-role="header">
+               
+       </div>
+       <div data-nstest-role="content">
+       </div>
+       <div data-nstest-role="footer"  id="normalnavigation22">
+               <h1>Navigationbar Test - markup</h1>
+               <a>Button</a>
+       </div>
+</div>
+
+<div data-nstest-role="page">
+       <div data-nstest-role="header" id="normalnavigation3">
+               <a>Button</a>
+               <h1>Navigationbar Test - markup</h1>
+               <a>Button</a>
+       </div>
+<div data-nstest-role="content">
+       </div>
+       <div data-nstest-role="footer">
+       </div>
+</div>
+
+<div data-nstest-role="page">
+       <div data-nstest-role="header">
+               
+       </div>
+<div data-nstest-role="content">
+       </div>
+       <div data-nstest-role="footer"  id="normalnavigation32">
+               <a>Button</a>
+               <h1>Navigationbar Test - markup</h1>
+               <a>Button</a>
+       </div>
+</div>
+
+
+<div data-nstest-role="page">
+       <div data-nstest-role="header" id="normalnavigation4">
+               <a>Button</a>
+               <h1>Navigationbar Test - markup</h1>
+               <a>Button2</a>
+               <a>Button3</a>
+       </div>
+       <div data-nstest-role="content">
+       </div>
+       <div data-nstest-role="footer">
+       </div>
+</div>
+
+<div data-nstest-role="page">
+       <div data-nstest-role="header" >
+               
+       </div>
+       <div data-nstest-role="content">
+       </div>
+       <div data-nstest-role="footer" id="normalnavigation42">
+               <a>Button</a>
+               <h1>Navigationbar Test - markup</h1>
+               <a>Button2</a>
+               <a>Button3</a>
+       </div>
+</div>
+
+<div data-nstest-role="page">
+       <div data-nstest-role="header" data-position="fixed" id="extendedstyle2btn">
+               <h1>Extended Title 2 Button </h1>
+               <div data-role="fieldcontain">
+                       <fieldset data-role="controlgroup" data-type="horizontal">
+                               <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment1" value="on" checked="checked" />
+                               <label for="segment1">All</label>
+                               <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment2" value="off" />
+                               <label for="segment2">Call</label>
+                       </fieldset>
+               </div>
+       </div>
+       <div data-nstest-role="content">
+       </div>
+</div>
+
+<div data-nstest-role="page">
+       <div data-nstest-role="header" data-position="fixed" >
+               
+       </div>
+       <div data-nstest-role="content">
+       </div>
+       <div data-nstest-role="footer" id="extendedstyle22btn">
+               <h1>Extended Title 2 Button </h1>
+               <div data-role="fieldcontain">
+                       <fieldset data-role="controlgroup" data-type="horizontal">
+                               <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment1" value="on" checked="checked" />
+                               <label for="segment1">All</label>
+                               <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment2" value="off" />
+                               <label for="segment2">Call</label>
+                       </fieldset>
+               </div>
+       </div>
+</div>
+
+
+<div data-nstest-role="page">
+       <div data-nstest-role="header" data-position="fixed" id="extendedstyle3btn">
+               <h1>Extended Title 3 Button </h1>
+               <div data-role="fieldcontain">
+                       <fieldset data-role="controlgroup" data-type="horizontal">
+                               <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment1" value="on" checked="checked" />
+                               <label for="segment1">All</label>
+                               <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment2" value="off" />
+                               <label for="segment2">Call</label>
+                               <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment3" value="off" />
+                               <label for="segment3">Save</label>
+                       </fieldset>
+               </div>
+       </div>
+       <div data-nstest-role="content">
+       </div>
+</div>
+
+<div data-nstest-role="page">
+       <div data-nstest-role="header" data-position="fixed" >
+               
+       </div>
+       <div data-nstest-role="content">
+       </div>
+       <div data-nstest-role="footer" id="extendedstyle32btn">
+               <h1>Extended Title 3 Button </h1>
+               <div data-role="fieldcontain">
+                       <fieldset data-role="controlgroup" data-type="horizontal">
+                               <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment1" value="on" checked="checked" />
+                               <label for="segment1">All</label>
+                               <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment2" value="off" />
+                               <label for="segment2">Call</label>
+                               <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment3" value="off" />
+                               <label for="segment3">Save</label>
+                       </fieldset>
+               </div>
+       </div>
+</div>
+
+<div data-nstest-role="page">
+       <div data-nstest-role="header" data-position="fixed" id="extendedstyle4btn">
+               <h1>Extended Title 4 Button </h1>
+               <div data-role="fieldcontain">
+                       <fieldset data-role="controlgroup" data-type="horizontal">
+                               <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment1" value="on" checked="checked" />
+                               <label for="segment1">All</label>
+                               <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment2" value="off" />
+                               <label for="segment2">Call</label>
+                               <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment3" value="off" />
+                               <label for="segment3">Save</label>
+                               <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment4" value="off" />
+                               <label for="segment4">Back</label>
+                       </fieldset>
+               </div>
+       </div>
+       <div data-nstest-role="content">
+       </div>
+</div>
+
+<div data-nstest-role="page">
+       <div data-position="fixed" >
+               
+       </div>
+       <div data-nstest-role="content">
+       </div>
+       <div data-nstest-role="footer" id="extendedstyle42btn">
+               <h1>Extended Title 4 Button </h1>
+               <div data-role="fieldcontain">
+                       <fieldset data-role="controlgroup" data-type="horizontal">
+                               <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment1" value="on" checked="checked" />
+                               <label for="segment1">All</label>
+                               <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment2" value="off" />
+                               <label for="segment2">Call</label>
+                               <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment3" value="off" />
+                               <label for="segment3">Save</label>
+                               <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment4" value="off" />
+                               <label for="segment4">Back</label>
+                       </fieldset>
+               </div>
+       </div>
+</div>
+
+
+<div data-nstest-role="page">
+       <div data-position="fixed" >
+               <h1>Extended Title 4 Button </h1>
+               
+       </div>
+       <div data-nstest-role="content">
+       </div>
+       <div data-nstest-role="footer" id="extendedstyle52btn">
+               
+       </div>
+</div>
+
+<div data-nstest-role="page">
+       <div data-nstest-role="header" data-position="fixed" id="extendedstyle5btn">
+               
+       </div>
+       <div data-nstest-role="content">
+       </div>
+</div>
+
+
+</body>
+</html>
+
+
diff --git a/tests/additional-unit-tests/navigationbar/navigationbar-tests.js b/tests/additional-unit-tests/navigationbar/navigationbar-tests.js
new file mode 100755 (executable)
index 0000000..7ed252a
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ * navigationbar unit tests
+*/
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+( function ( $ ) {
+       module("Navigationbar");
+
+       var unit_navigationbar = function ( widget, anchorCount, position, extendedValue ) {
+               /* Create */
+               var created_navigationbar = $( widget );
+               ok( created_navigationbar, "Create");
+
+               /* Check Parameters */
+               equal( created_navigationbar.jqmData("nstest-role"), position, "Basic test");
+
+               if ( extendedValue ) {
+                       equal( created_navigationbar.find("input").length, anchorCount, "Groupcontrol button test");
+               } else {
+                       equal( created_navigationbar.children("a").length, anchorCount, "button test");
+               }
+       };
+
+       test("navigationbar no button test -header", function ( ) {
+               unit_navigationbar( $("#normalnavigation1"), 0, 'header');
+       } );
+
+       test("navigationbar one button test -header", function ( ) {
+               unit_navigationbar( $("#normalnavigation2"), 1, 'header');
+       } );
+
+       test("navigationbar two button test -header", function ( ) {
+               unit_navigationbar( $("#normalnavigation3"), 2 , 'header');
+       } );
+
+       test("navigationbar three button test -header", function ( ) {
+               unit_navigationbar( $("#normalnavigation4"), 3 , 'header');
+       } );
+
+       test("navigationbar extended two button test -header", function ( ) {
+               unit_navigationbar( $("#extendedstyle2btn"), 2, 'header', true );
+       } );
+
+       test("navigationbar extended three button test - header", function ( ) {
+               unit_navigationbar( $("#extendedstyle3btn"), 3, 'header', true );
+       } );
+
+       test("navigationbar extended four button test -header", function ( ) {
+               unit_navigationbar( $("#extendedstyle4btn"), 4, 'header', true );
+       } );
+
+       test("navigationbar no button test -header - Dynamic", function ( ) {
+
+               var markup = '<h1>Navigationbar Test - markup</h1>';
+               $('#normalnavigation11').append( markup ).trigger('create');
+
+               unit_navigationbar( $("#normalnavigation11"), 0, 'header');
+       } );
+
+       test("navigationbar extended four button test -header- Dymanic", function ( ) {
+
+               var markup = '<div data-role= "fieldcontain">' +
+                                                               '<fieldset data-role= "controlgroup"data-type= "horizontal">' +
+                                                                       '<input type= "radio"name= "radio-view-8"data-icon= "segment-titlestyle-segonly"id= "segment1"value= "on"checked= "checked"/>' +
+                                                                       '<label for= "segment1">All</label>' +
+                                                                       '<input type= "radio"name= "radio-view-8"data-icon= "segment-titlestyle-segonly"id= "segment2"value= "off"/>' +
+                                                                       '<label for= "segment2">Call</label>' +
+                                                                       '<input type= "radio"name= "radio-view-8"data-icon= "segment-titlestyle-segonly"id= "segment3"value= "off"/>' +
+                                                                       '<label for= "segment3">Save</label>' +
+                                                                       '<input type= "radio"name= "radio-view-8"data-icon= "segment-titlestyle-segonly"id= "segment4"value= "off"/>' +
+                                                                       '<label for= "segment4">Back</label>' +
+                                                               '</fieldset>' +
+                                                       '</div>';
+
+               $('#extendedstyle5btn').append( markup ).trigger('create');
+               $('#extendedstyle5btn').find(":jqmData(role=fieldcontain)").trigger('create');
+               unit_navigationbar( $("#extendedstyle5btn"), 4, 'header', true );
+       } );
+
+
+       test("navigationbar no button test -footer", function ( ) {
+               unit_navigationbar( $("#normalnavigation12"), 0 , 'footer');
+       } );
+
+       test("navigationbar one button test -footer", function ( ) {
+               unit_navigationbar( $("#normalnavigation22"), 1 , 'footer');
+       } );
+
+       test("navigationbar two button test -footer", function ( ) {
+               unit_navigationbar( $("#normalnavigation32"), 2 , 'footer');
+       } );
+
+       test("navigationbar three button test -footer", function ( ) {
+               unit_navigationbar( $("#normalnavigation42"), 3 , 'footer');
+       } );
+
+       test("navigationbar extended two button test -footer", function ( ) {
+               unit_navigationbar( $("#extendedstyle22btn"), 2 , 'footer', true );
+       } );
+
+       test("navigationbar extended three button test -footer", function ( ) {
+               unit_navigationbar( $("#extendedstyle32btn"), 3 , 'footer', true );
+       } );
+
+       test("navigationbar extended four button test -footer", function ( ) {
+               unit_navigationbar( $("#extendedstyle42btn"), 4 , 'footer', true );
+       } );
+
+       test("navigationbar no button test -footer - Dynamic", function ( ) {
+
+               var markup = '<h1>Navigationbar Test - markup</h1>';
+               $('#normalnavigation111').append( markup ).trigger('create');
+
+               unit_navigationbar( $("#normalnavigation111"), 0 , 'footer');
+       } );
+
+       test("navigationbar extended four button test -footer- Dymanic", function ( ) {
+
+               var markup = '<div data-role= "fieldcontain">' +
+                                                               '<fieldset data-role= "controlgroup"data-type= "horizontal">' +
+                                                                       '<input type= "radio"name= "radio-view-8"data-icon= "segment-titlestyle-segonly"id= "segment1"value= "on"checked= "checked"/>' +
+                                                                       '<label for= "segment1">All</label>' +
+                                                                       '<input type= "radio"name= "radio-view-8"data-icon= "segment-titlestyle-segonly"id= "segment2"value= "off"/>' +
+                                                                       '<label for= "segment2">Call</label>' +
+                                                                       '<input type= "radio"name= "radio-view-8"data-icon= "segment-titlestyle-segonly"id= "segment3"value= "off"/>' +
+                                                                       '<label for= "segment3">Save</label>' +
+                                                                       '<input type= "radio"name= "radio-view-8"data-icon= "segment-titlestyle-segonly"id= "segment4"value= "off"/>' +
+                                                                       '<label for= "segment4">Back</label>' +
+                                                               '</fieldset>' +
+                                                       '</div>';
+
+               $('#extendedstyle52btn').append( markup ).trigger('create');
+               $('#extendedstyle52btn').find(":jqmData(role=fieldcontain)").trigger('create');
+               unit_navigationbar( $("#extendedstyle52btn"), 4 , 'footer', true );
+       } );
+} ( jQuery ));
diff --git a/tests/additional-unit-tests/notification/index.html b/tests/additional-unit-tests/notification/index.html
new file mode 100755 (executable)
index 0000000..73c359e
--- /dev/null
@@ -0,0 +1,70 @@
+<!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.2.0/external/qunit.css" />
+
+       <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+       <script src="notification-tests.js"></script>
+
+       <title>Notification</title>
+</head>
+
+<body>
+
+<h1 id="qunit-header">Notification</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="notifiaction0">
+               <div data-role="notification" id="smallpopup" data-type="popup" data-interval='1000'>
+                       <p>text1</p>
+               </div>
+               <div data-role="notification" id="smallpopup2" data-type="popup" data-interval='1000'>
+                       <p>text1</p>
+                       <p>text2</p>
+               </div>
+               <div data-role="notification" id="smallpopup3" data-type="popup" data-interval='1000'>                  
+               </div>
+               <div data-role="header" data-position="fixed">
+                       <h1>Notification</h1>
+               </div>
+               <div data-role="content">
+               </div>
+       </div>
+
+       <div data-role="page" id="notification1">
+               <div data-role="notification" id="tickernoti" data-type="ticker"  data-icon="02_icon.png" data-interval='5'>
+                       <p>text1</p>
+                       <p>text2</p>
+               </div>
+               <div data-role="notification" id="tickernoti2" data-type="ticker"  data-icon="02_icon.png" data-interval='5'>
+                       <p>text1</p>
+                       <p>text2</p>
+                       <p>text3</p>
+                       <p>text4</p>
+               </div>
+               <div data-role="notification" id="tickernoti3" data-type="ticker"  data-icon="02_icon.png" data-interval='5'>                   
+               </div>
+               <div data-role="header" data-position="fixed">
+                       <h1>Notification</h1>
+               </div>
+               <div data-role="content">
+               </div>
+       </div>
+       
+
+</div>
+
+</body>
+</html>
diff --git a/tests/additional-unit-tests/notification/notification-tests.js b/tests/additional-unit-tests/notification/notification-tests.js
new file mode 100755 (executable)
index 0000000..434ee6a
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * Unit Test : Notification
+ *
+ * Minkyu Kang <mk7.kang@samsung.com>
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+(function ($) {
+       module("Notification");
+
+       var unit_notification = function ( widget, type ) {
+               var notification,
+                       elem = ".ui-" + type,
+                       text,
+                       closebutton;
+
+               /* Create */
+               widget.notification();
+
+               notification = widget.children( elem );
+               ok( notification, "Create");
+
+               /*markup check*/
+               if (type == ' ticker') {
+                       ok(notification.find('.ui-ticker-btn'), "makrup Check : Close button") ;
+                       ok(notification.find('.ui-ticker-btn').find(":jqmData(role=button)"), "makrup Check : Close button present") ;
+                       equal(notification.find('.ui-ticker-btn').find(":jqmData(role=button)").text(), 'Close', "makrup Check : Close button text") ;
+                       ok(notification.find('.ui-ticker').find(".ui.ticker-text1-bg"), "makrup Check : ticker text present") ;
+                       ok(notification.find('.ui-ticker').find(".ui.ticker-text2-bg"), "makrup Check : ticker text present") ;
+                       ok(notification.find('.ui-ticker').find("img.ui-ticker-icon").length > 0, "makrup Check : ticker icon present") ;
+               } else {
+                       ok(notification.find('.ui-smallpopup'), "makrup Check : smapll popup") ;
+                       ok(notification.find('.ui-smallpopup').find(".ui.smallpopup-text-bg"), "makrup Check : popup text present") ;
+               }
+
+               /* Open */
+               widget.notification("open");
+               notification = widget.children( elem );
+               ok( notification.hasClass("show"), "API : open");
+
+               /* Close */
+               widget.notification("close");
+               notification = widget.children( elem );
+               ok( notification.hasClass("hide"), "API : close");
+
+               /* hide when click */
+               widget.notification("open");
+               notification = widget.children( elem );
+
+               /*for coverage open notification when it is already open*/
+               widget.notification("open");
+               notification.trigger("vmouseup");
+               notification = widget.children( elem );
+               ok( notification.hasClass("hide"), "Hide when click the notification");
+
+               if ( type == ' ticker') {
+                       widget.notification("open");
+                       closebutton = widget.find(':jqmData(role=button)');
+                       closebutton.trigger("vmouseup");
+                       notification = widget.children( elem );
+                       ok( notification.hasClass("hide"), "Hide when click on the close button");
+               }
+
+               text = notification.children("p");
+               if ( type === "smallpopup") {
+                       ok( $( text[0] ).hasClass("ui-smallpopup-text-bg"), "Text");
+                       widget.notification('text', 'Text21');
+                       ok( $( text[0] ).hasClass("ui-smallpopup-text-bg"), "Text21");
+                       equal( widget.notification('text')[0], "Text21", "API : text - smallpopup");
+                       equal( text[0].innerHTML, "Text21", "API : text - smallpopup");
+               } else {
+                       ok( $( text[0] ).hasClass("ui-ticker-text1-bg"), "Top Text");
+                       ok( $( text[1] ).hasClass("ui-ticker-text2-bg"), "Bottom Text");
+
+                       widget.notification('text', 'Text31', 'Text32');
+                       ok( $( text[0] ).hasClass("ui-ticker-text1-bg"), "Text31", "API : text- ticker");
+                       ok( $( text[1] ).hasClass("ui-ticker-text2-bg"), "Text32", "API : text- ticker");
+                       equal( text[0].innerHTML, "Text31", "API : text - ticker");
+                       equal( text[1].innerHTML, "Text32", "API : text - ticker");
+                       equal( widget.notification('text')[0], "Text31", "API : text - ticker");
+                       equal( widget.notification('text')[1], "Text32", "API : text - ticker");
+
+                       /*icon*/
+                       equal(widget.jqmData('icon'), '02_icon.png', "API : icon , initial check") ;
+                       widget.notification('icon', '03_icon.png');
+                       equal(widget.find('img').attr("src"), '03_icon.png', "API : icon , new icon is set") ;
+               }
+               /*destroy*/
+               widget.notification("destroy");
+               notification = widget.children( elem );
+               ok( !notification.hasClass("show") || !notification.hasClass("hide"), "destroy check");
+       };
+
+       test("smallpopup", function () {
+               $('#notifiaction0').page();
+               unit_notification( $("#smallpopup"), "smallpopup");
+               unit_notification( $("#smallpopup2"), "smallpopup");
+               unit_notification( $("#smallpopup3"), "smallpopup");
+       });
+
+       test("tickernoti", function () {
+               $('#notifiaction1').page();
+               unit_notification( $("#tickernoti"), "ticker");
+               unit_notification( $("#tickernoti2"), "ticker");
+               unit_notification( $("#tickernoti3"), "ticker");
+       });
+}( jQuery ));
diff --git a/tests/additional-unit-tests/popup/index.html b/tests/additional-unit-tests/popup/index.html
new file mode 100755 (executable)
index 0000000..5c0ed07
--- /dev/null
@@ -0,0 +1,253 @@
+<!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.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.2.0/external/qunit.css" />
+
+       <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+       <script src="popup-tests.js"></script>
+
+       <title>Popup Window</title>
+</head>
+
+<body>
+
+<h1 id="qunit-header">Popup Window</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="popupwindow">
+               <div data-role="header" data-position="fixed">
+                       <h1>Popup Window</h1>
+               </div>
+               <div data-role="content">
+               
+                   <div data-role="button" id="popupbutton">Text Button</div>
+                       
+                       <div id="center_info" data-role="popup"  data-position-to='window' class="center_info" data-style='center_info' >
+                               <p class="ui-popup-title">title</p>
+                               <p  class="ui-popup-text">text</p>
+                       </div>
+
+                       <div id="center_title" data-role="popup"  data-position-to='window' class="center_title">
+                               <p class="ui-popup-title">title</p>
+                               <p class="ui-popup-text">text</p>
+                       </div>
+
+                       <div id="center_basic_1btn" data-role="popup"  data-position-to='window' class ="center_basic_1btn">
+                       <p class="ui-popup-title">title</p>
+                               <p  class="ui-popup-text">text</p>
+                               <div class="ui-popup-button-bg">
+                                       <input data-role="button" value="button" />
+                               </div>
+                       </div>
+
+                       <div id="center_title_1btn" data-role="popup"  data-position-to='window' class="center_title_1btn">
+                               <p class="ui-popup-title">title</p>
+                               <p  class="ui-popup-text">text</p>
+                               <div class="ui-popup-button-bg">
+                                       <input data-role="button" value="button" />
+                               </div>
+                       </div>
+                       
+                       
+                       <!-- Social Magazine font popup -->
+               <div id="center_social_style1" data-role="popup"  data-position-to='window' class="center_liststyle_2btn">
+                       <p class="ui-popup-title">title</p>
+                               <p  class="ui-popup-text">text</p>
+                                       <div class="ui-popup-scroller-bg" data-scroll="y"  style="height:auto">
+                                               <ul data-role="listview">
+                                                       <li class="ui-li-has-radio" id="text_fontSmall">
+                                                               <a href="#">
+                                                               <input type="radio" name="radio-choice-1" id="fontSmall" value="choice-1"/>
+                                                               text_Small</a>
+                                                       </li>
+                                                       <li class="ui-li-has-radio" id="text_fontMedium">
+                                                               <a href="#">
+                                                               <input type="radio" name="radio-choice-1" id="fontMedium" value="choice-2"/>
+                                                               text_Medium</a>
+                                                       </li>
+                                                       <li class="ui-li-has-radio" id="text_fontLarge">
+                                                               <a href="#">
+                                                               <input type="radio" name="radio-choice-1" id="fontLarge" value="choice-3"/>
+                                                               text_Large</a>
+                                                       </li>
+                                               </ul>
+                                       </div>
+                                       <div class="ui-popup-button-bg">
+                                               <div data-role="button"  data-inline="true">OK</div>
+                                               <div data-role="button"  data-inline="true">Cancel</div>
+                                       </div>
+               </div>
+
+               <!-- Social Magazine ime popup -->
+               <div id="center_social_style2" data-role="popup"  data-position-to='window' class="center_title_2btn">
+                       <p class="ui-popup-title">title</p>
+                               <p  class="ui-popup-text">text</p>
+                       <div class="ui-popup-text">
+                                               <input type="text" id="newCategoryPopupInput" name="newCategoryName" size="30" />
+                       </div>
+                                       <div class="ui-popup-button-bg">
+                                               <div data-role="button"  data-inline="true">OK</div>
+                                               <div data-role="button"  data-inline="true">Cancel</div>
+                                       </div>
+               </div>
+
+               
+
+
+
+               <!-- Center basic 2 button popup -->
+               <div id="center_basic_2btn" data-role="popup"  data-position-to='window' class="center_basic_2btn">
+                       <p class="ui-popup-title">title</p>
+                               <p  class="ui-popup-text">text</p>
+                       <div class="ui-popup-button-bg">
+                               <div data-role="button"  data-inline="true">Button1</div>
+                               <div data-role="button"  data-inline="true">Button2</div>
+                       </div>
+               </div>
+
+               <!-- Center basic 3 button popup -->
+               <div id="center_basic_3btn" data-role="popup"  data-position-to='window' class="center_basic_3btn">
+                       <p class="ui-popup-title">title</p>
+                               <p  class="ui-popup-text">text</p>
+                       <div class="ui-popup-button-bg">
+                                       <div data-role="button"  data-inline="true">Button1</div>
+                                       <div data-role="button"  data-inline="true">Button2</div>
+                                       <div data-role="button"  data-inline="true">Button3</div>
+                       </div>
+               </div>
+
+
+               <!-- Center title 2 button popup -->
+               <div id="center_title_2btn" data-role="popup"  data-position-to='window' class="center_title_2btn">
+                       <div class="ui-popup-title">title</div>
+                       <div class="ui-popup-text">text</div>
+                       <div class="ui-popup-button-bg">
+                               <div data-role="button"  data-inline="true">Button1</div>
+                               <div data-role="button"  data-inline="true">Button2</div>
+                       </div>
+               </div>
+
+               <!-- Center title 3 button popup -->
+               <div id="center_title_3btn" data-role="popup"  data-position-to='window' class="center_title_3btn">
+                       <div class="ui-popup-title">title</div>
+                       <div class="ui-popup-text">text</div>
+                       <div class="ui-popup-button-bg">
+                               <div data-role="button"  data-inline="true">Button1</div>
+                               <div data-role="button"  data-inline="true">Button2</div>
+                               <div data-role="button"  data-inline="true">Button3</div>
+                       </div>
+               </div>
+
+               <!-- Center button vertical -->
+               <div id="center_button_vertical" data-role="popup"  data-position-to='window' class="center_button_vertical">
+                       <p class="ui-popup-title">title</p>
+                               <p  class="ui-popup-text">text</p>
+                       <div class="ui-popup-button-bg">
+                               <div data-role="button"  data-inline="true">Rename</div>
+                               <div data-role="button"  data-inline="true">Replace</div>
+                               <div data-role="button"  data-inline="true">Cancel</div>
+                       </div>
+               </div>
+
+               <!-- popup checkbox  -->
+               <div id="center_checkbox" data-role="popup"  data-position-to='window' class="center_checkbox">
+                       <p class="ui-popup-title">title</p>
+                               <p  class="ui-popup-text">text</p>
+                       <div class="ui-popup-check-bg">
+                               <input type="checkbox" name="checkbox-1" id="checkbox-1" class="custom" />
+                               <label for="checkbox-1">Don't ask again</label>
+                       </div>
+                       <div class="ui-popup-button-bg">
+                               <div data-role="button"  data-inline="true">Rename</div>
+                               <div data-role="button"  data-inline="true">Replace</div>
+                       </div>
+               </div>
+
+               <!-- popup liststyle 1 button -->
+               <div id="center_liststyle_1btn" data-role="popup"  data-position-to='window' class="center_liststyle_1btn">
+                       <p class="ui-popup-title">title</p>
+                               <p  class="ui-popup-text">text</p>
+                       <div class="ui-popup-scroller-bg" data-scroll="y">
+                               <ul data-role="listview" data-icon="1line-textonly">
+                                       <li><a href="#">List item 1</a></li>
+                                       <li><a href="#">List item 2</a></li>
+                                       <li><a href="#">List item 3</a></li>
+                                       <li><a href="#">List item 4</a></li>
+                                       <li><a href="#">List item 5</a></li>
+                                       <li><a href="#">List item 6</a></li>
+                                       <li><a href="#">List item 7</a></li>
+                                       <li><a href="#">List item 8</a></li>
+                                       <li><a href="#">List item 9</a></li>
+                               </ul>
+                       </div>
+                       <div class="ui-popup-button-bg">
+                               <div data-role="button"  data-inline="true">Cancel</div>
+                       </div>
+               </div>
+
+               <!-- popup liststyle 2 button -->
+               <div id="center_liststyle_2btn" data-role="popup"  data-position-to='window' class="center_liststyle_2btn">
+                       <p class="ui-popup-title">title</p>
+                               <p  class="ui-popup-text">text</p>
+                       <div class="ui-popup-scroller-bg" data-scroll="y">
+                               <ul data-role="listview" data-icon="1line-textonly">
+                                       <li><a href="#">List item 1</a></li>
+                                       <li><a href="#">List item 2</a></li>
+                                       <li><a href="#">List item 3</a></li>
+                                       <li><a href="#">List item 4</a></li>
+                                       <li><a href="#">List item 5</a></li>
+                                       <li><a href="#">List item 6</a></li>
+                                       <li><a href="#">List item 7</a></li>
+                                       <li><a href="#">List item 8</a></li>
+                                       <li><a href="#">List item 9</a></li>
+                               </ul>
+                       </div>
+                       <div class="ui-popup-button-bg">
+                               <div data-role="button"  data-inline="true">Ok</div>
+                               <div data-role="button"  data-inline="true">Cancel</div>
+                       </div>
+               </div>
+
+               <!-- popup liststyle 3 button -->
+               <div id="center_liststyle_3btn" data-role="popup"  data-position-to='window' class="center_liststyle_3btn">
+               <p class="ui-popup-title">title</p>
+                               <p  class="ui-popup-text">text</p>
+                       <div class="ui-popup-scroller-bg" data-scroll="y">
+                               <ul data-role="listview" data-icon="1line-textonly">
+                                       <li><a href="#">List item 1</a></li>
+                                       <li><a href="#">List item 2</a></li>
+                                       <li><a href="#">List item 3</a></li>
+                                       <li><a href="#">List item 4</a></li>
+                                       <li><a href="#">List item 5</a></li>
+                                       <li><a href="#">List item 6</a></li>
+                                       <li><a href="#">List item 7</a></li>
+                                       <li><a href="#">List item 8</a></li>
+                                       <li><a href="#">List item 9</a></li>
+                               </ul>
+                       </div>
+                       <div class="ui-popup-button-bg">
+                               <div data-role="button"  data-inline="true">Rename</div>
+                               <div data-role="button"  data-inline="true">Replace</div>
+                               <div data-role="button"  data-inline="true">Cancel</div>
+                       </div>
+               </div>
+
+               </div>
+       </div>
+
+</div>
+
+</body>
+</html>
diff --git a/tests/additional-unit-tests/popup/popup-tests.js b/tests/additional-unit-tests/popup/popup-tests.js
new file mode 100755 (executable)
index 0000000..3a3f2db
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * Unit Test : Popup window
+ *
+ * Minkyu Kang <mk7.kang@samsung.com>
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+$( document ).bind( "pageshow", function ( ) {
+
+       module("Popup Window" );
+       var unit_popup = function ( widget, type, buttoncount ) {
+
+               var popupbeforepositionEvent = 0,
+                       popupafteropenEvent = 0,
+                       popupaftercloseEvent = 0,
+                       buttonList,
+                       popupwindow = function ( widget ) {
+                               return widget.parent('.ui-popup-container') ;
+                       },
+                       check_text = function ( widget, selector, type ) {
+                               if ( !widget.find( selector ).length ) {
+                                       return;
+                               }
+                               equal( widget.find( selector ).text( ), type, type );
+                       };
+
+               $('#popupbutton').unbind('vclick') ;
+               $('#popupbutton').bind('vclick', function ( ) {
+                       widget.popup("open", {positionTo : 'window', transition : 'none', x : '0', y : '0', link : widget } );
+               } ) ;
+
+               /* Create */
+               widget.popup( );
+               ok( popupwindow( widget ), "Create" );
+
+               /* Open */
+               $('#popupbutton').trigger('vclick') ;
+               ok( parseInt( popupwindow( widget ).css("top" ), 10 ) > 0, "API : open" );
+
+               /* Close */
+               widget.popup("close" );
+               ok( popupwindow( widget ).hasClass("ui-selectmenu-hidden" ) ||
+                               popupwindow( widget ).hasClass("reverse out" ),
+                               "API : close" );
+
+               /* Close the popup by click the screen */
+               $('#popupbutton').trigger('vlick') ;
+               $(".ui-selectmenu-screen" ).trigger("vclick" );
+               ok( popupwindow( widget ).hasClass("ui-selectmenu-hidden" ) || popupwindow( widget ).hasClass("reverse out" ), "Close the popup by click the screen" );
+
+               /* Check Texts */
+               if ( widget.find(".ui-popup-text" ) != undefined ) {
+                       equal( widget.find(".ui-popup-text" ).html( ), "text" );
+               }
+               if ( widget.find(".ui-popup-title" ) != undefined ) {
+                       equal( widget.find(".ui-popup-title" ).html( ), "title" );
+               }
+
+               buttonList = widget.find(":jqmData(role=button )" ) ;
+               equal( buttonList.length, buttoncount, "Button count correct" );
+
+       };
+
+       $("#popupwindow" ).page( );
+
+       test( "Center Title", function ( ) {
+               unit_popup( $("#center_title" ), "center_title" , 0 );
+       } );
+       test( "Center Info", function ( ) {
+               unit_popup( $("#center_info" ), "center_info", 0 );
+       } );
+       test( "Center Basic 1 Button", function ( ) {
+               unit_popup( $("#center_basic_1btn" ), "center_basic_1btn" , 1 );
+       } );
+       test( "Center Title 1 Button", function ( ) {
+               unit_popup( $("#center_title_1btn" ), "center_title_1btn" , 1 );
+       } );
+       test( "Center social style", function ( ) {
+               unit_popup( $("#center_social_style1" ), "center_liststyle_2btn" , 2 );
+       } );
+       test( "center_social_style2", function ( ) {
+               unit_popup( $("#center_social_style2" ), "center_title_2btn" , 2 );
+       } );
+       test( "center_basic_2btn", function ( ) {
+               unit_popup( $("#center_basic_2btn" ), "center_basic_2btn" , 2 );
+       } );
+       test( "center_basic_3btn", function ( ) {
+               unit_popup( $("#center_basic_3btn" ), "center_basic_3btn" , 3 );
+       } );
+       test( "center_title_2btn", function ( ) {
+               unit_popup( $("#center_title_2btn" ), "center_title_2btn" , 2 );
+       } );
+       test( "Center_title_3btn", function ( ) {
+               unit_popup( $("#center_title_3btn" ), "center_title_3btn" , 3 );
+       } );
+       test( "center_button_vertical", function ( ) {
+               unit_popup( $("#center_button_vertical" ), "center_button_vertical" , 3 );
+       } );
+       test( "Center_checkbox", function ( ) {
+               unit_popup( $("#center_checkbox" ), "center_checkbox" , 2 );
+       } );
+       test( "center_liststyle_1btn", function ( ) {
+               unit_popup( $("#center_liststyle_1btn" ), "center_liststyle_1btn" , 1 );
+       } );
+       test( "center_liststyle_2btn", function ( ) {
+               unit_popup( $("#center_liststyle_2btn" ), "center_liststyle_2btn" , 2 );
+       } );
+       test( "center_liststyle_3btn", function ( ) {
+               unit_popup( $("#center_liststyle_3btn" ), "center_liststyle_3btn" , 3 );
+       } );
+
+} );
diff --git a/tests/additional-unit-tests/progressbar/index.html b/tests/additional-unit-tests/progressbar/index.html
new file mode 100755 (executable)
index 0000000..4bd0f3f
--- /dev/null
@@ -0,0 +1,45 @@
+<!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.2.0/external/qunit.css" />
+
+       <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+       <script src="progressbar-tests.js"></script>
+
+       <title>Progressbar</title>
+</head>
+
+<body>
+
+<h1 id="qunit-header">Progressbar</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="progressbar_demo">
+               <div data-role="header" data-position="fixed">
+                       <h1>Progressbar</h1>
+               </div>
+               <div data-role="content">
+                       <ul data-role="listview">
+                               <li><div data-role="progressbar" id="progressbar"></div></li>
+                               <li><div data-role="progressing" data-style="pending" id="pending"></div></li>
+                               <li><div data-role="progressing" data-style="circle" id="progressing"></div></li>
+                       </ul>
+               </div>
+       </div>
+
+</div>
+
+</body>
+</html>
diff --git a/tests/additional-unit-tests/progressbar/progressbar-tests.js b/tests/additional-unit-tests/progressbar/progressbar-tests.js
new file mode 100755 (executable)
index 0000000..f82258a
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * Unit Test : Progressbar
+ *
+ * Minkyu Kang <mk7.kang@samsung.com>
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+( function ( $ ) {
+       module("Progressbar" );
+
+       var unit_progressbar = function ( widget ) {
+               var progress,
+                       i,
+                       value,
+                       get_width = function ( widget ) {
+                               return widget.progressbar( "option", "value" );
+                       },
+                       changeEvent = false ;
+
+               widget.bind('change', function ( ) {
+                       changeEvent = true ;
+               } );
+               widget.progressbar( );
+
+               /* Create */
+               equal( widget.hasClass("ui-progressbar" ), true, "Create" );
+
+               /*markup check */
+               ok( widget.find(".ui-progressbar-bg" ), "Markup check" );
+               ok( widget.find(".ui-progressbar-value" ), "Markup check" );
+
+               /* Value */
+               for ( i = 0; i < 5; i++ ) {
+                       value = Math.floor( Math.random( ) * 100 );
+                       widget.progressbar( "option", "value", value );
+                       equal( changeEvent, true, "Change Event : " );
+                       equal( get_width( widget ), value, "API : value" );
+                       equal( parseInt( widget.find(".ui-progressbar-value" ).css('width'), 10 ) - parseInt( widget.find(".ui-progressbar-bg" ).css('width'), 10 ) * value / 100 < 5, true , "Markup check after value is changed" );
+                       changeEvent = false ;
+               }
+       },
+
+               unit_progress = function ( widget, type ) {
+                       var progress,
+                               elem = ".ui-progress-" + type,
+                               _class = "ui-progress-" + type + "-running";
+
+                       widget.progress( );
+
+                       /* Create */
+                       progress = widget.find( elem );
+                       ok( progress, "Create" );
+
+                       /* Option */
+                       equal( widget.progress( "option", "style" ), type, "Option : style" );
+
+                       /* Running */
+                       widget.progress( "running", true );
+                       progress = widget.find( elem );
+                       equal( progress.hasClass( _class ), true, "API : running" );
+
+                       /* Stop */
+                       widget.progress( "running", false );
+                       progress = widget.find( elem );
+                       equal( progress.hasClass( _class ), false, "API : stop" );
+               };
+
+       test( "progressbar", function ( ) {
+               unit_progressbar( $("#progressbar" ) );
+       } );
+
+       test( "pending bar", function ( ) {
+               unit_progress( $("#pending" ), "pending" );
+       } );
+
+       test( "processing circle", function ( ) {
+               unit_progress( $("#progressing" ), "circle" );
+       } );
+
+
+       test( "progressbar - dynamic", function ( ) {
+
+               $('#progressbar_demo').find(":jqmData(role=contents)" ).empty( );
+               var markup = ' <div data-role= "progressbar" id= "progressbar"></div>';
+               $('#progressbar_demo').find(":jqmData(role=contents)" ).append( markup ).trigger('create') ;
+               unit_progressbar( $("#progressbar" ) );
+       } );
+
+       test( "pending bar - dynamic", function ( ) {
+               $('#progressbar_demo').find(":jqmData(role=contents)" ).empty( );
+               var markup = ' <div data-role= "progressing" data-style= "pending" id= "pending"></div>';
+               $('#progressbar_demo').find(":jqmData(role=contents)" ).append( markup ).trigger('create') ;
+
+               unit_progress( $("#pending" ), "pending" );
+       } );
+
+       test( "processing circle - dynamic", function ( ) {
+               $('#progressbar_demo').find(":jqmData(role=contents)" ).empty( );
+               var markup = ' <div data-role= "progressing" data-style= "circle" id= "progressing"></div>';
+               $('#progressbar_demo').find(":jqmData(role=contents)" ).append( markup ).trigger('create') ;
+
+               unit_progress( $("#progressing" ), "circle" );
+       } );
+} ( jQuery ) );
diff --git a/tests/additional-unit-tests/radio/index.html b/tests/additional-unit-tests/radio/index.html
new file mode 100755 (executable)
index 0000000..3104022
--- /dev/null
@@ -0,0 +1,69 @@
+<!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.2.0/external/qunit.css" />
+       <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+
+       <script src="radio-tests.js"></script>
+       <title>Radio</title>
+</head>
+
+<body>
+
+<h1 id="qunit-header">Radio</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="radiopage">
+               <div data-role='content'>
+                       <input type="radio" name="radio-single" id="radio-single-1" value="Normal" />
+                       <label for="radio-single-1">Normal</label>
+                       <input type="radio" name="radio-2" id="radio-single-2" checked="checked" disabled="disabled" value="Checked, Disabled" />
+                       <label for="radio-single-2">Checked, Disabled</label>
+                       <input type="radio" name="radio-3" id="radio-single-3" disabled="disabled" value="Disabled" />
+                       <label for="radio-single-3">Disabled</label>
+
+                       <fieldset id="controlgroup" data-role="controlgroup">
+                               <input type="radio" name="radio-choice" id="radio-choice-1" value="Cat"  />
+                               <label for="radio-choice-1">Cat</label>
+
+                               <input type="radio" name="radio-choice" id="radio-choice-2" value="Dog" />
+                               <label for="radio-choice-2">Dog</label>
+
+                               <input type="radio" name="radio-choice" id="radio-choice-3" value="Hamster" />
+                               <label for="radio-choice-3">Hamster</label>
+
+                               <input type="radio" name="radio-choice" id="radio-choice-4" value="Lizard" />
+                               <label for="radio-choice-4">Lizard</label>
+                       </fieldset>
+
+                       <fieldset id="controlgroup2" data-type="horizontal" data-role="controlgroup">
+                               <input type="radio" name="radio-choice2" id="radio-choiceh-1" value="Cat"  />
+                               <label for="radio-choiceh-1">Cat</label>
+
+                               <input type="radio" name="radio-choice2" id="radio-choiceh-2" value="Dog" />
+                               <label for="radio-choiceh-2">Dog</label>
+
+                               <input type="radio" name="radio-choice2" id="radio-choiceh-3" value="Hamster" />
+                               <label for="radio-choiceh-3">Hamster</label>
+
+                               <input type="radio" name="radio-choice2" id="radio-choiceh-4" value="Lizard" />
+                               <label for="radio-choiceh-4">Lizard</label>
+                       </fieldset>
+               </div>
+       </div>
+</div>
+
+</body>
+</html>
diff --git a/tests/additional-unit-tests/radio/radio-tests.js b/tests/additional-unit-tests/radio/radio-tests.js
new file mode 100755 (executable)
index 0000000..57ff43b
--- /dev/null
@@ -0,0 +1,179 @@
+/*
+ * Unit Test : Radio
+ *
+ * Hyunjung Kim <hjnim.kim@samsung.com>
+ *
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+$( "#radiopage" ).live( "pageinit", function ( event ) {
+
+       module("Radio" );
+
+       /* Single Radio */
+       var unit_radio = function ( input , type ) {
+               var radio,
+                       label,
+                       checkClass,
+                       labelSpan,
+                       radioClassPrefix = "ui-radio";
+
+               radio = input.parent( );
+               ok( radio.hasClass( radioClassPrefix ) , "Create - Single Radio Button" );
+
+               label = radio.find( "label" );
+               label.trigger( "vclick" );
+               checkClass = radioClassPrefix + "-on";
+               if ( !input.is( ":checked" ) ) {
+                       checkClass = radioClassPrefix + "-off";
+               }
+               ok( label.hasClass( checkClass ), "Click - Radio button" );
+
+               labelSpan = label.children( ).children( );
+               ok( labelSpan.first( ).is( ".ui-btn-text, .ui-btn-text-padding-left" ), "Okay - Label Padding" );
+
+               if ( !input.is( ":disabled" ) ) {
+                       label.trigger( "vclick" );
+               }
+
+               // Text Trim, Cause jQueryMobile( JQM ) 1.1 forced to add -"\u00a0" in buttonIcon( ButtonMarkup )
+               // JQM 1.1 buttonMarkup code :
+               // - if ( buttonIcon ) buttonIcon.appendChild( document.createTextNode( "\u00a0" ) );
+               equal( labelSpan.text( ).trim( ), input.val( ), "Label Text" );
+       },
+
+       /* Group Radio */
+               unit_radio_group = function ( fieldset , type ) {
+                       var radios = [],
+                               label,
+                               labels,
+                               i,
+                               j;
+
+                       type = fieldset.jqmData( "type" );
+                       if ( type === undefined ) {
+                               type = "vertical";
+                       }
+                       ok( fieldset.is( ".ui-corner-all, .ui-controlgroup, .ui-controlgroup-" + type ) , "Create - ControlGroup" );
+
+                       if ( type == "horizontal" ) {
+                               labels = fieldset.find( "span.ui-btn-text" ).each( function ( ) {
+                                       ok( ( $( this ).siblings( ).length == 0 && $( this ).hasClass( "ui-btn-text" ) ) ? true : false, "Alignment - ControlGroup( Horizontal, Single Radio )" );
+                               } );
+                       }
+
+                       radios = fieldset.find( "input[type= ' radio']" );
+                       radios.each( function ( ) {
+                               unit_radio( $( this ) , "Normal" );
+                       } );
+
+                       ok( function ( ) {
+                               try {
+                                       for ( i = 0 ; i < radios.lenght ; i++ ) {
+                                               label = radios[i].find( "label" );
+                                               label.trigger( "vclick" );
+                                               if ( !label.hasClass( "ui-radio-on" ) ) {
+                                                       throw "error - other button activate";
+                                               }
+                                               for ( j = 0 ; j < radios.lenght ; j++ ) {
+                                                       if ( i !== j ) {
+                                                               label = radios[j].find( "label" );
+                                                               if ( label.hasClass( "ui-radio-on" ) ) {
+                                                                       throw "error - other button activate";
+                                                               }
+                                                       }
+                                               }
+                                       }
+                               } catch ( Exception ) {
+                                       return false;
+                               }
+                               return true;
+                       }, "Click - Radio Button( Group )" );
+               };
+
+       test( "radiobutton - Single" , function ( ) {
+               unit_radio( $("#radio-single-1" ) , "Normal" );
+       } );
+
+       test( "radiobutton - Single, Checked, Disabled" , function ( ) {
+               unit_radio( $("#radio-single-2" ) , "Checked, Disabled" );
+       } );
+
+       test( "radiobutton - Single, Disabled" , function ( ) {
+               unit_radio( $("#radio-single-3" ) , "Disabled" );
+       } );
+
+       test( "radiobutton - Group" , function ( ) {
+               unit_radio_group( $("#controlgroup" ) , "Group" );
+       } );
+
+       test( "radiobutton - Group, Horizontal" , function ( ) {
+               unit_radio_group( $("#controlgroup2" ) , "Group - horizontal" );
+       } );
+
+       test( "radiobutton - Single -Dunamic" , function ( ) {
+
+               $('#radiopage').find(":jqmData(role=contents)" ).empty( );
+
+               var markup = ' <input type= "radio" name= "radio-single" id= "radio-single-1" value= "Normal" /><label for= "radio-single-1">Normal</label>';
+               $('#radiopage').find(":jqmData(role=contents)" ).append( markup ).trigger('create');
+
+               unit_radio( $("#radio-single-1" ) , "Normal" );
+       } );
+
+       test( "radiobutton - Single, Checked, Disabled -Dunamic" , function ( ) {
+               $('#radiopage').find(":jqmData(role=contents)" ).empty( );
+
+               var markup = ' <input type= "radio" name= "radio-2" id= "radio-single-2" checked= "checked" disabled= "disabled" value= "Checked, Disabled" /><label for= "radio-single-2">Checked, Disabled</label>';
+               $('#radiopage').find(":jqmData(role=contents)" ).append( markup ).trigger('create');
+               unit_radio( $("#radio-single-2" ) , "Checked, Disabled" );
+       } );
+
+       test( "radiobutton - Single, Disabled -Dunamic" , function ( ) {
+               $('#radiopage').find(":jqmData(role=contents)" ).empty( );
+
+               var markup = ' <input type= "radio" name= "radio-3" id= "radio-single-3" disabled= "disabled" value= "Disabled" /><label for= "radio-single-3">Disabled</label>';
+               $('#radiopage').find(":jqmData(role=contents)" ).append( markup ).trigger('create');
+               unit_radio( $("#radio-single-3" ) , "Disabled" );
+       } );
+
+       test( "radiobutton - Group -Dunamic" , function ( ) {
+               $('#radiopage').find(":jqmData(role=contents)" ).empty( );
+
+               var markup = ' <fieldset id= "controlgroup" data-role= "controlgroup">' +
+                                                                       '<input type= "radio" name= "radio-choice" id= "radio-choice-1" value= "Cat" />' +
+                                                                       '<label for= "radio-choice-1">Cat</label>' +
+
+                                                                       '<input type= "radio" name= "radio-choice" id= "radio-choice-2" value= "Dog" />' +
+                                                                       '<label for= "radio-choice-2">Dog</label>' +
+
+                                                                       '<input type= "radio" name= "radio-choice" id= "radio-choice-3" value= "Hamster" />' +
+                                                                       '<label for= "radio-choice-3">Hamster</label>' +
+
+                                                                       '<input type= "radio" name= "radio-choice" id= "radio-choice-4" value= "Lizard" />' +
+                                                                       '<label for= "radio-choice-4">Lizard</label>' +
+                                                               '</fieldset>';
+               $('#radiopage').find(":jqmData(role=contents)" ).append( markup ).trigger('create');
+               unit_radio_group( $("#controlgroup" ) , "Group" );
+       } );
+
+       test( "radiobutton - Group, Horizontal -Dunamic" , function ( ) {
+               $('#radiopage').find(":jqmData(role=contents)" ).empty( );
+
+               var markup = ' <fieldset id= "controlgroup2" data-type= "horizontal" data-role= "controlgroup">' +
+                                                               '<input type= "radio" name= "radio-choice2" id= "radio-choiceh-1" value= "Cat" />' +
+                                                               '<label for= "radio-choiceh-1">Cat</label>' +
+
+                                                               '<input type= "radio" name= "radio-choice2" id= "radio-choiceh-2" value= "Dog" />' +
+                                                               '<label for= "radio-choiceh-2">Dog</label>' +
+
+                                                               '<input type= "radio" name= "radio-choice2" id= "radio-choiceh-3" value= "Hamster" />' +
+                                                               '<label for= "radio-choiceh-3">Hamster</label>' +
+
+                                                               '<input type= "radio" name= "radio-choice2" id= "radio-choiceh-4" value= "Lizard" />' +
+                                                               '<label for= "radio-choiceh-4">Lizard</label>' +
+                                                       '</fieldset>';
+               $('#radiopage').find(":jqmData(role=contents)" ).append( markup ).trigger('create');
+               unit_radio_group( $("#controlgroup2" ) , "Group - horizontal" );
+       } );
+} );
diff --git a/tests/additional-unit-tests/runner.js b/tests/additional-unit-tests/runner.js
new file mode 100755 (executable)
index 0000000..7ff75d4
--- /dev/null
@@ -0,0 +1,100 @@
+$(document).ready(function() {
+       var Runner = function( ) {
+               var self = this;
+
+               $.extend( self, {
+                       frame: window.frames[ "testFrame" ],
+
+                       testTimeout: 3 * 60 * 1000,
+
+                       $frameElem: $( "#testFrame" ),
+
+                       assertionResultPrefix: "assertion result for test:",
+
+                       onTimeout: QUnit.start,
+
+                       onFrameLoad: function() {
+                               // establish a timeout for a given suite in case of async tests hanging
+                               self.testTimer = setTimeout( self.onTimeout, self.testTimeout );
+
+                               // it might be a redirect with query params for push state
+                               // tests skip this call and expect another
+                               if( !self.frame.QUnit ) {
+                                       self.$frameElem.one( "load", self.onFrameLoad );
+                                       return;
+                               }
+
+                               // when the QUnit object reports done in the iframe
+                               // run the onFrameDone method
+                               self.frame.QUnit.done = self.onFrameDone;
+                               self.frame.QUnit.testDone = self.onTestDone;
+                       },
+
+                       onTestDone: function( result ) {
+                               QUnit.ok( !(result.failed > 0), result.name );
+                               //self.recordAssertions( result.total - result.failed, result.name );
+                       },
+
+                       onFrameDone: function( failed, passed, total, runtime ){
+                               // make sure we don't time out the tests
+                               clearTimeout( self.testTimer );
+
+                               // TODO decipher actual cause of multiple test results firing twice
+                               // clear the done call to prevent early completion of other test cases
+                               self.frame.QUnit.done = $.noop;
+                               self.frame.QUnit.testDone = $.noop;
+
+                               // hide the extra assertions made to propogate the count
+                               // to the suite level test
+                               self.hideAssertionResults();
+
+                               // continue on to the next suite
+                               QUnit.start();
+                       },
+
+                       recordAssertions: function( count, parentTest ) {
+                               for( var i = 0; i < count; i++ ) {
+                                       ok( true, self.assertionResultPrefix + parentTest );
+                               }
+                       },
+
+                       hideAssertionResults: function() {
+                               $( "li:not([id]):contains('" + self.assertionResultPrefix + "')" ).hide();
+                       },
+
+                       exec: function( data ) {
+                               var template = self.$frameElem.attr( "data-src" );
+
+                               $.each( data.testPages, function(i, dir) {
+                                       QUnit.asyncTest( dir, function() {
+                                               console.log('Test start: ' + dir);
+                                               self.dir = dir;
+                                               self.$frameElem.one( "load", self.onFrameLoad );
+                                               self.$frameElem.attr( "src", template.replace("{{testfile}}", dir + '/index.html') );
+                                       });
+                               });
+
+                               // having defined all suite level tests let QUnit run
+                               QUnit.start();
+                       }
+               });
+       };
+
+       // prevent qunit from starting the test suite until all tests are defined
+       QUnit.begin = function(  ) {
+               this.config.autostart = false;
+               this.config.reorder = false;
+       };
+
+       QUnit.done = function( details ) {
+       /*
+               setCookie( "TizenP", details.passed );
+               setCookie( "TizenF", details.failed );
+               setCookie( "TizenR", details.runtime );
+               setCookie( "TizenT", details.total );
+               location.href = "../jqm-tchelper/result.php";
+               */
+       }
+       // get the test directories
+       new Runner().exec(TESTS);
+});
diff --git a/tests/additional-unit-tests/searchbar/index.html b/tests/additional-unit-tests/searchbar/index.html
new file mode 100755 (executable)
index 0000000..ff45637
--- /dev/null
@@ -0,0 +1,89 @@
+<!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.2.0/external/qunit.css" />
+               <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+               <script src="searchbar-tests.js"></script>
+               <title>Searchbar</title>
+       </head>
+
+       <body>
+               <h1 id="qunit-header">Searchbar</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="dummy-page">
+                               <div data-role="header" data-position="fixed">
+                                       <h1>Dummy</h1>
+                               </div>
+                               <div data-role="contents">
+                               </div>
+                       </div>
+
+                       <div data-role="page" id="searchbar-unit-test" data-add-back-btn="true">
+                               <div data-role="header" data-position="fixed">
+                                       <h1>Searchbar</h1>
+                                       <input type="search" data-cancel-btn=true name="search" data-icon="call" id="searchInput" value=""/>
+                               </div>
+                               <div data-role="content" id="searchbar-content">
+                                       <p>Hairston</p>
+                                       <p>Hansbrough</p>
+                                       <p>Allred</p>
+                                       <p>Hanrahan</p>
+                                       <p>Egan</p>
+                                       <p>Dare</p>
+                                       <p>Edmonson</p>
+                                       <p>Calip</p>
+                                       <p>Baker</p>
+                                       <p>Fazekas</p>
+                                       <p>Garrity</p>
+                                       <p>Hansen</p>
+                                       <p>Feigenbaum</p>
+                                       <p>Fillmore</p>
+                                       <p>Darden</p>
+                                       <p>Davis</p>
+                                       <p>Fitzgerald</p>
+                                       <p>Carr</p>
+                                       <p>Danilovic</p>
+                                       <p>Dark</p>
+                                       <p>Alexander</p>
+                                       <p>Allen</p>
+                                       <p>Edwards</p>
+                                       <p>Garrett</p>
+                                       <p>Gardner</p>
+                                       <p>Carroll</p>
+                                       <p>Garner</p>
+                                       <p>Finn</p>
+                                       <p>Edelin</p>
+                                       <p>Gay</p>
+                               </div>
+                       </div>
+               </div>
+               <script>
+                       $( "#searchInput" ).live( "input change", function(){
+                               var regEx = "";
+
+                               regEx = ".*" + $( "#searchInput" ).val();
+
+                               $( "#searchbar-content p" ).each( function(){
+                                       if ( $( this ).text().search( new RegExp( regEx ) ) != -1) {
+                                               $( this ).show();
+                                       }
+                                       else {
+                                               $( this ).hide();
+                                       }
+                               });
+                       } );
+               </script>
+       </body>
+</html>
diff --git a/tests/additional-unit-tests/searchbar/searchbar-tests.js b/tests/additional-unit-tests/searchbar/searchbar-tests.js
new file mode 100755 (executable)
index 0000000..3cfb7f5
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * Unit Test : Searchbar list
+ *
+ * Wongi Lee <wongi11.lee@samsung.com>
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok, notEqual*/
+$( document ).ready( function ( ) {
+
+       module( "Searchbar" );
+
+       // trigger pagecreate
+       $( "#searchbar-unit-test" ).page( );
+
+       var searctbar_test = function ( widget, options ) {
+               var $divSearchbar = $( "#searchbar-unit-test div.input-search-bar" ),
+                       $input = $( "input" );
+
+               equal( $divSearchbar.length, 1, "initialized" );
+               equal( $divSearchbar.find( "div.ui-input-search" ).length, 1 );
+               equal( $divSearchbar.find( "div.ui-input-search input.ui-input-text" ).length, 1 );
+               equal( $divSearchbar.find( "div.ui-input-search a.ui-input-clear" ).hasClass( "ui-input-clear-hidden" ), true );
+               equal( $divSearchbar.find( "div.ui-input-search div.ui-image-search" ).length, 1 );
+
+               equal( $("#searchbar-content p" ).filter( function ( index ) {
+                       return $( this ).css( "display" ) != "none";
+               } ).length, 30 );
+
+               /* Public Method */
+               /* disable */
+               $( "#searchInput" ).searchbar( "disable" );
+               equal( $( "#searchbar-unit-test div.ui-input-search" ).hasClass( "ui-disabled" ), true, "disable" );
+               equal( $( "#searchInput" ).attr( "disabled" ), "disabled" );
+
+
+               $input.val( "are" ).trigger( "change" );
+               equal( $("#searchbar-content p" ).filter( function ( index ) {
+                       return $( this ).css( "display" ) != "none";
+               } ).length, 1 , "After search bar was disabled testing chage event" );
+
+               /* enable */
+               $( "#searchInput" ).searchbar( "enable" );
+               equal( $( "#searchbar-unit-test div.ui-input-search" ).hasClass( "ui-disabled" ), false, "enable" );
+               equal( $( "#searchInput" ).attr( "disabled" ), undefined );
+
+               /* Event */
+               /* Search : Input and trigger change */
+               $input.focus( );
+               equal( $( "div.ui-image-search" ).css( "display" ), "block", "Input and trigger change" );
+
+               $input.val( "a" ).trigger( "change" );
+
+               $input.val( "are" ).trigger( "change" );
+               equal( $("#searchbar-content p" ).filter( function ( index ) {
+                       return $( this ).css( "display" ) != "none";
+               } ).length, 1 );
+
+               $input.val( "12" ).trigger( "change" );
+               equal( $("#searchbar-content p" ).filter( function ( index ) {
+                       return $( this ).css( "display" ) != "none";
+               } ).length, 0 );
+
+               /* Clear button pressed. */
+               $( "a.ui-input-clear" ).trigger( "click" );
+               equal( $("#searchbar-content p" ).filter( function ( index ) {
+                       return $( this ).css( "display" ) != "none";
+               } ).length, 30 );
+
+               equal( $divSearchbar.find( "div.ui-input-search a.ui-input-clear" ).hasClass( "ui-input-clear-hidden" ), true, "Clear button pressed" );
+
+               if ( options.button ) {
+                       /* Button test */
+                       equal( $( ".ui-btn" ).hasClass( "ui-btn" ), true );
+                       equal( $divSearchbar.find( "> .ui-btn" ).jqmData("icon" ), options.button );
+               }
+
+               if ( options.cancel == true ) {
+                       /* Cancel test*/
+                       equal( $( ".ui-input-cancel" ).hasClass( "ui-btn" ), true );
+                       equal( $( ".ui-input-cancel" ).hasClass( "ui-btn-icon-cancel" ), true );
+
+                       equal( $( ".ui-input-cancel" ).hasClass( "ui-btn" ), true );
+                       equal( $( ".ui-input-cancel" ).hasClass( "ui-btn-icon-cancel" ), true );
+
+                       /* Cancel button pressed. */
+                       $( "a.ui-btn-icon-cancel" ).trigger( "click" );
+                       notEqual( $( "div.ui-image-search" ).css( "display" ), "none" );
+               }
+       } ;
+
+       test( "Searchbar", function ( ) {
+               /* Initialize */
+               searctbar_test( $('#searchInput'), {button : 'call', cancel : true} ) ;
+       } );
+
+} );
diff --git a/tests/additional-unit-tests/segmentcontrol/index.html b/tests/additional-unit-tests/segmentcontrol/index.html
new file mode 100755 (executable)
index 0000000..8f31f39
--- /dev/null
@@ -0,0 +1,108 @@
+<!DOCTYPE html>
+<html lang="en">
+<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.2.0/external/qunit.css" />
+
+       <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+
+  <script src="segmentcontrol-tests.js"></script>
+</head>
+<body>
+
+<h1 id="qunit-header">Controlbar</h1>
+<h2 id="qunit-banner"></h2>
+<h2 id="qunit-userAgent"></h2>
+<ol id="qunit-tests">
+</ol>
+
+
+<div data-nstest-role="page" id='segmentcontrol_page'>
+  <div data-nstest-role="header" data-position="inline">
+    <h1>SegmentControl Test - markup</h1>
+  </div>
+  <div data-nstest-role="content">
+               <div data-role="fieldcontain" id="segmentcontrol-2btn">
+                       <fieldset data-role="controlgroup" data-type="horizontal">
+                               <input type="radio" name="radio-view-1" data-icon="segment-titlestyle-segonly" id="segment1" value="on" checked="checked" />
+                               <label for="segment1">List</label>
+                               <input type="radio" name="radio-view-1" data-icon="segment-titlestyle-segonly" id="segment2" value="off" />
+                               <label for="segment2">Grid</label>
+                       </fieldset>
+               </div>
+
+               <div data-role="fieldcontain" id="segmentcontrol-3btn">
+                       <fieldset data-role="controlgroup" data-type="horizontal">
+                               <input type="radio" name="radio-view-2" data-icon="segment-titlestyle-segonly" id="segment3" value="on" checked="checked" />
+                               <label for="segment3">List</label>
+                               <input type="radio" name="radio-view-2" data-icon="segment-titlestyle-segonly" id="segment4" value="off" />
+                               <label for="segment4">Grid</label>
+                               <input type="radio" name="radio-view-2" data-icon="segment-titlestyle-segonly" id="segment5" value="off" />
+                               <label for="segment5">Grid</label>
+                       </fieldset>
+               </div>
+
+               <div data-role="fieldcontain" id="segmentcontrol-4btn">
+                       <fieldset data-role="controlgroup" data-type="horizontal">
+                               <input type="radio" name="radio-view-9" data-icon="segment-titlestyle-segonly" id="segment6" value="on" checked="checked" />
+                               <label for="segment6">List</label>
+                               <input type="radio" name="radio-view-9" data-icon="segment-titlestyle-segonly" id="segment7" value="off" />
+                               <label for="segment7">Grid</label>
+                               <input type="radio" name="radio-view-9" data-icon="segment-titlestyle-segonly" id="segment8" value="off" />
+                               <label for="segment8">Grid</label>
+                               <input type="radio" name="radio-view-9" data-icon="segment-titlestyle-segonly" id="segment9" value="off" />
+                               <label for="segment9">Grid</label>
+                       </fieldset>
+               </div>
+               
+               <div data-role="fieldcontain" class="controlField" id="segmentcontrol-2btn-v">
+                       <fieldset data-role="controlgroup" data-type="vertical">
+                               <legend>segment toolbar with 2 options</legend>
+                               <input type="radio" name="radio-view-9" data-icon="segment-titlestyle-segonly" id="segment861" value="on" checked="checked" />
+                               <label for="segment861">Option 1</label>
+                               <input type="radio" name="radio-view-9" data-icon="segment-titlestyle-segonly" id="segment862" value="off" />
+                               <label for="segment862">Option 2</label>
+                       </fieldset>
+               </div>
+                                                                       
+               <div data-role="fieldcontain" class="controlField" id="segmentcontrol-3btn-v">
+                       <fieldset data-role="controlgroup" data-type="vertical">
+                               <legend>segment toolbar with 3 options</legend>
+                               <input type="radio" name="radio-view-9" data-icon="segment-titlestyle-segonly" id="segment861" value="off"  />
+                               <label for="segment861">Option 1</label>
+                               <input type="radio" name="radio-view-9" data-icon="segment-titlestyle-segonly" id="segment862" value="on" checked="checked" />
+                               <label for="segment862">Option 2</label>
+                               <input type="radio" name="radio-view-9" data-icon="segment-titlestyle-segonly" id="segment863" value="off" />
+                               <label for="segment863">Option 3</label>
+                       </fieldset>
+               </div>
+               
+                <div data-role="fieldcontain" class="controlField" id="segmentcontrol-4btn-v">
+                       <fieldset data-role="controlgroup" data-type="vertical">
+                               <legend>segment toolbar with 4 options</legend>
+                               <input type="radio" name="radio-view-9" data-icon="segment-titlestyle-segonly" id="segment861" value="off" />
+                               <label for="segment861">Option 1</label>
+                               <input type="radio" name="radio-view-9" data-icon="segment-titlestyle-segonly" id="segment862" value="off" />
+                               <label for="segment862">Option 2</label>
+                               <input type="radio" name="radio-view-9" data-icon="segment-titlestyle-segonly" id="segment863" value="off" />
+                               <label for="segment863">Option 3</label>
+                               <input type="radio" name="radio-view-9" data-icon="segment-titlestyle-segonly" id="segment864" value="on"  checked="checked" />
+                               <label for="segment864">Option 4</label>
+                       </fieldset>
+               </div>
+
+       </div>
+       <div data-nstest-role="footer">
+       </div>
+</div>
+
+
+</body>
+</html>
diff --git a/tests/additional-unit-tests/segmentcontrol/segmentcontrol-tests.js b/tests/additional-unit-tests/segmentcontrol/segmentcontrol-tests.js
new file mode 100755 (executable)
index 0000000..af75328
--- /dev/null
@@ -0,0 +1,175 @@
+/*
+ * segmentcontrol unit tests
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+( function ( $ ) {
+       module( "SegmentControl" );
+
+       var unit_segmentcontrol = function ( widget, inputCount, layout ) {
+               var segmentGroup = widget;
+
+               /* Create */
+               ok( segmentGroup, "Create" );
+               equal( "fieldcontain", segmentGroup.jqmData("role" ), "segment control generate" );
+               equal( segmentGroup.find( "input" ).length, inputCount, "segment control listitem count test" );
+               equal( segmentGroup.find( "input" ).is( ":jqmData(icon=segment-titlestyle-segonly)" ), true, "segment control style test" );
+
+               /*Markup Check*/
+               equal( segmentGroup.hasClass("ui-field-contain" ), true, "ui-field-contain class added" ) ;
+               equal( segmentGroup.find(":jqmData(role=controlgroup )" ).hasClass("ui-controlgroup-" + layout ), true ) ;
+               equal( segmentGroup.find(":jqmData(role=controlgroup )" ).jqmData("type" ) , layout, "data-type" ) ;
+
+       };
+
+       test( "segmentcontrol 2btn-h test", function ( ) {
+               unit_segmentcontrol( $("#segmentcontrol-2btn" ), 2 , "horizontal" );
+       } );
+
+       test( "segmentcontrol 3btn-h test", function ( ) {
+               unit_segmentcontrol( $("#segmentcontrol-3btn" ), 3, "horizontal" );
+       } );
+
+       test( "segmentcontrol 4btn-h test", function ( ) {
+               unit_segmentcontrol( $("#segmentcontrol-4btn" ), 4, "horizontal" );
+       } );
+
+       test( "segmentcontrol 2btn-v test", function ( ) {
+               unit_segmentcontrol( $("#segmentcontrol-2btn-v" ), 2, "vertical" );
+       } );
+
+       test( "segmentcontrol 3btn-v test", function ( ) {
+               unit_segmentcontrol( $("#segmentcontrol-3btn-v" ), 3 , "vertical" );
+       } );
+
+       test( "segmentcontrol 4btn-v test", function ( ) {
+               unit_segmentcontrol( $("#segmentcontrol-4btn-v" ), 4, "vertical" );
+       } );
+
+
+       test( "segmentcontrol 2btn-h test - dynamic", function ( ) {
+
+               /* Create */
+               var segmentControlHTML = '<div data-nstest-role= "content">' +
+                                                                                                               '<div data-role= "fieldcontain" id= "segmentcontrol-2btn">' +
+                                                                                                                       '<fieldset data-role= "controlgroup" data-type= "horizontal">' +
+                                                                                                                               '<input type= "radio" name= "radio-view-1" data-icon= "segment-titlestyle-segonly" id= "segment1" value= "on" checked= "checked" />' +
+                                                                                                                               '<label for= "segment1">List</label>' +
+                                                                                                                               '<input type= "radio" name= "radio-view-1" data-icon= "segment-titlestyle-segonly" id= "segment2" value= "off" />' +
+                                                                                                                               '<label for= "segment2">Grid</label>' +
+                                                                                                                       '</fieldset>' +
+                                                                                                       '</div>';
+               /* Clean */
+               $('#segmentcontrol_page').find(":jqmData(role=content)" ).empty( );
+               $('#segmentcontrol_page').find(":jqmData(role=content)" ).append( segmentControlHTML ).trigger('create') ;
+               unit_segmentcontrol( $("#segmentcontrol-2btn" ), 2 , "horizontal" );
+       } );
+
+       test( "segmentcontrol 3btn test-h - dynamic", function ( ) {
+
+               /* Create */
+               var segmentControlHTML = '<div data-nstest-role= "content">' +
+                                                                                                               '<div data-role= "fieldcontain" id= "segmentcontrol-2btn">' +
+                                                                                                                       '<fieldset data-role= "controlgroup" data-type= "horizontal">' +
+                                                                                                                               '<input type= "radio" name= "radio-view-1" data-icon= "segment-titlestyle-segonly" id= "segment1" value= "on" checked= "checked" />' +
+                                                                                                                               '<label for= "segment1">List</label>' +
+                                                                                                                               '<input type= "radio" name= "radio-view-1" data-icon= "segment-titlestyle-segonly" id= "segment2" value= "off" />' +
+                                                                                                                               '<label for= "segment2">Grid</label>' +
+                                                                                                                               '<input type= "radio" name= "radio-view-1" data-icon= "segment-titlestyle-segonly" id= "segment3" value= "off" />' +
+                                                                                                                               '<label for= "segment3">Grid</label>' +
+                                                                                                                       '</fieldset>' +
+                                                                                                       '</div>';
+               /* Clean */
+               $('#segmentcontrol_page').find(":jqmData(role=content)" ).empty( );
+
+               $('#segmentcontrol_page').find(":jqmData(role=content)" ).append( segmentControlHTML ).trigger('create') ;
+               unit_segmentcontrol( $("#segmentcontrol-3btn" ), 3, "horizontal" );
+       } );
+
+       test( "segmentcontrol 4btn test-h - dynamic", function ( ) {
+
+               /* Create */
+               var segmentControlHTML = '<div data-nstest-role= "content">' +
+                                                                                                               '<div data-role= "fieldcontain" id= "segmentcontrol-2btn">' +
+                                                                                                                       '<fieldset data-role= "controlgroup" data-type= "horizontal">' +
+                                                                                                                               '<input type= "radio" name= "radio-view-1" data-icon= "segment-titlestyle-segonly" id= "segment1" value= "on" checked= "checked" />' +
+                                                                                                                               '<label for= "segment1">List</label>' +
+                                                                                                                               '<input type= "radio" name= "radio-view-1" data-icon= "segment-titlestyle-segonly" id= "segment2" value= "off" />' +
+                                                                                                                               '<label for= "segment2">Grid</label>' +
+                                                                                                                               '<input type= "radio" name= "radio-view-1" data-icon= "segment-titlestyle-segonly" id= "segment3" value= "off" />' +
+                                                                                                                               '<label for= "segment3">Grid</label>' +
+                                                                                                                                       '<input type= "radio" name= "radio-view-1" data-icon= "segment-titlestyle-segonly" id= "segment4" value= "off" />' +
+                                                                                                                               '<label for= "segment4">Grid</label>' +
+                                                                                                                       '</fieldset>' +
+                                                                                                       '</div>';
+               /* Clean */
+               $('#segmentcontrol_page').find(":jqmData(role=content)" ).empty( );
+
+               $('#segmentcontrol_page').find(":jqmData(role=content)" ).append( segmentControlHTML ).trigger('create') ;
+               unit_segmentcontrol( $("#segmentcontrol-4btn" ), 4, "horizontal" );
+       } );
+
+       test( "segmentcontrol 2btn-v test - dynamic", function ( ) {
+
+               /* Create */
+               var segmentControlHTML = '<div data-nstest-role= "content">' +
+                                                                                                               '<div data-role= "fieldcontain" id= "segmentcontrol-2btn">' +
+                                                                                                                       '<fieldset data-role= "controlgroup" data-type= "vertical">' +
+                                                                                                                               '<input type= "radio" name= "radio-view-1" data-icon= "segment-titlestyle-segonly" id= "segment1" value= "on" checked= "checked" />' +
+                                                                                                                               '<label for= "segment1">List</label>' +
+                                                                                                                               '<input type= "radio" name= "radio-view-1" data-icon= "segment-titlestyle-segonly" id= "segment2" value= "off" />' +
+                                                                                                                               '<label for= "segment2">Grid</label>' +
+                                                                                                                       '</fieldset>' +
+                                                                                                       '</div>';
+               /* Clean */
+               $('#segmentcontrol_page').find(":jqmData(role=content)" ).empty( );
+
+               $('#segmentcontrol_page').find(":jqmData(role=content)" ).append( segmentControlHTML ).trigger('create') ;
+               unit_segmentcontrol( $("#segmentcontrol-2btn-v" ), 2, "vertical" );
+       } );
+
+       test( "segmentcontrol 3btn-v test - dynamic", function ( ) {
+
+               /* Create */
+               var segmentControlHTML = '<div data-nstest-role= "content">' +
+                                                                                                               '<div data-role= "fieldcontain" id= "segmentcontrol-2btn">' +
+                                                                                                                       '<fieldset data-role= "controlgroup" data-type= "vertical">' +
+                                                                                                                               '<input type= "radio" name= "radio-view-1" data-icon= "segment-titlestyle-segonly" id= "segment1" value= "on" checked= "checked" />' +
+                                                                                                                               '<label for= "segment1">List</label>' +
+                                                                                                                               '<input type= "radio" name= "radio-view-1" data-icon= "segment-titlestyle-segonly" id= "segment2" value= "off" />' +
+                                                                                                                               '<label for= "segment2">Grid</label>' +
+                                                                                                                               '<input type= "radio" name= "radio-view-1" data-icon= "segment-titlestyle-segonly" id= "segment3" value= "off" />' +
+                                                                                                                               '<label for= "segment3">Grid</label>' +
+                                                                                                                       '</fieldset>' +
+                                                                                                       '</div>';
+               /* Clean */
+               $('#segmentcontrol_page').find(":jqmData(role=content)" ).empty( );
+               $('#segmentcontrol_page').find(":jqmData(role=content)" ).append( segmentControlHTML ).trigger('create') ;
+               unit_segmentcontrol( $("#segmentcontrol-3btn-v" ), 3 , "vertical" );
+       } );
+
+       test( "segmentcontrol 4btn-v test - dynamic", function ( ) {
+               /* Create */
+               var segmentControlHTML = '<div data-nstest-role= "content">' +
+                                                                                                               '<div data-role= "fieldcontain" id= "segmentcontrol-2btn">' +
+                                                                                                                       '<fieldset data-role= "controlgroup" data-type= "vertical">' +
+                                                                                                                               '<input type= "radio" name= "radio-view-1" data-icon= "segment-titlestyle-segonly" id= "segment1" value= "on" checked= "checked" />' +
+                                                                                                                               '<label for= "segment1">List</label>' +
+                                                                                                                               '<input type= "radio" name= "radio-view-1" data-icon= "segment-titlestyle-segonly" id= "segment2" value= "off" />' +
+                                                                                                                               '<label for= "segment2">Grid</label>' +
+                                                                                                                               '<input type= "radio" name= "radio-view-1" data-icon= "segment-titlestyle-segonly" id= "segment3" value= "off" />' +
+                                                                                                                               '<label for= "segment3">Grid</label>' +
+                                                                                                                                       '<input type= "radio" name= "radio-view-1" data-icon= "segment-titlestyle-segonly" id= "segment4" value= "off" />' +
+                                                                                                                               '<label for= "segment4">Grid</label>' +
+                                                                                                                       '</fieldset>' +
+                                                                                                       '</div>';
+               /* Clean */
+               $('#segmentcontrol_page').find(":jqmData(role=content)" ).empty( );
+
+               $('#segmentcontrol_page').find(":jqmData(role=content)" ).append( segmentControlHTML ).trigger('create') ;
+               unit_segmentcontrol( $("#segmentcontrol-4btn-v" ), 4, "vertical" );
+       } );
+
+
+
+} ( jQuery ) );
diff --git a/tests/additional-unit-tests/slider/index.html b/tests/additional-unit-tests/slider/index.html
new file mode 100755 (executable)
index 0000000..fac80d6
--- /dev/null
@@ -0,0 +1,49 @@
+<!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.2.0/external/qunit.css" />
+
+       <script src="../../../libs/js/jquery-mobile-1.2.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="sliderpage1">
+               <div data-role="header" data-position="fixed">
+                       <h1>Slider</h1>
+               </div>
+               <div data-role="content">
+                       <input id="slider0" data-popup="false" type="range" name="slider" value="50" min="0" max="100"></input>
+               </div>
+       </div>
+       
+       <div data-role="page" id="sliderpage2">
+               <div data-role="header" data-position="fixed">
+                       <h1>Slider</h1>
+               </div>
+               <div data-role="content">               
+                       <input id="slider1" data-popup="false" type="range" name="slider" value="5" min="0" max="10" data-icon="volume"></input>
+               </div>
+       </div>
+</div>
+
+</body>
+</html>
diff --git a/tests/additional-unit-tests/slider/slider-tests.js b/tests/additional-unit-tests/slider/slider-tests.js
new file mode 100755 (executable)
index 0000000..fc1c582
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Unit Test : Slider
+ *
+ * Minkyu Kang <mk7.kang@samsung.com>
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+$( document ).ready( function ( ) {
+       module("Slider" );
+       QUnit.config.reorder = false;
+       var unit_slider = function ( widget , options ) {
+               var slider,
+                       popup,
+                       oldValue,
+                       slider_bg = function ( widget ) {
+                               return "ui-slider-container";
+                       },
+                       handle,
+                       handle_left = function ( widget, slider ) {
+                               var left = widget.val() * slider.width() /
+                                       ( widget.attr("max") - widget.attr("min") );
+                               return Math.floor( left );
+                       },
+                       random_move = function ( min, max ) {
+                               return Math.floor( ( Math.random( ) * ( max - min + 1 ) ) + min );
+                       },
+                       checkEquality = function ( val1, val2 ) {
+                               return ( parseInt( val1, 10 ) - parseInt( val2, 10 ) ) < 5 ? true : false ;
+                       };
+
+               /* 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( parseInt( handle.css("left") ), handle_left( widget, slider ), "Handle Location: Default" );
+
+               /* Check APIs */
+               widget.val( random_move( widget.attr("min" ), widget.attr("max" ) ) );
+               widget.trigger("change" );
+               equal( parseInt( handle.css("left") ), handle_left( widget, slider ), "Handle Location: Moved" );
+               if ( widget.jqmData('popup') == true ) {
+                       popup = slider.find(".ui-slider-handle-press" );
+                       ok( popup, "Popup present" );
+                       equal( checkEquality( popup.css("left" ), handle_left( widget, handle ) ) , true, "popup value check Enabled" );
+               }
+
+               /*jqm data*/
+               if ( options && options.leftText ) {
+                       equal( widget.jqmData('text-left'), options.leftText, "jqmData left text" );
+               }
+               if ( options && options.rightText ) {
+                       equal( widget.jqmData('text-right'), options.rightText, "jqmData right text" );
+               }
+               if ( options && options.icon ) {
+                       equal( widget.jqmData('icon'), options.icon, "jqmData icon" );
+               }
+
+       };
+
+       test( "normal slider", function ( ) {
+               $('#sliderpage1').page( ) ;
+               unit_slider( $("#slider0" ) );
+       } );
+
+       test( "icon slider", function ( ) {
+               $('#sliderpage2').page( ) ;
+               unit_slider( $("#slider1" ) );
+       } );
+
+} );
diff --git a/tests/additional-unit-tests/swipe/index.html b/tests/additional-unit-tests/swipe/index.html
new file mode 100755 (executable)
index 0000000..922eca1
--- /dev/null
@@ -0,0 +1,92 @@
+<!DOCTYPE html>
+<html lang="en">
+<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.2.0/external/qunit.css" />
+
+       <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+       <script src="swipe-tests.js"></script>
+
+       <title>Swipe</title>
+</head>
+<body>
+
+<h1 id="qunit-header">Swipe Tests</h1>
+<h2 id="qunit-banner"></h2>
+<h2 id="qunit-userAgent"></h2>
+<ol id="qunit-tests">
+</ol>
+
+<div id="qunit-fixture" style="top:0px;left:0px;">
+       <div data-role="page" id="swipelistpage">
+                       <ul data-role="listview">
+                               <li id="swipewidget" data-role="swipe">
+                                       <div data-role="swipe-item">
+                                               <div data-role="button" data-inline="true">Twitter</div>
+                                               <div data-role="button" data-inline="true">Twitter</div>
+                                               <div data-role="button" data-inline="true">Facebook</div>
+                                               <div data-role="button" data-inline="true">Facebook</div>
+                                       </div>
+                                       <div data-role="swipe-item-cover">
+                                               Swipe2
+                                       </div>
+                               </li>
+                               <li data-role="swipe" id="swipewidget2">
+                                       <div data-role="swipe-item">
+                                               <div data-role="button" data-inline="true">Twitter</div>
+                                               <div data-role="button" data-inline="true">Twitter</div>
+                                               <div data-role="button" data-inline="true">Facebook</div>
+                                               <div data-role="button" data-inline="true">Facebook</div>
+                                       </div>
+                                       <div data-role="swipe-item-cover">
+                                               Swipe1
+                                       </div>
+                               </li>
+                       </ul>
+       </div>
+       <div data-role="page" id="swipedestorypage">
+                       <ul data-role="listview" >
+                               <li id="swipedestroy" data-role="swipe">
+                                       <div data-role="swipe-item">
+                                               <div data-role="button" data-inline="true">Twitter</div>
+                                               <div data-role="button" data-inline="true">Twitter</div>
+                                               <div data-role="button" data-inline="true">Facebook</div>
+                                               <div data-role="button" data-inline="true">Facebook</div>
+                                       </div>
+                                       <div data-role="swipe-item-cover">
+                                               <div style="display: inline-block;" class="ui-li-text-sub-left">subtext</div>
+                                               <div style="display: inline-block;" class="ui-li-text-main-right">2line-leftsub2</div>
+                                       </div>
+                               </li>
+                               <li data-role="swipe">
+                                       <div data-role="swipe-item">
+                                               <div data-role="button" data-inline="true">Twitter</div>
+                                               <div data-role="button" data-inline="true">Twitter</div>
+                                               <div data-role="button" data-inline="true">Facebook</div>
+                                               <div data-role="button" data-inline="true">Facebook</div>
+                                       </div>
+                                       <div data-role="swipe-item-cover">
+                                               <div style="display: inline-block;" class="ui-li-text-sub-left">subtext</div>
+                                               <div style="display: inline-block;" class="ui-li-text-main-right">1line-leftsub1</div>
+                                       </div>
+                               </li>
+                       </ul>
+       </div>
+       
+       <div data-role="page" id="swipedynamicpage">
+                       <ul data-role="listview" id='swipedynamiclist'>                         
+                               
+                       </ul>
+       </div>
+</div>
+
+
+</body>
+</html>
diff --git a/tests/additional-unit-tests/swipe/swipe-tests.js b/tests/additional-unit-tests/swipe/swipe-tests.js
new file mode 100755 (executable)
index 0000000..83f3164
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ * swipe unit tests
+ *
+ * Hyunjung Kim <hjnim.kim@samsung.com>
+ *
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok, asyncTest, expect, start, stop*/
+( function ( $ ) {
+
+       module("swipe" );
+       var unit_swipe = function ( swipe, type ) {
+               var covers,
+                       cover,
+                       coverStart,
+                       item,
+                       secondSwipe,
+                       slideLeftDone = function ( ) {
+                               ok( true, "Animation Complete - sliding left" );
+                               cover.unbind("animationend" );
+                               equal( cover.position( ).left, coverStart, "Position - Cover" );
+                               start( );
+                       },
+                       slideRightDone = function ( ) {
+                               ok( true, "Animation Complete - sliding right" );
+                               setTimeout( function ( ) {
+                                       cover.unbind("animationend" );
+                                       cover.bind("animationend", slideLeftDone );
+                                       item.trigger("swipeleft" );
+                               }, 0 );
+                       };
+
+               if ( type == 'swipe') {
+                       $("#swipepage" ).page( );
+               } else if ( type == 'swipedynamic') {
+                       $("#swipedynamicpage" ).page( );
+               }
+
+               swipe.swipe( );
+               ok( swipe.hasClass("ui-swipe" ), "Create - Swipe" );
+
+               covers = swipe.find("div.ui-swipe-item-cover" );
+               cover = covers.first( );
+
+               coverStart = cover.position( ).left;
+               item = swipe.find("div.ui-swipe-item" ).first( );
+
+               /*API : open , close*/
+               cover.unbind("animationend" );
+               swipe.swipe('open');
+               equal( swipe.swipe('opened'), true, "API : open" );
+
+               swipe.swipe('close');
+               equal( swipe.swipe('opened'), false, "API : close" );
+
+               cover.bind("animationend", slideRightDone );
+               cover.trigger("swiperight" );
+               stop( );
+
+               equal( swipe.find("div.ui-swipe-item" ).length , 1, "Count - Swipeable li" );
+               equal( covers.length , 1, "Count - cover" );
+
+               equal( covers.get( 0 ).innerText, "Swipe2", "Check - Cover string value" );
+
+               /*Check other swipe items are closed*/
+               secondSwipe = swipe.next( );
+               secondSwipe.swipe( ) ;
+               if ( secondSwipe ) {
+                       secondSwipe.swipe('open');
+                       swipe.swipe('open');
+                       equal( secondSwipe.swipe('opened'), false, "When one open other swipe elements close." );
+               }
+       },
+
+               unit_swipe_destroy = function ( swipe, type ) {
+                       var covers,
+                               new_page = $("#swipedestorypage" );
+
+                       new_page.page( );
+                       swipe.swipe( );
+                       ok( swipe.hasClass("ui-swipe" ), "Create - Swipe" );
+                       covers = swipe.find("div.ui-swipe-item-cover" );
+                       equal( swipe.find("div.ui-swipe-item" ).length , 1, "Count - Swipeable ui-swipe-item" );
+
+                       equal( covers.length , 1, "Count - cover" );
+
+                       swipe.swipe("destroy" );
+                       equal( swipe.has('.ui-swipe').length, 0, "Destroy - swipe" );
+                       equal( swipe.has('.ui-swipe-item').length, 0 , "Destroy - item" );
+                       equal( swipe.has('.ui-swipe-item-cover').length, 0, "Destroy - cover" );
+
+               };
+
+       asyncTest( " swipe", function ( ) {
+               expect( 10 );
+               unit_swipe( $("#swipewidget" ), "swipe" );
+               start( );
+       } );
+
+
+       asyncTest( " swipe - destory", function ( ) {
+               expect( 6 ) ;
+               unit_swipe_destroy( $("#swipedestroy" ), "swipedestroy" ) ;
+               start( ) ;
+       } );
+
+       asyncTest( " swipe - dynamic", function ( ) {
+               expect( 10 );
+               var listContentHTML = '<li id= "swipewidgetdynamic" data-role= "swipe">' +
+                                                                                       '<div data-role= "swipe-item">' +
+                                                                                               '<div data-role= "button" data-inline= "true">Twitter</div>' +
+                                                                                               '<div data-role= "button" data-inline= "true">Twitter</div>' +
+                                                                                               '<div data-role= "button" data-inline= "true">Facebook</div>' +
+                                                                                               '<div data-role= "button" data-inline= "true">Facebook</div>' +
+                                                                                       '</div>' +
+                                                                                       '<div data-role= "swipe-item-cover">' +
+                                                                                               'Swipe2' +
+                                                                                       '</div>' +
+                                                                               '</li>' +
+                                                                               '<li data-role= "swipe" id= "swipewidget2">' +
+                                                                                       '<div data-role= "swipe-item">' +
+                                                                                               '<div data-role= "button" data-inline= "true">Twitter</div>' +
+                                                                                               '<div data-role= "button" data-inline= "true">Twitter</div>' +
+                                                                                               '<div data-role= "button" data-inline= "true">Facebook</div>' +
+                                                                                               '<div data-role= "button" data-inline= "true">Facebook</div>' +
+                                                                                       '</div>' +
+                                                                                       '<div data-role= "swipe-item-cover">' +
+                                                                                               'Swipe1' +
+                                                                                       '</div>' +
+                                                                               '</li>';
+               $("#swipedynamiclist" ).append( listContentHTML ).trigger("create" ) ;
+               unit_swipe( $("#swipewidgetdynamic" ), "swipedynamic" );
+               start( ) ;
+       } );
+
+} ( jQuery ) ) ;
diff --git a/tests/additional-unit-tests/tabbar/index.html b/tests/additional-unit-tests/tabbar/index.html
new file mode 100755 (executable)
index 0000000..5b89fc6
--- /dev/null
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html lang="en">
+<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.2.0/external/qunit.css" />
+
+       <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+
+  <script src="tabbar-tests.js"></script>
+</head>
+<body>
+
+<h1 id="qunit-header">Tabbar</h1>
+<h2 id="qunit-banner"></h2>
+<h2 id="qunit-userAgent"></h2>
+<ol id="qunit-tests">
+</ol>
+</div>
+
+<div data-nstest-role="page">
+       <div data-nstest-role="header" data-nstest-position="inline" id='tabbarheader'>
+               <h1>Tabbar Test - markup</h1>
+               <div id="tabbar-test-text-only-header" data-role="tabbar">
+                       <ul>
+                               <li><a href="#" data-icon='delete'>Menu</a></li>
+                               <li><a href="#" class="ui-btn-active" data-icon='forward'>Save</a></li>
+                               <li><a href="#" data-icon='plus'>Share</a></li>
+                               <li><a href="#" data-icon='back'>Timeline</a></li>
+                               <li><a href="#" data-icon='search'>WorldClock</a></li>
+                       </ul>
+               </div>
+       </div>
+       <div data-nstest-role="content">
+       </div>
+       <div data-nstest-role="footer" id='tabbarfooter'>
+               <div id="tabbar-test-text-only" data-role="tabbar">
+                       <ul>
+                               <li><a href="#" data-icon='delete'>Menu</a></li>
+                               <li><a href="#" class="ui-btn-active" data-icon='forward'>Save</a></li>
+                               <li><a href="#" data-icon='plus'>Share</a></li>
+                               <li><a href="#" data-icon='back'>Timeline</a></li>
+                               <li><a href="#" data-icon='search'>WorldClock</a></li>
+                       </ul>
+               </div>
+       </div>
+</div>
+</body>
+</html>
diff --git a/tests/additional-unit-tests/tabbar/tabbar-tests.js b/tests/additional-unit-tests/tabbar/tabbar-tests.js
new file mode 100755 (executable)
index 0000000..a377f6a
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * tabbar unit tests
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+( function ( $ ) {
+       $.mobile.defaultTransition = "none";
+
+       module( "Tabbar" );
+
+       var unit_tabbar = function ( widget, drayStyle ) {
+               var tabbar,
+                       tabbar_style,
+                       item_count,
+                       activeIndex,
+                       deactiveReturn,
+                       activeReturn,
+                       ww,
+                       wh,
+                       index,
+                       isLandscape,
+                       created_tabbar = widget.tabbar( );
+
+               /* Create */
+               ok( created_tabbar, "Create" );
+               equal( widget.find( "a" ).length, drayStyle.icon.length, "Markup check icons" ) ;
+               if ( drayStyle ) {
+                       if ( drayStyle.icon ) {
+                               for ( index = 0; index < drayStyle.icon.length; index++ ) {
+                                       equal( widget.find( "a" )[index].getAttribute("data-icon" ), drayStyle.icon[index], "Icon check" );
+                                       equal( widget.find( "a span.ui-btn-text" )[index].innerHTML, drayStyle.text[index], "Text check" );
+                               }
+                       }
+               }
+
+               /*Markup check*/
+               ww = window.innerWidth || $( window ).width( ) ;
+               wh = window.innerHeight || $( window ).height( );
+               isLandscape = ww > wh && ( ww - wh );
+
+               if ( isLandscape ) {
+                       equal( widget.hasClass( "ui-landscape-tabbar" ), true, "Markup check layout" );
+               } else {
+                       equal( widget.hasClass( "ui-portrait-tabbar" ), true, "Markup check layout" );
+               }
+
+
+               /* Check APIs */
+               activeIndex = created_tabbar.find(".ui-btn-active" ).index( );
+               created_tabbar.tabbar( "disable", activeIndex );
+               deactiveReturn = created_tabbar.find("li:eq(" + activeIndex + " )" ).is(".ui-disabled" );
+
+               equal( deactiveReturn, true, "List Deactive test" );
+
+               created_tabbar.tabbar("enable", activeIndex );
+               activeReturn = created_tabbar.find("li:eq(" + activeIndex + " )" ).is(".ui-disabled" );
+               equal( activeReturn, false, "List Active test" );
+       };
+
+       test( "tabbar text style test - footer", function ( ) {
+               unit_tabbar( $("#tabbar-test-text-only" ), {icon : ['delete', 'forward', 'plus', 'back', 'search'], text : ["Menu", "Save", "Share", "Timeline", "WorldClock"]} );
+       } );
+
+       test( "tabbar text style test - header", function ( ) {
+               unit_tabbar( $("#tabbar-test-text-only-header" ), {icon : ['delete', 'forward', 'plus', 'back', 'search'], text : ["Menu", "Save", "Share", "Timeline", "WorldClock"]} );
+       } );
+
+       test( "tabbar text style test - footer - Dynamic", function ( ) {
+
+               $('#abbar-test-text-only').remove( );
+               var VirtualMarkup = '<div id= "tabbar-test-text-only" data-role= "tabbar">' +
+                                                                                       '<ul>' +
+                                                                                               '<li><a href= "#" data-icon= "delete">Menu</a></li>' +
+                                                                                               '<li><a href= "#" class= "ui-btn-active" data-icon= "forward">Save</a></li>' +
+                                                                                               '<li><a href= "#" data-icon= "plus">Share</a></li>' +
+                                                                                               '<li><a href= "#" data-icon= "Back">Timeline</a></li>' +
+                                                                                               '<li><a href= "#" data-icon= "search"WorldClock</a></li>' +
+                                                                                       '</ul>' +
+                                                                               '</div>';
+               $('#tabbarfooter').append( VirtualMarkup ).trigger("create" );
+               unit_tabbar( $("#tabbar-test-text-only" ), {icon : ['delete', 'forward', 'plus', 'back', 'search'], text : ["Menu", "Save", "Share", "Timeline", "WorldClock"]} );
+       } );
+
+       test( "tabbar text style test- header - Dynamic", function ( ) {
+
+               $('#abbar-test-text-only-header').remove( );
+               var VirtualMarkup = '<div id= "tabbar-test-text-only-header" data-role= "tabbar">' +
+                                                                                       '<ul>' +
+                                                                                               '<li><a href= "#" data-icon= "delete">Menu</a></li>' +
+                                                                                               '<li><a href= "#" class= "ui-btn-active" data-icon= "forward">Save</a></li>' +
+                                                                                               '<li><a href= "#" data-icon= "plus">Share</a></li>' +
+                                                                                               '<li><a href= "#" data-icon= "Back">Timeline</a></li>' +
+                                                                                               '<li><a href= "#" data-icon= "search"WorldClock</a></li>' +
+                                                                                       '</ul>' +
+                                                                               '</div>';
+               $('#tabbarheader').append( VirtualMarkup ).trigger("create" );
+               unit_tabbar( $("#tabbar-test-text-only-header" ), {icon : ['delete', 'forward', 'plus', 'back', 'search'], text : ["Menu", "Save", "Share", "Timeline", "WorldClock"]} );
+       } );
+} ( jQuery ) );
diff --git a/tests/additional-unit-tests/tests.js b/tests/additional-unit-tests/tests.js
new file mode 100755 (executable)
index 0000000..8a77085
--- /dev/null
@@ -0,0 +1,31 @@
+var TESTS = {
+       "testPages":
+       [
+               "autodivider",
+               "button",
+               "check",
+               "collapsible",
+               "datetimepicker",
+               "fastscroll",
+               "gallery",
+               "handler",
+               "headerfooter",
+               "list",
+               "listdividers",
+               /*"multimediaview",*/
+               "navigationbar",
+               "notification",
+               "popup",
+               "progressbar",
+               "radio",
+               "searchbar",
+               "segmentcontrol",
+               "slider",
+               "swipe",
+               "tabbar",
+               "toggleswitch",
+               "tokentextarea",
+               "virtuallist",
+               "virtualgrid",
+       ]
+};
\ No newline at end of file
diff --git a/tests/additional-unit-tests/toggleswitch/index.html b/tests/additional-unit-tests/toggleswitch/index.html
new file mode 100755 (executable)
index 0000000..8cf810a
--- /dev/null
@@ -0,0 +1,52 @@
+<!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.2.0/external/qunit.css" />
+
+       <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+       <script src="toggleswitch-tests.js"></script>
+
+       <title>Toggleswitch</title>
+</head>
+
+<body>
+
+<h1 id="qunit-header">Toggleswitch</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="toggleswitch1">
+               <div data-role="header" data-position="fixed">
+                       <h1>Toggleswitch</h1>
+               </div>
+               <div data-role="content">
+                       <select data-role='slider' name='slider' id='newslider' >
+                               <option value='on'>On</option>
+                               <option value='off'>Off</option>
+                       </select>
+               </div>
+       </div>
+       
+       <div data-role="page" id="toggleswitch2">
+               <div data-role="header" data-position="fixed">
+                       <h1>Toggleswitch</h1>
+               </div>
+               <div data-role="content">               
+                       
+               </div>
+       </div>  
+</div>
+
+</body>
+</html>
diff --git a/tests/additional-unit-tests/toggleswitch/toggleswitch-tests.js b/tests/additional-unit-tests/toggleswitch/toggleswitch-tests.js
new file mode 100755 (executable)
index 0000000..a01f414
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * Unit Test : Toggle Switch
+ *
+ *
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+$( document ).ready( function ( ) {
+       module("toggleswitch" );
+
+       var unit_toggleswitch = function ( widget ) {
+               var toggleswitch ;
+
+               /* Create */
+               widget.slider( );
+               toggleswitch = widget.parent( ).find('.ui-slider-switch') ;
+               ok( toggleswitch, "Create" );
+
+               /* Class Check*/
+               equal( toggleswitch.hasClass('ui-slider'), true , "Class check" );
+
+               /*Markup check*/
+               equal( toggleswitch.find('span.ui-slider-label').length, 2 , "makrup check : 2 options present" );
+               equal( toggleswitch.find('span.ui-slider-label')[1].innerHTML, "On" , "makrup check : correct text in option" );
+               equal( toggleswitch.find('span.ui-slider-label')[0].innerHTML , "Off" , "makrup check : correct text in option" );
+               ok( toggleswitch.find('a.ui-slider-handle') , "makrup check : toggle handle present" );
+               equal( toggleswitch.find('a.ui-slider-handle').attr('title'), 'On', "makrup check : handle present" );
+               equal( toggleswitch.find('span.ui-slider-label')[1].style.width, '100%', "makrup check : 2 options present" );
+
+               /*check control after firing events*/
+               toggleswitch.trigger('vmousedown') ;
+               toggleswitch.trigger('vmouseup') ;
+               equal( toggleswitch.find('a.ui-slider-handle').attr('title'), 'Off', "Markup check after firing click event first time" );
+               equal( toggleswitch.find('span.ui-slider-label')[0].style.width, '100%', "Markup check after firing click event first time" );
+               equal( toggleswitch.find('span.ui-slider-label')[1].style.width, '0%', "Markup check after firing click event first time" );
+               toggleswitch.trigger('vmousedown') ;
+               toggleswitch.trigger('vmouseup') ;
+               equal( toggleswitch.find('a.ui-slider-handle').attr('title'), 'On', "Markup check after firing click event second time" );
+               equal( toggleswitch.find('span.ui-slider-label')[0].style.width, '0%', "Markup check after firing click event second time" );
+               equal( toggleswitch.find('span.ui-slider-label')[1].style.width, '100%', "Markup check after firing click event second time" );
+
+               /* Check Enable , Disbale */
+               widget.slider("disable" );
+               toggleswitch.trigger('vmousedown') ;
+               toggleswitch.trigger('vmouseup') ;
+               equal( toggleswitch.find('a.ui-slider-handle').attr('title'), 'On', "Markup check after firing click event after switch was disabled" );
+               equal( toggleswitch.find('span.ui-slider-label')[1].style.width, '100%', "Markup check after firing click event after switch was disabled" );
+               equal( toggleswitch.find('span.ui-slider-label')[0].style.width, '0%', "Markup check after firing click event after switch was disabled" );
+
+               widget.slider("enable" );
+               toggleswitch.trigger('vmousedown') ;
+               toggleswitch.trigger('vmouseup') ;
+               equal( toggleswitch.find('a.ui-slider-handle').attr('title'), 'Off', "Markup check after firing click event after switch was re enabled" );
+               equal( toggleswitch.find('span.ui-slider-label')[0].style.width, '100%', "Markup check after firing click event after switch was re enabled" );
+               equal( toggleswitch.find('span.ui-slider-label')[1].style.width, '0%', "Markup check after firing click event after switch was re enabled" );
+
+               /*refresh */
+               widget.find('option')[1].innerHTML = "False" ;
+               equal( toggleswitch.find('a.ui-slider-handle').attr('title'), 'Off', "API Refresh : Stoggleswitch is not modified before refresh is called" );
+               widget.slider('refresh') ;
+               equal( toggleswitch.find('a.ui-slider-handle').attr('title'), 'False', "API Refresh : Stoggleswitch is modified after refresh is called" );
+
+       };
+
+       test( "normal toggleswitch", function ( ) {
+               $('#toggleswitch1').page( ) ;
+               unit_toggleswitch( $("#newslider" ) );
+       } );
+
+       test( "normal toggleswitch -dynamic", function ( ) {
+               var createEvent = false ,
+                       toggleHTML = "<select data-role='slider'name='slider'id='dynamicslider'data-texton='true'>" +
+                                                                               "<option value='on'>On</option>" +
+                                                                               "<option value='off'>Off</option>" +
+                                                                       "</select>;";
+
+               $('#toggleswitch2').page( ) ;
+               $('#toggleswitch2').find(":jqmData(role=content)" ).append( toggleHTML );
+               $('#dynamicslider').slider( {create : function ( ) {
+                       createEvent = true ;
+               }} ) ;
+               $('#toggleswitch2').find(":jqmData(role=content)" ).trigger("create" );
+               equal( createEvent, true, "Create Event" );
+               unit_toggleswitch( $("#dynamicslider" ) );
+       } );
+} );
diff --git a/tests/additional-unit-tests/tokentextarea/index.html b/tests/additional-unit-tests/tokentextarea/index.html
new file mode 100755 (executable)
index 0000000..76d3f26
--- /dev/null
@@ -0,0 +1,51 @@
+<!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.2.0/external/qunit.css" />
+
+       <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+       <script src="tokentextarea-tests.js"></script>
+
+       <title>Tokentextarea</title>
+</head>
+
+<body>
+
+<h1 id="qunit-header">Tokentextarea</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="notifiaction0">
+               <div data-role="notification" id="smallpopup" data-type="popup" data-text1="text1" data-param="param"></div>
+               <div data-role="header" data-position="fixed">
+                       <h1>Tokentextarea</h1>
+               </div>
+               <div data-role="content">
+               </div>
+       </div>
+
+       <div data-role="page" id="notification1">
+               <div data-role="tokentextarea" id="tokentextarea-test"  data-label='To:' data-description='description123' data-link='#address'></div>          
+               <div data-role="header" data-position="fixed">
+                       <h1>Tokentextarea</h1>
+               </div>
+               <div data-role="content">
+               </div>
+       </div>
+
+</div>
+
+</body>
+</html>
diff --git a/tests/additional-unit-tests/tokentextarea/tokentextarea-tests.js b/tests/additional-unit-tests/tokentextarea/tokentextarea-tests.js
new file mode 100755 (executable)
index 0000000..6ab53a8
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * Unit Test : tokentextarea
+ *
+ * Kangsik Kim <kangsik81.kim@samsung.com>
+ * Minkyeong Kim <minkyeong.kim@samsung.com>
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok*/
+( function ( $ ) {
+       module( "Tokentextarea" );
+
+       var unit_tokentextarea = function ( widget, type, options ) {
+               var tokentextarea,
+                       inputText,
+                       outputText,
+                       status,
+                       selectEvent = false ,
+                       addEvent = false,
+                       removeEvent = false;
+
+               /* Create */
+               tokentextarea = widget.tokentextarea( );
+               ok( tokentextarea.length > 0, "Create" );
+
+               /*markup*/
+               equal( widget.jqmData('label'), options.lable, 'Property : data-label') ;
+               equal( widget.find('label.ui-tokentextarea-label').html( ), options.lable, 'Property : data-label') ;
+               equal( widget.jqmData('description'), options.description, 'Property : data-description') ;
+               equal( widget.jqmData('link'), options.link, 'Property : data-link') ;
+               equal( widget.find( "input" ).hasClass('ui-tokentextarea-input'), true, "Markup Check" );
+               equal( widget.find( "label" ).hasClass('ui-tokentextarea-label'), true, "Markup Check" );
+               equal( widget.find( "a" ).hasClass('ui-tokentextarea-link-base'), true, "Markup Check" );
+               equal( widget.find( "a" ).attr('href'), '#address', "Markup Check" );
+
+               /*bind events*/
+               tokentextarea.bind('select', function ( ) {
+                       selectEvent = true ;
+               } ) ;
+               tokentextarea.bind('add', function ( ) {
+                       addEvent = true ;
+               } ) ;
+               tokentextarea.bind('remove', function ( ) {
+                       removeEvent = true ;
+               } ) ;
+
+               /* length */
+               equal( tokentextarea.tokentextarea( "length" ), 0, "API : length" );
+
+               /* Add */
+               tokentextarea.tokentextarea( "add", "string1" );
+               //equal( addEvent, true, "Event : add" ) ;
+               equal( tokentextarea.tokentextarea( "length" ), 1, "API : add('string1')" );
+               tokentextarea.tokentextarea( "add", "string2" );
+               equal( tokentextarea.tokentextarea( "length" ), 2, "API : add('string2')" );
+               tokentextarea.tokentextarea( "add", "string3" );
+               equal( tokentextarea.tokentextarea( "length" ), 3, "API : add('string3')" );
+               equal( widget.find(".ui-tokentextarea-block" ).length, 3, 'API : count number of elements after add') ;
+
+
+               /* Select */
+               tokentextarea.tokentextarea( "select", 1 );
+               //equal( selectEvent, true, "Event : select" ) ;
+               outputText = tokentextarea.tokentextarea( "select" );
+               equal( outputText, "string2", "API : select( 1 )" );
+
+               /* Focus Out */
+               tokentextarea.tokentextarea( "focusOut" );
+               status = tokentextarea.hasClass( "ui-tokentextarea-focusout" );
+               equal( status, true, "API : focusOut" );
+
+               /* Focus In */
+               tokentextarea.tokentextarea( "focusIn" );
+               status = tokentextarea.hasClass( "ui-tokentextarea-focusin" );
+               equal( status, true, "API : focusIn" );
+
+               /* Remove */
+               tokentextarea.tokentextarea( "remove", 0 );
+               //equal( removeEvent, true, "Event : remove" ) ;
+               equal( tokentextarea.tokentextarea( "length" ), 2 , "API : remove( 0 )" );
+               equal( widget.find(".ui-tokentextarea-block" ).length, 2, 'API : API : remove( 0 )') ;
+
+               /* Reamove all */
+               tokentextarea.tokentextarea( "remove" );
+               equal( tokentextarea.tokentextarea( "length" ), 0, "API : remove" );
+               equal( widget.find(".ui-tokentextarea-block" ).length, 0, 'API : API : remove all') ;
+
+               /* input */
+               inputText = "tokentextarea";
+               tokentextarea.tokentextarea( "inputText", inputText );
+               outputText = tokentextarea.tokentextarea( "inputText" );
+               equal( outputText, inputText, "API : input('" + outputText + "')" );
+       };
+
+       test( "Tokentextarea", function ( ) {
+               unit_tokentextarea( $( "#tokentextarea-test" ), "tokentextarea", { lable : 'To:', description : "description123", link : '#address' } );
+       } );
+
+} ( jQuery ) );
diff --git a/tests/additional-unit-tests/virtualgrid/index.html b/tests/additional-unit-tests/virtualgrid/index.html
new file mode 100755 (executable)
index 0000000..03fada0
--- /dev/null
@@ -0,0 +1,52 @@
+<!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.2.0/external/qunit.css" />
+               <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+               <script src="virtualgrid-tests.js"></script>
+               <title>Virtualgrid</title>
+       </head>
+
+       <body>
+               <h1 id="qunit-header">Virtualgrid</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="virtualgrid_demo_page" class="virtualgrid_demo_page">
+                               <div data-role="header" data-position="fixed">
+                                       <h1>Virtualgrid</h1>
+                               </div>
+                               <div data-role="content">
+                                       <script id="tizen-demo-namecard" type="text/x-jquery-tmpl">
+                                               <div class="ui-demo-namecard">
+                                                       <div class="ui-demo-namecard-pic">
+                                                       </div>
+                                                       <div class="ui-demo-namecard-contents">
+                                                               <span class="name ui-li-text-main">${NAME}</span>
+                                                       </div>
+                                               </div>
+                                       </script>
+                                       <div id="virtualgrid-test" data-direction="y" data-role="virtualgrid" data-rotation="true" data-template="tizen-demo-namecard" data-dbtable="JSON_DATA" style="width: 500px;height:600px;"></div>
+                                       <script>
+                                               $( ".virtualgrid_demo_page" ).live( "pagecreate", function() {
+                                                       console.log("pagecreate...");
+                                                       $.getScript( "../../../demos/tizen-winsets/widgets/grid/js/virtualgrid-db-demo.js", function( data, textStatus ) {
+                                                               $(document).trigger("dataloaded");
+                                                       });
+                                               });
+                                       </script>
+                               </div>
+                       </div>
+               </div>
+       </body>
+</html>
diff --git a/tests/additional-unit-tests/virtualgrid/virtualgrid-tests.js b/tests/additional-unit-tests/virtualgrid/virtualgrid-tests.js
new file mode 100755 (executable)
index 0000000..f86e583
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Unit Test : virtual grid
+ *
+ * Kangsik Kim <kangsik81.kim@samsung.com>
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok, JSON_DATA, notEqual*/
+( function ( $ ) {
+       module("Virtualgrid" );
+
+       var unit_virtualgrid = function ( widget, type ) {
+               var virtualGrid,
+                       idx,
+                       index = 0,
+                       $items,
+                       $item;
+
+               /* Create */
+               virtualGrid = widget.virtualgrid( "create" , {
+                       itemData : function ( idx ) {
+                               return JSON_DATA[ idx ];
+                       },
+                       numItemData : JSON_DATA.length,
+                       cacheItemData : function ( minIdx, maxIdx ) { }
+               } );
+               ok( virtualGrid, "Create" );
+
+               $(".virtualgrid_demo_page" ).bind("select", function ( event ) {
+                       ok( true, "Event : select" );
+               } );
+
+               $(".virtualgrid_demo_page" ).bind("test.resize", function ( event ) {
+                       var prevColCnt = 0 ;
+                       $item = $(".ui-virtualgrid-wrapblock-y:first" );
+                       prevColCnt = $item.children( ).length;
+                       $("#virtualgrid-test" ).css("width", "1500px" );
+                       widget.virtualgrid("resize" );
+                       $item = $(".ui-virtualgrid-wrapblock-y:first" );
+                       notEqual( $item.children( ).length, prevColCnt, "Event : resize" );
+               } );
+
+               $( $(".virtualgrid_demo_page" ).find(".ui-scrollview-view" ) ).find(".ui-virtualgrid-wrapblock-y:first" ).addClass("center" );
+               widget.virtualgrid("centerTo", "center" );
+               $items = $( $(".virtualgrid_demo_page" ).find(".ui-scrollview-view" ) ).find(".ui-virtualgrid-wrapblock-y" );
+               for ( idx = 0 ; idx < $items.length ; idx += 1 ) {
+                       if ( $( $items[idx] ).hasClass("center" ) ) {
+                               index = idx;
+                               break;
+                       }
+               }
+
+               notEqual( index, 0, "API : centerTo" );
+
+               $item = $( $(".ui-virtualgrid-wrapblock-y:first" ).children( )[0] );
+               $item.trigger("click" );
+               $item.trigger("test.resize" );
+
+               /*jqmData*/
+               equal( widget.jqmData('direction'), 'y', "jqmData : direction" ) ;
+               equal( widget.jqmData('rotation'), true, "jqmData : rotation" ) ;
+               equal( widget.jqmData('template'), 'tizen-demo-namecard', "jqmData : template" ) ;
+               equal( widget.jqmData('dbtable'), 'JSON_DATA', "jqmData : dbtable" ) ;
+
+       };
+
+       $( document ).bind("dataloaded" , function ( ) {
+               test( "Virtualgrid", function ( ) {
+                       unit_virtualgrid( $("#virtualgrid-test" ), "virtualgrid" );
+               } );
+       } );
+} ( jQuery ) );
diff --git a/tests/additional-unit-tests/virtuallist/index.html b/tests/additional-unit-tests/virtuallist/index.html
new file mode 100755 (executable)
index 0000000..587d2c1
--- /dev/null
@@ -0,0 +1,50 @@
+<!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.2.0/external/qunit.css" />
+               <script src="../../../libs/js/jquery-mobile-1.2.0/external/qunit.js"></script>
+               <script src = "../../../demos/tizen-winsets/widgets/list/virtuallist-db-demo.js"></script>
+               <script src="virtuallist-tests.js"></script>
+               <title>Virtuallist</title>
+       </head>
+
+       <body>
+               <h1 id="qunit-header">Virtuallist</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="dummy-page">                          
+                               <div data-role="header" data-position="fixed">
+                                       <h1>Dummy</h1>
+                               </div>
+                               <div data-role="contents">
+                               </div>
+                       </div>
+                       <div data-role="page" id="virtuallist-unit-test" data-add-back-btn="true">                              
+                               <div data-role="header" data-position="fixed">
+                                       <h1>Virtual List - Normal Style 1line</h1>
+                               </div>
+                               <div data-role="content">
+                                       <script id="tmp-1line" type="text/x-jquery-tmpl">
+                                               <li class="ui-li-1line"><span class="ui-li-text-main">${NAME}</span></li>
+                                       </script>
+                                       <script id="tmp-2line" type="text/x-jquery-tmpl">
+                                               <li class="ui-li-1line"><span class="ui-li-text-main">${NAME}</span></li>
+                                       </script>                               
+                                       <ul id="virtuallist-normal_1line_ul" data-role="virtuallistview" data-template="tmp-1line" data-dbtable="JSON_DATA" data-row="100">
+                                       </ul>
+                               </div>
+                       </div>
+               </div>
+       </body>
+</html>
diff --git a/tests/additional-unit-tests/virtuallist/virtuallist-tests.js b/tests/additional-unit-tests/virtuallist/virtuallist-tests.js
new file mode 100755 (executable)
index 0000000..32c5ae9
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * Unit Test : Virtual list
+ *
+ * Wongi Lee <wongi11.lee@samsung.com>
+ */
+/*jslint browser: true*/
+/*global $, jQuery, test, equal, ok, JSON_DATA*/
+$( document ).ready( function ( ) {
+
+       module( "Virtual List" );
+
+       function startVirtualListTest( ) {
+
+               var $vlContainer = $( "ul.ui-virtual-list-container" ),
+                       $vlElements = $( "ul.ui-virtual-list-container li" ),
+                       vlHeight = $vlContainer.css( "height" ),
+                       vlOptions = $( "#virtuallist-normal_1line_ul" ).virtuallistview( "option" );
+
+               test( "Virtual list test", function ( ) {
+                       var destoyedVlElements ;
+
+                       /* Initialize and create method */
+                       $( "#virtuallist-normal_1line_ul" ).virtuallistview( );
+                       ok( $vlContainer );
+                       equal( $vlElements.length, 100 );
+                       ok( parseInt( vlHeight, 10 ) > 3000 );
+
+                       /* Options */
+                       equal( vlOptions.id, "#virtuallist-normal_1line_ul" );
+                       equal( vlOptions.childSelector, " li" );
+                       equal( vlOptions.dbtable, "JSON_DATA" );
+                       equal( vlOptions.template, "tmp-1line" );
+                       equal( vlOptions.row, 100 );
+                       equal( vlOptions.dbkey, false );
+                       equal( vlOptions.scrollview, true );
+
+
+                       /* Destroy method */
+                       ok ( ( function ( ) {
+                               /* Call destroy */
+                               $( "#virtuallist-normal_1line_ul" ).virtuallistview( "destroy" );
+
+                               destoyedVlElements = $( "ul.ui-virtual-list-container li" );
+                               console.log( destoyedVlElements.length );
+
+                               try {
+                                       equal ( destoyedVlElements.length, 0 );
+                               } catch ( exception ) {
+                                       console.log( "destroy : " + exception );
+                                       return false;
+                               }
+                               return true;
+                       } ( ) ), "destroy( )" );
+               } );
+       }
+
+       var startVirtualListTestDynamic = function ( ) {
+               /* dynamic testing */
+               $('#virtuallist-normal_1line_ul').remove( );
+               var VirtualMarkup = '<ul id= "virtuallist-normal_1line_ul" data-role= "virtuallistview" data-template= "tmp-1line" data-dbtable= "JSON_DATA" data-row= "100"></ul>';
+               $('#virtuallist-unit-test').find(":jqmData(role=content)" ).append( VirtualMarkup ).trigger("create" );
+
+               $.getScript( "../../../demos/tizen-winsets/widgets/list/virtuallist-db-demo.js", function ( data, textStatus ) {
+                       $( "ul" ).filter( function ( ) {
+                               return $( this ).data( "role" ) == "virtuallistview";
+                       } ).addClass( "vlLoadSuccess" );
+
+                       $("ul.ui-virtual-list-container" ).virtuallistview( "create", {
+                               itemData : function ( idx ) {
+                                       return JSON_DATA[ idx ];
+                               },
+                               numItemData : JSON_DATA.length,
+                               cacheItemData : function ( minIdx, maxIdx ) {
+                               }
+                       } );
+                       startVirtualListTest( );
+               } );
+
+       } ;
+
+       /* Load Dummy Data and Init Virtual List widget*/
+       if ( window.JSON_DATA ) {
+               $( "ul" ).filter( function ( ) {
+                       return $( this ).data( "role" ) == "virtuallistview";
+               } ).addClass( "vlLoadSuccess" );
+
+               // trigger pagecreate
+               $( "#virtuallist-unit-test" ).page( );
+
+               $( "ul.ui-virtual-list-container" ).virtuallistview( "create" );
+
+               startVirtualListTest( );
+
+               startVirtualListTestDynamic( ) ;
+
+
+       } else {
+               console.log ( "Virtual List Init Fail." );
+       }
+} );