[security] update tests
authorTomasz Paciorek <t.paciorek@samsung.com>
Thu, 10 Oct 2013 13:02:23 +0000 (15:02 +0200)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Thu, 10 Oct 2013 13:22:43 +0000 (13:22 +0000)
Change-Id: Ib5a34adbf3dee2e903ee894f954553b87352d67d

tct-security-tcs-tests/security/FileSystemManager_resolve_shared_data_directory.html
tct-security-tcs-tests/security/FileSystemManager_resolve_shared_data_directory_of_another_app.html
tct-security-tcs-tests/security/FileSystemManager_resolve_shared_data_directory_rw.html
tct-security-tcs-tests/security/FileSystemManager_resolve_shared_directory.html
tct-security-tcs-tests/security/FileSystemManager_resolve_shared_directory_of_another_app.html
tct-security-tcs-tests/security/FileSystemManager_resolve_shared_directory_rw.html
tct-security-tcs-tests/security/FileSystemManager_resolve_shared_res_directory.html
tct-security-tcs-tests/security/FileSystemManager_resolve_shared_res_directory_of_another_app.html
tct-security-tcs-tests/security/FileSystemManager_resolve_shared_res_directory_rw.html
tct-security-tcs-tests/security/FileSystemManager_resolve_wgt_package_of_another_app.html
tct-security-tcs-tests/security/File_deleteFile_copyFile_shared_data_directory.html

index 570c57cbe7621f170d59530f05da249b01d2a4d2..7a64c1c71a4c49fdab036e62887772db746e0a31 100644 (file)
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <!--
 Copyright (c) 2013 Samsung Electronics Co., Ltd.
 
@@ -36,9 +36,9 @@ Authors:
 //==== SPEC_URL: http://source.tizen.org/compliance/compliance-specification
 
 var resolveSuccess, resolveError, expected,
-    t = async_test("FileSystemManager_resolve_shared_data_directory");
+    t = async_test(document.title);
 
