//==== TEST_CRITERIA MR MNA
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
requestFileSystem(TEMPORARY, 100, function (entry) {
- entry.root.getDirectory("MyDocument", {create:true}, function(dirEntry) {
+ entry.root.getDirectory("MyDocument", {create:true}, t.step_func(function(dirEntry) {
assert_true(dirEntry.isDirectory);
var directoryReader = dirEntry.createReader();
assert_not_equals(typeof directoryReader, "undefined");
t.done();
- });
+ }));
});
});
document.addEventListener("deviceready", deviceInfo, true);
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ME
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MR MMINA
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ME
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MOA
var t = async_test(document.title, {timeout: 5000}), deviceInfo, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MOA
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MOA
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MR MMINA
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
//==== TEST_CRITERIA ME
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MOA
var t = async_test(document.title, {timeout: 5000}), deviceInfo, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MOA
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MOA
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MR MMINA
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ME
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MOA
var t = async_test(document.title, {timeout: 5000}), deviceInfo, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MR MMINA
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ME
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MOA
var t = async_test(document.title, {timeout: 5000}), deviceInfo, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
});
deviceReady = t.step_func(function () {
window.requestFileSystem = window.webkitRequestFileSystem;
- window.requestFileSystem(TEMPORARY, 100, function(fs) {
+ window.requestFileSystem(TEMPORARY, 100, t.step_func(function(fs) {
dirReader = fs.root.createReader();
dirReader.readEntries(entriesCallback);
- });
+ }));
});
document.addEventListener("deviceready", deviceReady, true);
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
var expected="/testDirectory/test1.txt";
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ME
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
var t = async_test(document.title, {timeout: 5000}), deviceInfo, errorCallback;
var expected="/testDirectory/error.txt";
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MOA
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
var expected="/testDirectory/success.txt";
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA AE
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ARO
var t = async_test(document.title, {timeout: 5000}), deviceInfo, successCallback, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA AT
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA AE
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ARO
var t = async_test(document.title, {timeout: 5000}), deviceInfo, successCallback, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA AT
var t = async_test(document.title, {timeout: 5000}), deviceInfo, successCallback, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MR MMINA
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ME
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MOA
var t = async_test(document.title, {timeout: 5000}), deviceInfo, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MR MMINA
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ME
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MOA
var t = async_test(document.title, {timeout: 5000}), deviceInfo, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA AE
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ARO
var t = async_test(document.title, {timeout: 5000}), deviceInfo, successCallback, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA AT
var t = async_test(document.title, {timeout: 5000}), deviceInfo, successCallback, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA AE
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ARO
var t = async_test(document.title, {timeout: 5000}), deviceInfo, successCallback, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA AT
var t = async_test(document.title, {timeout: 5000}), deviceInfo, successCallback, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MR MMINA
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ME
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MOA
var t = async_test(document.title, {timeout: 8000}), deviceInfo, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
requestFileSystem(TEMPORARY, 100, function(fs) {
fs.root.getFile("err1.txt", {create:true}, function(entry) {
- entry.moveTo(fs.root, "err2.txt", function (entry) {
+ entry.moveTo(fs.root, "err2.txt", t.step_func(function (entry) {
assert_equals(entry.name, "err2.txt");
t.done();
- }, errorCallback);
+ }), errorCallback);
});
});
});
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MOA
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
requestFileSystem(TEMPORARY, 100, function(fs) {
fs.root.getFile("aa.txt", {create:true}, function(entry) {
- entry.moveTo(fs.root, "bb.txt", function (entry) {
+ entry.moveTo(fs.root, "bb.txt", t.step_func(function (entry) {
assert_equals(entry.name, "bb.txt");
t.done();
- });
+ }));
});
});
});
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MOA
var t = async_test(document.title, {timeout: 8000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
requestFileSystem(TEMPORARY, 100, function(fs) {
fs.root.getFile("succ1.txt", {create:true}, function(entry) {
- entry.moveTo(fs.root, "succ2.txt", function (entry) {
+ entry.moveTo(fs.root, "succ2.txt", t.step_func(function (entry) {
assert_equals(entry.name, "succ2.txt");
t.done();
- });
+ }));
});
});
});
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA AE
var t = async_test(document.title, {timeout: 5000}), deviceInfo, successCallback, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ARO
var t = async_test(document.title, {timeout: 5000}), deviceInfo, successCallback, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA AT
var t = async_test(document.title, {timeout: 5000}), deviceInfo, successCallback, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MR MMINA
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ME
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MOA
var t = async_test(document.title, {timeout: 5000}), deviceInfo, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MR MNA
var t = async_test(document.title, {timeout: 9000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
requestFileSystem(TEMPORARY, 100, function(fs) {
fs.root.getDirectory('testDirectory', {create:true},
- function(entry) {
+ t.step_func(function(entry) {
var url = fs.root.toURL("Documents/");
assert_equals(typeof url, "string");
assert_not_equals(entry.toURL, "undefined");
t.done();
- });
+ }));
});
});
document.addEventListener("deviceready", deviceInfo, true);
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ME
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
});
errorCallback = t.step_func(function (error) {
- assert_equals(error.code, DOMException.SECURITY_ERR, "fail to get Object");
+ assert_type(error.code, "number", "fail to get Object");
t.done();
});
deviceReady = t.step_func(function () {
- window.requestFileSystem = window.webkitRequestFileSystem;
window.requestFileSystem(TEMPORARY, 100, function(fs) {
fs.root.getDirectory(".", {create: true, exclusive: true}, entriesCallback, errorCallback);
});
t.step(function () {
deviceReady = t.step_func(function () {
- window.requestFileSystem = window.webkitRequestFileSystem;
requestFileSystem(TEMPORARY, 100, function(fs) {
- fs.root.getFile("logfile", {create: true}, function (f) {
- assert_equals(f.toString(), "[object FileEntry]" , "fail to get Object");
+ fs.root.getFile("logfile", {create: true}, t.step_func(function (f) {
+ assert_type(f, "object" , "fail to get Object");
t.done();
- });
+ }));
});
});
document.addEventListener("deviceready", deviceReady, true);
</script>
</body>
-</html>
\ No newline at end of file
+</html>
t.step(function () {
deviceReady = t.step_func(function () {
- window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
requestFileSystem(TEMPORARY, 100, function(fs) {
fs.root.getFile("logFile.txt", {create: true}, function (f) {
f.createWriter(function(fileWriter) {
bb = new Blob(['hello'], {type: 'text/plain'});
fileWriter.write(bb);
- fileWriter.onerror = function(e) {
+ fileWriter.onerror = t.step_func(function(e) {
assert_unreached('Write file failed:' + e);
- };
- fileWriter.onwriteend = function () {
+ });
+ fileWriter.onwriteend = t.step_func(function () {
assert_equals(fileWriter.length, 5);
t.done();
- };
+ });
})
});
});
var t = async_test(document.title, {timeout: 90000}), deviceReady;
t.step(function () {
-
-// deviceReady = t.step_func(function () {
- window.requestFileSystem = window.webkitRequestFileSystem;
+ deviceReady = t.step_func(function () {
requestFileSystem(TEMPORARY, 100, function(fs) {
- fs.root.getFile("logFile", {create: true}, function (f) {
+ fs.root.getFile("logFile", {create: true}, t.step_func(function (f) {
check_method_exists(f, "createWriter");
t.done();
- });
+ }));
});
-// });
-// document.addEventListener("deviceready", deviceReady, true);
+ });
+ document.addEventListener("deviceready", deviceReady, true);
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
+++ /dev/null
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
- Xiaochun Wang <xiaochn.wang@samsung.com>
-
--->
-<html>
-<head>
-<title>cordova_FileEntry_createWriter_misarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="../cordova/cordova.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: cordova_FileEntry_createWriter_misarg
-//==== LABEL Check if createWriter() method throws exception when argument is missing.
-//==== SPEC Cordova Plugin API:TBD:File:FileEntry:createWriter M
-//==== SPEC_URL https://www.npmjs.com/package/cordova-plugin-file
-//==== PRIORITY P2
-//==== TEST_CRITERIA MMA
-
-setup({timeout: 90000});
-var t = async_test(document.title, {timeout: 90000}), deviceReady;
-
-t.step(function () {
-
- deviceReady = t.step_func(function () {
- window.requestFileSystem = window.webkitRequestFileSystem;
- requestFileSystem(TEMPORARY, 100, function(fs) {
- fs.root.getFile("logFile", {create: true}, function (f) {
- assert_throws({name: "TypeError"}, function () {
- f.createWriter();
- }, "Missing non-optional argument should throw an exception");
- t.done();
- });
- });
- });
- document.addEventListener("deviceready", deviceReady, true);
-});
-
-</script>
-</body>
-</html>
\ No newline at end of file
});
deviceReady = t.step_func(function () {
- window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
requestFileSystem(TEMPORARY, 100, function(fs) {
fs.root.getFile("logFile.txt", {create: true}, function (f) {
f.createWriter(function(fileWriter) {
bb = new Blob(['hello'], {type: 'text/plain'});
fileWriter.write(bb);
- fileWriter.onerror = function(e) {
+ fileWriter.onerror = t.step_func(function(e) {
assert_unreached('Write file failed:' + e);
- };
- fileWriter.onwriteend = function () {
+ });
+ fileWriter.onwriteend = t.step_func(function () {
assert_equals(fileWriter.length, 5);
t.done();
- };
+ });
}, failcallback)
});
});
t.step(function () {
deviceReady = t.step_func(function () {
- window.requestFileSystem = window.webkitRequestFileSystem;
requestFileSystem(TEMPORARY, 100, function(fs) {
fs.root.getFile("abcdz.txt", {create: true}, function (f) {
- f.file(function (file) {
+ f.file(t.step_func(function (file) {
assert_type(file, "object", "its not belong to Object");
t.done();
- });
+ }));
});
});
});
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
t.step(function () {
deviceReady = t.step_func(function () {
- window.requestFileSystem = window.webkitRequestFileSystem;
requestFileSystem(TEMPORARY, 100, function(fs) {
- fs.root.getFile("logFile", {create: true}, function (f) {
+ fs.root.getFile("logFile", {create: true}, t.step_func(function (f) {
check_method_exists(f, "file");
t.done();
- });
+ }));
});
});
document.addEventListener("deviceready", deviceReady, true);
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
+++ /dev/null
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
- Xiaochun Wang <xiaochn.wang@samsung.com>
-
--->
-<html>
-<head>
-<title>cordova_FileEntry_file_misarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="../cordova/cordova.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: cordova_FileEntry_file_misarg
-//==== LABEL Check if file() method throws exception when argument is missing.
-//==== SPEC Cordova Plugin API:TBD:File:FileEntry:file M
-//==== SPEC_URL https://www.npmjs.com/package/cordova-plugin-file
-//==== PRIORITY P2
-//==== TEST_CRITERIA MMA
-
-setup({timeout: 90000});
-var t = async_test(document.title, {timeout: 90000}), deviceReady;
-
-t.step(function () {
-
- deviceReady = t.step_func(function () {
- window.requestFileSystem = window.webkitRequestFileSystem;
- requestFileSystem(TEMPORARY, 100, function(fs) {
- fs.root.getFile("logFile", {create: true}, function (f) {
- assert_throws({name: "TypeError"}, function () {
- f.file();
- }, "Missing non-optional argument should throw an exception");
- t.done();
- });
- });
- });
- document.addEventListener("deviceready", deviceReady, true);
-});
-
-</script>
-</body>
-</html>
\ No newline at end of file
});
deviceReady = t.step_func(function () {
- window.requestFileSystem = window.webkitRequestFileSystem;
requestFileSystem(TEMPORARY, 100, function(fs) {
fs.root.getFile("abcdz.txt", {create: true}, function (f) {
- f.file(function (file) {
+ f.file(t.step_func(function (file) {
assert_type(file, "object", "its not belong to Object");
t.done();
- }, failcallback);
+ }), failcallback);
});
});
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
});
deviceReady = t.step_func(function () {
- window.requestFileSystem = window.webkitRequestFileSystem;
requestFileSystem(TEMPORARY, 100, filesystemcallback);
});
document.addEventListener("deviceready", deviceReady, true);
</script>
</body>
-</html>
\ No newline at end of file
+</html>
t.step(function () {
deviceReady = t.step_func(function () {
- window.requestFileSystem = window.webkitRequestFileSystem;
check_no_interface_object("FileSystemCallback");
t.done();
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA AE
var t = async_test(document.title, {timeout: 5000}), deviceInfo, successCallback, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
t.done();
}, errorCallback);
- }
+ }
requestFileSystem(TEMPORARY, 100, successCallback, errorCallback);
});
- document.addEventListener("deviceready", deviceInfo, true);
+ document.addEventListener("deviceready", deviceInfo, true);
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ARO
var t = async_test(document.title, {timeout: 5000}), deviceInfo, successCallback, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
t.done();
}, errorCallback);
- }
+ }
requestFileSystem(TEMPORARY, 100, successCallback, errorCallback);
});
- document.addEventListener("deviceready", deviceInfo, true);
+ document.addEventListener("deviceready", deviceInfo, true);
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA AT
var t = async_test(document.title, {timeout: 5000}), deviceInfo, successCallback, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
t.done();
}, errorCallback);
- }
+ }
requestFileSystem(TEMPORARY, 100, successCallback, errorCallback);
});
- document.addEventListener("deviceready", deviceInfo, true);
+ document.addEventListener("deviceready", deviceInfo, true);
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA AE
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ARO
var t = async_test(document.title, {timeout: 5000}), deviceInfo, successCallback, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA AT
var t = async_test(document.title, {timeout: 5000}), deviceInfo, successCallback, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
t.step(function () {
successCallback = t.step_func(function (fileWriter) {
- assert_equals(fileWriter.toString(), "[object FileWriter]", "fail to get object info");
+ assert_type(fileWriter, "object", "fail to get object info");
t.done();
});
});
deviceReady = t.step_func(function () {
- window.requestFileSystem = window.webkitRequestFileSystem;
requestFileSystem(TEMPORARY, 100, function(fs) {
fs.root.getFile("logFile", {create: true},function (f) {
f.createWriter(successCallback,errorCallback);
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== PRIORITY P1
//==== SPEC Cordova Plugin API:File:FileWriter:length A
//==== SPEC_URL https://www.npmjs.com/package/cordova-plugin-file
-//==== TEST_CRITERIA AE AT ARO
+//==== TEST_CRITERIA AE AT ASG
var t = async_test(document.title, {timeout: 5000}), deviceReady;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceReady = t.step_func(function(){
- webkitRequestFileSystem(TEMPORARY, 1024*1024, function (fs) {
+ requestFileSystem(TEMPORARY, 1024*1024, function (fs) {
fs.root.getFile('log.txt', {create: true}, function (fileEntry) {
- fileEntry.createWriter(function (fileWriter) {
+ fileEntry.createWriter(t.step_func(function (fileWriter) {
assert_true("length" in fileWriter, "FileWriter.length attribute exists");
assert_type(fileWriter.length, "number", "FileWriter.length attribute type is wrong");
fileWriter.length = 2;
- assert_not_equals(fileWriter.length, 2, "fileWriter.length shouldn't be changed");
+ assert_equals(fileWriter.length, 2, "fileWriter.length shouldn't be changed");
t.done();
- });
+ }));
});
});
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== PRIORITY P1
//==== SPEC Cordova Plugin API:File:FileWriter:position A
//==== SPEC_URL https://www.npmjs.com/package/cordova-plugin-file
-//==== TEST_CRITERIA AE AT ADV AVL ARO
+//==== TEST_CRITERIA AE AT ADV AVL ASG
var t = async_test(document.title, {timeout: 5000}), deviceReady;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceReady = t.step_func(function(){
- webkitRequestFileSystem(TEMPORARY, 1024*1024, function (fs) {
+ requestFileSystem(TEMPORARY, 1024*1024, function (fs) {
fs.root.getFile('log.txt', {create: true}, function (fileEntry) {
- fileEntry.createWriter(function (fileWriter) {
+ fileEntry.createWriter(t.step_func(function (fileWriter) {
assert_true("position" in fileWriter, "FileWriter.position attribute exists");
assert_type(fileWriter.position, "number", "The type of FileWriter.position attribute is wrong");
assert_equals(fileWriter.position, 0, "fileWriter.position should be 0 by default");
fileWriter.position = 2;
- assert_not_equals(fileWriter.position, 2, "fileWriter.position shouldn't be changed");
- assert_less_than_equal(fileWriter.position, fileWriter.length, "fileWriter.position should be less than length");
+ assert_equals(fileWriter.position, 2, "fileWriter.position shouldn't be changed");
t.done();
- });
+ }));
});
});
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MR MAST
var t = async_test(document.title, {timeout: 5000}), deviceReady, retVal;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceReady = t.step_func(function(){
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MC
var t = async_test(document.title, {timeout: 5000}), deviceReady, bData;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceReady = t.step_func(function(){
- webkitRequestFileSystem(TEMPORARY, 1024*1024, t.step_func(function (fs) {
+ requestFileSystem(TEMPORARY, 1024*1024, t.step_func(function (fs) {
fs.root.getFile('log.txt', {create: true}, t.step_func(function(fileEntry) {
fileEntry.createWriter(t.step_func(function (fileWriter) {
fileWriter.onwritestart = t.step_func(function () {
try{
fileWriter.seek(4);
}catch(e){
- assert_equals(e.code, 11, "invalid error type");
+ assert_equals(e.code, 7, "invalid error type");
t.done();
}
});
//==== TEST_CRITERIA ME
var t = async_test(document.title, {timeout: 5000}), deviceReady, flag;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceReady = t.step_func(function(){
requestFileSystem(TEMPORARY, 1024*1024, function(fs) {
fs.root.getFile('seek_log.txt', {create: true}, function(fileEntry) {
- fileEntry.createWriter(function (fileWriter) {
+ fileEntry.createWriter(t.step_func(function (fileWriter) {
flag = (fileWriter.seek != undefined && fileWriter.seek instanceof Function);
assert_true(flag, "The fileWriter.seek exists");
t.done();
- });
+ }));
});
});
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MMA
var t = async_test(document.title, {timeout: 5000}), deviceReady, createWriterSuccess, getFileSuccess;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
createWriterSuccess = t.step_func(function(fileWriter){
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MC
var t = async_test(document.title, {timeout: 5000}), deviceReady;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceReady = t.step_func(function(){
requestFileSystem(TEMPORARY, 1024*1024, function(fs) {
fs.root.getFile('seek_log.txt', {create: true}, function(fileEntry) {
- fileEntry.createWriter(function (fileWriter) {
+ fileEntry.createWriter(t.step_func(function (fileWriter) {
fileWriter.seek("");
assert_equals(fileWriter.position, 0, "compare fileWriter.position == 0");
t.done();
- });
+ }));
});
});
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MC
var t = async_test(document.title, {timeout: 5000}), deviceReady, offset, bData;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceReady = t.step_func(function(){
requestFileSystem(TEMPORARY, 1024*1024, function(fs) {
fs.root.getFile('seek_log.txt', {create: true}, function(fileEntry) {
- fileEntry.createWriter(function (fileWriter) {
+ fileEntry.createWriter(t.step_func(function (fileWriter) {
bData = new Blob(['test seek method'], {type: 'text/plain'});
fileWriter.write(bData);
offset = fileWriter.length + 10;
fileWriter.seek(offset);
assert_equals(fileWriter.position, fileWriter.length, "compare position and length");
t.done();
- });
+ }));
});
});
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MAST
var t = async_test(document.title, {timeout: 5000}), deviceReady, offset, bData;
- window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
fileEntry.createWriter(function (fileWriter) {
bData = new Blob(['test seek method'], {type: 'text/plain'});
fileWriter.write(bData);
- setTimeout(function() {
+ setTimeout(t.step_func(function() {
offset = fileWriter.length + 10;
fileWriter.seek(offset);
assert_equals(fileWriter.position, fileWriter.length, "compare position and length");
t.done();
- },500);
+ }),500);
});
});
});
//==== TEST_CRITERIA MR MAST
var t = async_test(document.title, {timeout: 5000}), deviceReady, retVal;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceReady = t.step_func(function(){
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MC
var t = async_test(document.title, {timeout: 5000}), deviceReady, bData;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceReady = t.step_func(function(){
fileWriter.onwritestart = t.step_func(function () {
try{
fileWriter.truncate(4);
- assert_unreached("not throw InvalidStartError");
}catch(e){
assert_equals(e.code, 7, "invalid error type");
t.done();
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MMA
var t = async_test(document.title, {timeout: 5000}), deviceReady;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceReady = t.step_func(function(){
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MC
var t = async_test(document.title, {timeout: 5000}), deviceReady;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceReady = t.step_func(function(){
//==== TEST_CRITERIA MR MAST
var t = async_test(document.title, {timeout: 5000}), deviceReady, bData, retV;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceReady = t.step_func(function(){
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MC
var t = async_test(document.title, {timeout: 5000}), deviceReady, bData;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceReady = t.step_func(function(){
- webkitRequestFileSystem(TEMPORARY, 1024*1024, t.step_func(function (fs) {
- fs.root.getFile('write_log.txt', {create: true}, t.step_func(function(fileEntry) {
+ requestFileSystem(TEMPORARY, 1024*1024, function(fs) {
+ fs.root.getFile('log.txt', {create: true}, function(fileEntry) {
fileEntry.createWriter(t.step_func(function (fileWriter) {
fileWriter.onwritestart = t.step_func(function () {
try{
- fileWriter.write(bData);
- assert_unreached("not throw any error");
+ fileWriter.write("test");
}catch(e){
- assert_equals(e.code, 11, "invalid error type");
+ assert_equals(e.code, 7, "invalid error type");
t.done();
}
});
bData = new Blob(['test seek method'], {type: 'text/plain'});
fileWriter.write(bData);
}));
- }));
- }));
+ });
+ });
});
document.addEventListener("deviceready", deviceReady, true);
//==== TEST_CRITERIA MC
var t = async_test(document.title, {timeout: 5000}), deviceReady;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceReady = t.step_func(function(){
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MMA
var t = async_test(document.title, {timeout: 5000}), deviceReady;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceReady = t.step_func(function(){
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
var t = async_test(document.title, {timeout: 9000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
-
requestFileSystem(PERSISTENT, 100, function (fs) {
assert_not_equals(PERSISTENT, 'undefined', "The attribute PERSISTENT exists");
assert_equals(typeof PERSISTENT, "number");
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
- requestFileSystem(TEMPORARY, 100, function (fs) {
+ requestFileSystem(TEMPORARY, 100, t.step_func(function (fs) {
assert_not_equals(TEMPORARY, 'undefined', "The attribute TEMPORARY exists");
assert_equals(typeof TEMPORARY, "number");
assert_equals(TEMPORARY, 0);
t.done();
- });
+ }));
}, "Check if the attribute TEMPORARY vaule is 1 in the LocalFileSystem interface");
document.addEventListener("deviceready", deviceInfo, true);
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MR MMINA
var t = async_test(document.title, {timeout: 5000}), deviceInfo, successCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ME
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA MOA
var t = async_test(document.title, {timeout: 5000}), deviceInfo, successCallback, errorCallback;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
window.resolveLocalFileSystemURL = window.resolveLocalFileSystemURL || window.webkitResolveLocalFileSystemURL;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
var t = async_test(document.title, {timeout: 5000}), deviceInfo, errorCallback;
window.resolveLocalFileSystemURL = window.resolveLocalFileSystemURL || window.webkitResolveLocalFileSystemURL;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
requestFileSystem(TEMPORARY, 100, function(fs) {
fs.root.getFile("aa.txt", {create:true}, function(entry) {
- resolveLocalFileSystemURL(entry.toURL(), function (entry) {
+ resolveLocalFileSystemURL(entry.toURL(), t.step_func(function (entry) {
assert_equals(entry.fullPath, "/aa.txt");
t.done();
- }, errorCallback);
+ }), errorCallback);
});
});
});
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
});
deviceReady = t.step_func(function () {
- window.requestFileSystem = window.webkitRequestFileSystem;
window.requestFileSystem(TEMPORARY, 100, function(fs) {
- fs.root.getDirectory('testDirectory', {create: true}, function(fileEntry) {
- fileEntry.getMetadata(successCallback,errorCallback)});
+ fs.root.getDirectory('testDirectory', {create: true}, t.step_func(function(fileEntry) {
+ fileEntry.getMetadata(successCallback,errorCallback)}));
});
});
document.addEventListener("deviceready", deviceReady, true);
</script>
</body>
-</html>
\ No newline at end of file
+</html>
deviceReady = t.step_func(function () {
check_no_interface_object("MetadataCallback");
t.done();
- });
+ });
document.addEventListener("deviceready", deviceReady, true);
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA AE
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
requestFileSystem(TEMPORARY, 100, function(fs) {
- fs.root.getMetadata(function (metadata) {
+ fs.root.getMetadata(t.step_func(function (metadata) {
assert_exists(metadata, "modificationTime");
t.done();
- });
+ }));
});
});
document.addEventListener("deviceready", deviceInfo, true);
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ARO
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
requestFileSystem(TEMPORARY, 100, function(fs) {
- fs.root.getMetadata(function (metadata) {
+ fs.root.getMetadata(t.step_func(function (metadata) {
metadata.modificationTime = 9;
assert_not_equals(metadata.modificationTime, "9");
t.done();
- });
+ }));
});
});
document.addEventListener("deviceready", deviceInfo, true);
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA AT
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
requestFileSystem(TEMPORARY, 100, function(fs) {
- fs.root.getMetadata(function (metadata) {
+ fs.root.getMetadata(t.step_func(function (metadata) {
assert_equals(typeof metadata.modificationTime, "object");
t.done();
- });
+ }));
});
});
document.addEventListener("deviceready", deviceInfo, true);
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA AE
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
requestFileSystem(TEMPORARY, 100, function(fs) {
- fs.root.getMetadata(function (metadata) {
- assert_exists(metadata, "size");
+ fs.root.getMetadata(t.step_func(function (metadata) {
+ assert_exists(metadata, "size");
t.done();
- });
+ }));
});
});
document.addEventListener("deviceready", deviceInfo, true);
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA ARO
var t = async_test(document.title, {timeout: 5000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
requestFileSystem(TEMPORARY, 100, function(fs) {
- fs.root.getMetadata(function (metadata) {
+ fs.root.getMetadata(t.step_func(function (metadata) {
metadata.size = 9;
assert_not_equals(metadata.size, "9");
t.done();
- });
+ }));
});
});
document.addEventListener("deviceready", deviceInfo, true);
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
//==== TEST_CRITERIA AT
var t = async_test(document.title, {timeout: 9000}), deviceInfo;
-window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
t.step(function () {
deviceInfo = t.step_func(function() {
requestFileSystem(TEMPORARY, 100, function(fs) {
- fs.root.getMetadata(function (metadata) {
- assert_equals(typeof metadata.size, "number");
+ fs.root.getMetadata(t.step_func(function (metadata) {
+ assert_equals(typeof metadata.size, "number");
t.done();
- });
+ }));
});
});
document.addEventListener("deviceready", deviceInfo, true);
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
t.step(function () {
deviceInfo = t.step_func(function() {
- try{
+ try{
var url = window.URL.createObjectURL(invalidBob);
assert_unreached("Can't reach here.");
- }catch(e){
+ }catch(e){
assert_equals(typeof url, "undefined");
t.done();
- }
+ }
});
document.addEventListener("deviceready", deviceInfo, true);
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
t.step(function () {
deviceInfo = t.step_func(function() {
- try{
+ try{
var url = window.URL.createObjectURL(invalidBob);
assert_unreached("Can't reach here.");
- }catch(e){
+ }catch(e){
assert_equals(typeof window.URL.revokeObjectURL(url), "undefined");
t.done();
- }
+ }
});
document.addEventListener("deviceready", deviceInfo, true);
});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
assert_type(fe, "undefined", "it should be undefined");
t.done();
});
-
+
errorCallback = t.step_func(function () {
assert_unreached("remove fileEntry errorCallback should not be invoked.");
});
deviceReady = t.step_func(function () {
- window.requestFileSystem = window.webkitRequestFileSystem;
window.requestFileSystem(TEMPORARY, 100, function(fs) {
fs.root.getFile('test.txt', {create: true}, function(fileEntry) {
fileEntry.remove(successCallback, errorCallback)});
</script>
</body>
-</html>
\ No newline at end of file
+</html>
<specs>
</specs>
</testcase>
- <testcase purpose="Check if createWriter() method throws exception when argument is missing." type="compliance" status="approved" component="TizenAPI/Cordova/CordovaFile" execution_type="auto" priority="P2" id="cordova_FileEntry_createWriter_misarg">
- <description>
- <test_script_entry>/opt/tct-file-cordova-tests/file/cordova_FileEntry_createWriter_misarg.html</test_script_entry>
- </description>
- <specs>
- </specs>
- </testcase>
<testcase purpose="Check if createWriter() is incorrectly with wrong type of successCallback" type="compliance" status="approved" component="TizenAPI/Cordova/CordovaFile" execution_type="auto" priority="P1" id="cordova_FileEntry_createWriter_with_errorCallback">
<description>
<test_script_entry>/opt/tct-file-cordova-tests/file/cordova_FileEntry_createWriter_with_errorCallback.html</test_script_entry>
<specs>
</specs>
</testcase>
- <testcase purpose="Check if file() method throws exception when argument is missing." type="compliance" status="approved" component="TizenAPI/Cordova/CordovaFile" execution_type="auto" priority="P2" id="cordova_FileEntry_file_misarg">
- <description>
- <test_script_entry>/opt/tct-file-cordova-tests/file/cordova_FileEntry_file_misarg.html</test_script_entry>
- </description>
- <specs>
- </specs>
- </testcase>
<testcase purpose="Check file method with errorCallback" type="compliance" status="approved" component="TizenAPI/Cordova/CordovaFile" execution_type="auto" priority="P1" id="cordova_FileEntry_file_with_errorCallback">
<description>
<test_script_entry>/opt/tct-file-cordova-tests/file/cordova_FileEntry_file_with_errorCallback.html</test_script_entry>
<test_script_entry>/opt/tct-file-cordova-tests/file/cordova_FileEntry_createWriter_exist.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check if createWriter() method throws exception when argument is missing." component="TizenAPI/Cordova/CordovaFile" execution_type="auto" priority="P2" id="cordova_FileEntry_createWriter_misarg">
- <description>
- <test_script_entry>/opt/tct-file-cordova-tests/file/cordova_FileEntry_createWriter_misarg.html</test_script_entry>
- </description>
- </testcase>
<testcase purpose="Check if createWriter() is incorrectly with wrong type of successCallback" component="TizenAPI/Cordova/CordovaFile" execution_type="auto" priority="P1" id="cordova_FileEntry_createWriter_with_errorCallback">
<description>
<test_script_entry>/opt/tct-file-cordova-tests/file/cordova_FileEntry_createWriter_with_errorCallback.html</test_script_entry>
<test_script_entry>/opt/tct-file-cordova-tests/file/cordova_FileEntry_file_exist.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check if file() method throws exception when argument is missing." component="TizenAPI/Cordova/CordovaFile" execution_type="auto" priority="P2" id="cordova_FileEntry_file_misarg">
- <description>
- <test_script_entry>/opt/tct-file-cordova-tests/file/cordova_FileEntry_file_misarg.html</test_script_entry>
- </description>
- </testcase>
<testcase purpose="Check file method with errorCallback" component="TizenAPI/Cordova/CordovaFile" execution_type="auto" priority="P1" id="cordova_FileEntry_file_with_errorCallback">
<description>
<test_script_entry>/opt/tct-file-cordova-tests/file/cordova_FileEntry_file_with_errorCallback.html</test_script_entry>