[common][account][fix assert_throws description and coding style issue] 54/213254/1
authorqunfang.lin <qunfang.lin@samsung.com>
Wed, 4 Sep 2019 01:59:36 +0000 (09:59 +0800)
committerqunfang.lin <qunfang.lin@samsung.com>
Wed, 4 Sep 2019 02:00:11 +0000 (10:00 +0800)
Change-Id: Ife6e4033b6f57c75bbfeedfa305e9aa71eb2e5f9
Signed-off-by: qunfang.lin <qunfang.lin@samsung.com>
32 files changed:
common/tct-account-tizen-tests/account/AccountChangeCallback_onadded.html
common/tct-account-tizen-tests/account/AccountChangeCallback_onremoved.html
common/tct-account-tizen-tests/account/AccountChangeCallback_onupdated.html
common/tct-account-tizen-tests/account/AccountManager_add.html
common/tct-account-tizen-tests/account/AccountManager_addAccountListener.html
common/tct-account-tizen-tests/account/AccountManager_addAccountListener_callback_TypeMismatch.html
common/tct-account-tizen-tests/account/AccountManager_addAccountListener_callback_invalid_cb.html
common/tct-account-tizen-tests/account/AccountManager_addAccountListener_misarg.html
common/tct-account-tizen-tests/account/AccountManager_add_TypeMismatch.html
common/tct-account-tizen-tests/account/AccountManager_getAccount.html
common/tct-account-tizen-tests/account/AccountManager_getAccount_without_accountId.html
common/tct-account-tizen-tests/account/AccountManager_getProvider.html
common/tct-account-tizen-tests/account/AccountManager_getProvider_without_applicationId.html
common/tct-account-tizen-tests/account/AccountManager_remove.html
common/tct-account-tizen-tests/account/AccountManager_removeAccountListener_without_accountListenerId.html
common/tct-account-tizen-tests/account/AccountManager_remove_without_accountId.html
common/tct-account-tizen-tests/account/AccountManager_update.html
common/tct-account-tizen-tests/account/AccountManager_update_TypeMismatch.html
common/tct-account-tizen-tests/account/AccountProvider_applicationId_attribute.html
common/tct-account-tizen-tests/account/AccountProvider_capabilities_attribute.html
common/tct-account-tizen-tests/account/AccountProvider_displayName_attribute.html
common/tct-account-tizen-tests/account/AccountProvider_extend.html
common/tct-account-tizen-tests/account/AccountProvider_iconUri_attribute.html
common/tct-account-tizen-tests/account/AccountProvider_isMultipleAccountSupported_attribute.html
common/tct-account-tizen-tests/account/AccountProvider_smallIconUri_attribute.html
common/tct-account-tizen-tests/account/Account_constructor.html
common/tct-account-tizen-tests/account/Account_extend.html
common/tct-account-tizen-tests/account/Account_iconUri_attribute.html
common/tct-account-tizen-tests/account/Account_id_attribute.html
common/tct-account-tizen-tests/account/Account_provider_attribute.html
common/tct-account-tizen-tests/account/Account_setExtendedData_exist.html
common/tct-account-tizen-tests/account/Account_userName_attribute.html