-t.step(function(){
+t.step(function () {
     resolveSuccess = t.step_func(function (dir) {
         assert_equals(dir.toURI(), expected, "resolve shared directory to a file handle");
         t.done();
index ec18530dd346b236f0d0be93b7e9ec1804c0145f..b6b69455ddbe8c3b4d2998e2bd78555cf03c7eaf 100644 (file)
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <!--
 Copyright (c) 2013 Samsung Electronics Co., Ltd.
 
@@ -36,9 +36,9 @@ Authors:
 //==== SPEC_URL: http://source.tizen.org/compliance/compliance-specification
 
 var resolveSuccess, resolveError, expected,
-    t = async_test("FileSystemManager_resolve_shared_data_directory_of_another_app");
+    t = async_test(document.title);
 
-t.step(function(){
+t.step(function () {
     resolveSuccess = t.step_func(function (dir) {
         assert_equals(dir.toURI(), expected, "resolve shared directory to a file handle");
         t.done();
index 540a65b0d969aa7e15f1f78429e748eb5e89f647..af620132d5ccac7a69525e62f5cd48e65f3e8d53 100644 (file)
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <!--
 Copyright (c) 2013 Samsung Electronics Co., Ltd.
 
@@ -36,9 +36,9 @@ Authors:
 //==== SPEC_URL: http://source.tizen.org/compliance/compliance-specification
 
 var resolveSuccess, resolveError, expected,
-    t = async_test("FileSystemManager_resolve_shared_data_directory_rw");
+    t = async_test(document.title);
 
-t.step(function(){
+t.step(function () {
     resolveSuccess = t.step_func(function (dir) {
         assert_equals(dir.toURI(), expected, "resolve shared directory to a file handle");
         t.done();
index 23ccea9dab22dd3162ed007c59883c8aac3f1dac..6902acf5a8dddc992de0f9499f0a3c5bf3e70b2c 100644 (file)
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <!--
 Copyright (c) 2013 Samsung Electronics Co., Ltd.
 
@@ -36,9 +36,9 @@ Authors:
 //==== SPEC_URL: http://source.tizen.org/compliance/compliance-specification
 
 var resolveSuccess, resolveError, expected,
-    t = async_test("FileSystemManager_resolve_shared_directory");
+    t = async_test(document.title);
 
-t.step(function(){
+t.step(function () {
     resolveSuccess = t.step_func(function (dir) {
         assert_equals(dir.toURI(), expected, "resolve shared directory to a file handle");
         t.done();
index b2557c8af6982850bb1b2c8ff913315d48e11f22..1fc28b09fb525a2e13b2a79a753ed1b59460fecc 100644 (file)
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <!--
 Copyright (c) 2013 Samsung Electronics Co., Ltd.
 
@@ -36,9 +36,9 @@ Authors:
 //==== SPEC_URL: http://source.tizen.org/compliance/compliance-specification
 
 var resolveSuccess, resolveError, expected,
-    t = async_test("FileSystemManager_resolve_shared_directory_of_another_app");
+    t = async_test(document.title);
 
-t.step(function(){
+t.step(function () {
     resolveSuccess = t.step_func(function (dir) {
         assert_equals(dir.toURI(), expected, "resolve shared directory to a file handle");
         t.done();
index 3da8aa22578d91c095fccd5395df62dd9f552592..adb9fa2880f5b8f7efe47ae78018d2ec26ddfecc 100644 (file)
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <!--
 Copyright (c) 2013 Samsung Electronics Co., Ltd.
 
@@ -36,9 +36,9 @@ Authors:
 //==== SPEC_URL: http://source.tizen.org/compliance/compliance-specification
 
 var resolveSuccess, resolveError, expected,
-    t = async_test("FileSystemManager_resolve_shared_directory_rw");
+    t = async_test(document.title);
 
-t.step(function(){
+t.step(function () {
     resolveSuccess = t.step_func(function (dir) {
         assert_unreached("resolve() must fail");
         //assert_equals(dir.toURI(), expected, "resolve shared directory to a file handle");
index 9598d8f99b67186b6d0d8b979e97533bf0a46048..8285c82649d008b11e4b33749428510aecbbe33a 100644 (file)
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <!--
 Copyright (c) 2013 Samsung Electronics Co., Ltd.
 
@@ -36,9 +36,9 @@ Authors:
 //==== SPEC_URL: http://source.tizen.org/compliance/compliance-specification
 
 var resolveSuccess, resolveError, expected,
-    t = async_test("FileSystemManager_resolve_shared_res_directory");
+    t = async_test(document.title);
 
-t.step(function(){
+t.step(function () {
     resolveSuccess = t.step_func(function (dir) {
         assert_equals(dir.toURI(), expected, "resolve shared directory to a file handle");
         t.done();
index 3eeb848ff71828218cbf1b5928d749246f213f80..774ab8404b59ffc8ceda3cc0926dbd56db20bddd 100644 (file)
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <!--
 Copyright (c) 2013 Samsung Electronics Co., Ltd.
 
@@ -36,9 +36,9 @@ Authors:
 //==== SPEC_URL: http://source.tizen.org/compliance/compliance-specification
 
 var resolveSuccess, resolveError, expected,
-    t = async_test("FileSystemManager_resolve_shared_res_directory_of_another_app");
+    t = async_test(document.title);
 
-t.step(function(){
+t.step(function () {
     resolveSuccess = t.step_func(function (dir) {
         assert_equals(dir.toURI(), expected, "resolve shared directory to a file handle");
         t.done();
index 0ba5f63f3c8dcd426f7b6ced992899b231a59e49..970790fb8a14adb25c28f11fe9dbb1880471aa12 100644 (file)
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <!--
 Copyright (c) 2013 Samsung Electronics Co., Ltd.
 
@@ -36,9 +36,9 @@ Authors:
 //==== SPEC_URL: http://source.tizen.org/compliance/compliance-specification
 
 var resolveSuccess, resolveError, expected,
-    t = async_test("FileSystemManager_resolve_shared_res_directory_rw");
+    t = async_test(document.title);
 
-t.step(function(){
+t.step(function () {
     resolveSuccess = t.step_func(function (dir) {
         assert_unreached("resolve() must fail");
         //assert_equals(dir.toURI(), expected, "resolve shared directory to a file handle");
index 2e2060e55114858bdf4729ed0478215fc7ea2858..d079019ed3ff16e36f0b7da8cd11722fdf85b99d 100644 (file)
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <!--
 Copyright (c) 2013 Samsung Electronics Co., Ltd.
 
@@ -35,10 +35,10 @@ Authors:
 //==== SPEC: Tizen Compliance Specification Security Section M
 //==== SPEC_URL: http://source.tizen.org/compliance/compliance-specification
 
-var resolveSuccess, resolveError, anotherAppHome,
-    t = async_test("FileSystemManager_resolve_wgt_package_of_another_app");
+var resolveSuccess, resolveError, anotherAppHome, appId, appControl, replyCallback,
+    t = async_test(document.title);
 
-t.step(function(){
+t.step(function () {
     resolveSuccess = t.step_func(function (dir) {
         //assert_equals(dir.toURI(), anotherAppHome, "Resolve Success: resolving another application's wgt-package should success");
         assert_unreached("resolve() must fail");
@@ -50,16 +50,16 @@ t.step(function(){
         t.done();
     });
 
-    var appId = "ATRPHmnr6B.sharedDirTestApp";
+    appId = "ATRPHmnr6B.sharedDirTestApp";
 
-    var appControl = new tizen.ApplicationControl(
+    appControl = new tizen.ApplicationControl(
                   "http://tizen.org/appcontrol/operation/homeDir",
                   null,
                   null,
                   null);
 
-    var replyCallback = {
-        onsuccess: t.step_func( function(data) {
+    replyCallback = {
+        onsuccess: t.step_func( function (data) {
             anotherAppHome = data[0].value[0];
             try {
                 tizen.filesystem.resolve(anotherAppHome, resolveSuccess, resolveError, "r");
@@ -67,7 +67,7 @@ t.step(function(){
                 assert_unreached("resolve() throws an exception. it is supposed to call error callback: " + anotherAppHome);
             }
         })
-    }
+    };
 
     tizen.application.launchAppControl(appControl, appId, null, null, replyCallback);
 
index 69abbdbf369cbfbc6d326e8ecc6e997bb067fc62..bb9bfdd46cf044bab68dfbac69660fce9ccd2867 100644 (file)
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <!--
 Copyright (c) 2013 Samsung Electronics Co., Ltd.
 
@@ -25,8 +25,8 @@ Authors:
 <script type="text/javascript" src="support/filesystem_common.js"></script>
 </head>
 <body>
-<div id=log></div>
-<script type="text/javascript">
+<div id="log"></div>
+<script>
 //==== TEST: File_deleteFile_copyFile_shared_data_directory
 //==== LABEL check if create a new file in shared directory and copy the file and then delete the file
 //==== PRIORITY P3
@@ -37,19 +37,19 @@ Authors:
 //==== SPEC_URL http://source.tizen.org/compliance/compliance-specification
 
 
-var t = async_test("File_deleteFile_copyFile_shared_data_directory"), fsTestFileName, fsTestFile,
-    resolveSuccess, resolveError, copyToSuccess, copyToError,
+var t = async_test(document.title), fsTestFileName, fsTestFile,
+    resolveSuccess, resolveError, copyToSuccess, copyToError, date, fileName,
     deleteFileSuccess, deleteFileError, sharedDir, resolvedSharedDir;
 
 t.step(function () {
-    var date = new Date();
-    var fileName = "securityFile" + date.getDate() + date.getMinutes() + date.getSeconds() + ".txt";
+    date = new Date();
+    fileName = "securityFile" + date.getDate() + date.getMinutes() + date.getSeconds() + ".txt";
     fsTestFileName = getFileName(fileName);
-    
 
     sharedDir = tizen.application.getAppSharedURI();
-    if (sharedDir.indexOf("/", sharedDir.length - 1) == -1)
+    if (sharedDir.indexOf("/", sharedDir.length - 1) === -1) {
         sharedDir = sharedDir + "/";
+    }
     sharedDir = sharedDir + "data/";
 
     deleteFileSuccess = t.step_func(function () {