index 2b8f654b8f55cb15c7169a311f033831ae823476..8723cae93e98c50b4002dc28efdcb58dbbbd3c9c 100755 (executable)
@@ -49,7 +49,7 @@ t.step(function () {
             assert_own_property(accountAdded, "iconUri", "accountAdded doesn't have iconUri property");
             assert_own_property(accountAdded, "provider", "accountAdded doesn't have provider property");
             accountRemove(accountAdded.id);
-                                               tizen.account.removeAccountListener(id);
+            tizen.account.removeAccountListener(id);
             t.done();
         }),
         onremoved: t.step_func(function (accountIdRemoved) {
index b90f7ab0f8ff8def1db868bbdcc681303f577391..4067a6706ac68c44f9c0105e233b95550e81ac04 100755 (executable)
@@ -47,7 +47,7 @@ t.step(function () {
         onremoved: t.step_func(function (accountIdRemoved) {
             assert_type(accountIdRemoved, "number", "accountIdRemoved should be number type");
             tizen.account.removeAccountListener(watchId);
-                                               t.done();
+            t.done();
         }),
         onupdated: t.step_func(function (accountUpdated) {
             assert_unreached("Should be invoked to onremoved callback");
index 41020e80f709d7fd57879beaa61c1aacaaa9037f..8296223b63cbcb692ab9e57db506bbe9923373fd 100755 (executable)
@@ -56,7 +56,7 @@ t.step(function () {
             assert_own_property(accountUpdated, "iconUri", "accountUpdated doesn't have iconUri property");
             assert_own_property(accountUpdated, "provider", "accountUpdated doesn't have provider property");
             accountRemove(accountUpdated.id);
-                                               tizen.account.removeAccountListener(watchId);
+            tizen.account.removeAccountListener(watchId);
             t.done();
         })
     };
index 2e763652617fe480d9c581baa8f088b59adf1e02..7123993deec75e7de4a9b7c7c5796691241cf773 100755 (executable)
@@ -37,6 +37,7 @@ Authors:
 
 test(function () {
     var appId, provider, account1, returnedValue, account2;
+
     appId = tizen.application.getCurrentApplication().appInfo.id;
     provider = tizen.account.getProvider(appId);
     account1 = new tizen.Account(provider, {userName: "admin", iconUri: "/home/owner/share/tct-account-tizen-tests/icon.png"});
index 7c45d96e2b2b6b5d9f49763a8a50e24bcd7cfd47..8fa148cc753c528d4389ed59720a41d01c50688a 100755 (executable)
@@ -49,7 +49,7 @@ t.step(function () {
         }),
         onremoved: t.step_func(function (accountIdRemoved) {
             assert_equals(accountIdRemoved, account.id, "the id should be same");
-                                         tizen.account.removeAccountListener(watchId);
+            tizen.account.removeAccountListener(watchId);
             t.done();
         }),
         onupdated: t.step_func(function (accountUpdated) {
index c29b30e0d183fcce4a6ed0b305d4c8b97ed45702..59955a172bd6b58456baad3c3caa7c668c0a316a 100755 (executable)
@@ -36,12 +36,13 @@ Authors:
 
 test(function () {
     var conversionTable, accountChangeCallback, i;
+
     conversionTable = getTypeConversionExceptions("object", false);
     for (i = 0; i < conversionTable.length; i++) {
         accountChangeCallback = conversionTable[i][0];
         assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
             tizen.account.addAccountListener(accountChangeCallback);
-        }, TYPE_MISMATCH_EXCEPTION + " exception should be thrown - given incorrect callback argument");
+        }, "TypeMismatchError should be thrown - given incorrect callback argument");
     }
 }, document.title);
 
index 603e918307d316856aeaad23fa9a0eaa17a65310..24061a79390440214c9162cf886aec69c32a2a4d 100755 (executable)
@@ -36,12 +36,13 @@ Authors:
 
 test(function () {
     var incorrectListeners, i, accountChangeCallback;
+
     incorrectListeners = getListenerConversionExceptions(["onadded", "onremoved", "onupdated"]);
     for (i = 0; i < incorrectListeners.length; i++) {
         accountChangeCallback = incorrectListeners[i][0];
         assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
             tizen.account.addAccountListener(accountChangeCallback);
-        }, TYPE_MISMATCH_EXCEPTION + " exception should be thrown - given incorrect callback");
+        }, "TypeMismatchError should be thrown - given incorrect callback");
     }
 }, document.title);
 
index bc927297759482af3a8267527e047a5d64e479d2..311e33620eb0c53a3deca003b17114e7f760ca20 100755 (executable)
@@ -37,7 +37,7 @@ Authors:
 test(function () {
     assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
         tizen.account.addAccountListener();
-    }, TYPE_MISMATCH_EXCEPTION + " exception should be thrown - not given callback argument.");
+    }, "TypeMismatchError should be thrown - not given callback argument.");
 }, document.title);
 
 </script>
index e0831a957501a8ec1925c8148cebbdea51bb8132..9e2168d0db015bc0cc96531e63cd472f392c3912 100755 (executable)
@@ -36,11 +36,12 @@ Authors:
 
 test(function () {
     var conversionTable, i;
+
     conversionTable = getTypeConversionExceptions("object", false);
     for (i = 0; i < conversionTable.length; i++) {
         assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
             tizen.account.add(conversionTable[i][0]);
-        }, TYPE_MISMATCH_EXCEPTION + " exception should be thrown - given incorrect account object");
+        }, "TypeMismatchError should be thrown - given incorrect account object");
     }
 }, document.title);
 
index fc761ccab9f11a6ef79bd5cdba7bdd0c54340d96..23496f6734584b2fd206fbf2258b813bdede3959 100755 (executable)
@@ -37,6 +37,7 @@ Authors:
 
 test(function () {
     var appId, provider, account1, account2;
+
     appId = tizen.application.getCurrentApplication().appInfo.id;
     provider = tizen.account.getProvider(appId);
     account1 = new tizen.Account(provider, {userName: "admin", iconUri: "/home/owner/share/tct-account-tizen-tests/icon.png"});
index d58f2840857244d1ecb0d89962190eeb0f845e0f..2e20e2500f4f30da2bf34bbf27358e4914cc6d0e 100755 (executable)
@@ -36,6 +36,7 @@ Authors:
 
 test(function () {
     var returnedValue;
+
     returnedValue = tizen.account.getAccount();
     assert_equals(returnedValue, null, "the returned value should be null");
 }, document.title);
index d9911a87ac83922dca4bb69e63f2a99aa0026363..439a9c497ea52b797bcac120df49b08b2d3df3e3 100755 (executable)
@@ -36,6 +36,7 @@ Authors:
 
 test(function () {
     var appId, provider;
+
     appId = tizen.application.getCurrentApplication().appInfo.id;
     provider = tizen.account.getProvider(appId);
     assert_not_equals(provider, null, "provider should not be null");
index 93b0fb5c03d83efc52b5d0ac594009976171ffab..0724b638dcac201fad18dd891cf7edf4b4ce37eb 100755 (executable)
@@ -36,6 +36,7 @@ Authors:
 
 test(function () {
     var returnedValue;
+
     returnedValue = tizen.account.getProvider();
     assert_equals(returnedValue, null, "the returned value should be null");
 }, document.title);
index 7c67017feda6a432ddc780181621fbf10e55132c..78ccd714d7b7dc142cd4c6f3a1f5c81c7f13291f 100755 (executable)
@@ -36,6 +36,7 @@ Authors:
 
 test(function () {
     var appId, provider, account, returnedValue, accountGet;
+
     appId = tizen.application.getCurrentApplication().appInfo.id;
     provider = tizen.account.getProvider(appId);
     account = new tizen.Account(provider, {userName: "admin", iconUri: "/home/owner/share/tct-account-tizen-tests/icon.png"});
index 239248d12614d23c13010970daa34efe47498094..b35c40ec55082366ecc5db3cd7326111c7271535 100755 (executable)
@@ -37,6 +37,7 @@ Authors:
 
 test(function () {
     var returnedValue;
+
     returnedValue = tizen.account.removeAccountListener();
     assert_equals(returnedValue, undefined, "Returned value should be undefined");
 }, document.title);
index 9b08fd20c08106066c20578075c5e63eb5b6ac0f..3c65d61de1d06dd95fc4a5c355c823568a445728 100755 (executable)
@@ -36,6 +36,7 @@ Authors:
 
 test(function () {
     var returnedValue;
+
     returnedValue = tizen.account.remove();
     assert_equals(returnedValue, undefined, "Returned value should be undefined");
 }, document.title);
index 376076d0a62dd58c4b68f0e2bac9b337c473e77d..a785212a598a1929a0566f8f359c59d2ba00f95c 100755 (executable)
@@ -37,6 +37,7 @@ Authors:
 
 test(function () {
     var appId, provider, account1, returnedValue, account2;
+
     appId = tizen.application.getCurrentApplication().appInfo.id;
     provider = tizen.account.getProvider(appId);
     account1 = new tizen.Account(provider, {userName: 'admin', iconUri: 'path/to/icon.jpg'});
index 38b25c760e2371194b161516b5e633b49260b535..c6fce078907f9d3f90abe943fe62dc9d75034f3d 100755 (executable)
@@ -36,6 +36,7 @@ Authors:
 
 test(function () {
     var conversionTable, i;
+
     conversionTable = getTypeConversionExceptions("object", false);
     for (i = 0; i < conversionTable.length; i++) {
         assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
index 20f2b44246f3d2d5fc62cc11435dc0a955d79600..58fe53724ff2ea31738ffb7cdf14ebdd7c517e19 100755 (executable)
@@ -36,6 +36,7 @@ Authors:
 
 test(function () {
     var app, provider;
+
     app = tizen.application.getCurrentApplication();
     provider = tizen.account.getProvider(app.appInfo.id);
     check_readonly(provider, "applicationId", provider.applicationId, "string", "Tizen");
index 2aa05552c2965526f491811040a5a1bfc5b45c8e..42d9ea81baa3be03347470ad2bc88e9e80717f99 100755 (executable)
@@ -36,6 +36,7 @@ Authors:
 
 test(function () {
     var appId, provider;
+
     appId = tizen.application.getCurrentApplication().appInfo.id;
     provider = tizen.account.getProvider(appId);
     check_readonly(provider, "capabilities", provider.capabilities, "object", ["Tizen", "Samsung"]);
index 58453f590fbbfd58f1ff7ad7936a6b2046110146..98db76964224f458339bd5d8fa2fa2282b1f4293 100755 (executable)
@@ -36,6 +36,7 @@ Authors:
 
 test(function () {
     var appId, provider;
+
     appId = tizen.application.getCurrentApplication().appInfo.id;
     provider = tizen.account.getProvider(appId);
     check_readonly(provider, "displayName", provider.displayName, "string", "Tizen");
index 16df75d340a403252568105cf7d730270a2269df..d34becdaa289248ec7bcccf90b5e83c0fdb79ccb 100755 (executable)
@@ -36,6 +36,7 @@ Authors:
 
 test(function () {
     var appId, provider;
+
     appId = tizen.application.getCurrentApplication().appInfo.id;
     provider = tizen.account.getProvider(appId);
     check_extensibility(provider);
index 3cdc466df9cc5b540f229f4d4a605755b3ad92ed..fbd9c1ac0f1259db7b32bbb01697ed4fbfb8541a 100755 (executable)
@@ -36,6 +36,7 @@ Authors:
 
 test(function () {
     var app, provider;
+
     app = tizen.application.getCurrentApplication();
     provider = tizen.account.getProvider(app.appInfo.id);
     check_readonly(provider, "iconUri", provider.iconUri, "string", "Tizen");
index 60600ea2d366a9147976b6219e35064187c50c5d..8583c00c30c2884e7cd0c57e7991e3513d28da7d 100755 (executable)
@@ -36,6 +36,7 @@ Authors:
 
 test(function () {
     var app, provider;
+
     app = tizen.application.getCurrentApplication();
     provider = tizen.account.getProvider(app.appInfo.id);
     check_readonly(provider, "isMultipleAccountSupported", provider.isMultipleAccountSupported, "boolean", false);
index ca3b74bcb36c8e1806b60ce2d34096b52703bbff..38ad1a09994c1c479706aae9c1a55d288f04a3ff 100755 (executable)
@@ -36,6 +36,7 @@ Authors:
 
 test(function () {
     var app, provider;
+
     app = tizen.application.getCurrentApplication();
     provider = tizen.account.getProvider(app.appInfo.id);
     check_readonly(provider, "smallIconUri", provider.smallIconUri, "string", "Tizen");
index 79e83eaaea7dd5020392ae3fcf2adf612d8ccef7..21b385e324286490c21e459808b3fde371be96cd 100755 (executable)
@@ -37,6 +37,7 @@ Authors:
 
 test(function () {
     var appId, provider, account1, account2;
+
     appId = tizen.application.getCurrentApplication().appInfo.id;
     provider = tizen.account.getProvider(appId);
     account1 = new tizen.Account(provider);
index af6f7abb53a5e3e7c314915747eb53b1901217ec..bb5f081a68210107ceed56e5e2955c5a6bd91949 100755 (executable)
@@ -37,6 +37,7 @@ Authors:
 
 test(function () {
     var appId, provider, account;
+
     appId = tizen.application.getCurrentApplication().appInfo.id;
     provider = tizen.account.getProvider(appId);
     account = new tizen.Account(provider);
index a12803c8fda179473990b0f045f3c6042af224f2..abad90f23bc85379a96b57ba5d84009e2735890f 100755 (executable)
@@ -36,6 +36,7 @@ Authors:
 
 test(function () {
     var appId, provider, account;
+
     appId = tizen.application.getCurrentApplication().appInfo.id;
     provider = tizen.account.getProvider(appId);
     account = new tizen.Account(provider);
index b38e4af44c2b13044c03af799d0881f4b6fb1cde..acff872b9c093a77c08740c8af3dbd8dda35aed9 100755 (executable)
@@ -36,6 +36,7 @@ Authors:
 
 test(function () {
     var appId, provider, account;
+
     appId = tizen.application.getCurrentApplication().appInfo.id;
     provider = tizen.account.getProvider(appId);
     account = new tizen.Account(provider);
index 226e57785969bd099dc7c63fcd5c6340520f8d34..1bfbfa22478361736ab5f63e0396fc31f24bccf6 100755 (executable)
@@ -35,7 +35,8 @@ Authors:
 //==== TEST_CRITERIA AE AT ARO
 
 test(function () {
-    var appId, provider;
+    var appId, provider, account;
+
     appId = tizen.application.getCurrentApplication().appInfo.id;
     provider = tizen.account.getProvider(appId);
     account = new tizen.Account(provider);
index 9251b1eb64cf6c026931ab92e1c323fb4e30124f..ae2b98551ca776cfd343bd5c71c4ba324df5d777 100755 (executable)
@@ -36,6 +36,7 @@ Authors:
 
 test(function () {
     var appId, provider, account;
+
     appId = tizen.application.getCurrentApplication().appInfo.id;
     provider = tizen.account.getProvider(appId);
     account = new tizen.Account(provider);
index 3705f5f3a81904be20124ec12d979ceaa68bd0b2..3334ecda96b6b83ff24e768b3717330033cd31e8 100755 (executable)
@@ -36,6 +36,7 @@ Authors:
 
 test(function () {
     var appId, provider, account;
+
     appId = tizen.application.getCurrentApplication().appInfo.id;
     provider = tizen.account.getProvider(appId);
     account = new tizen.Account(provider);