var t = async_test(document.title), writeBlobNonBlockingSuccess, writeBlobNonBlockingError,
fileHandleWrite, fileHandleRead, blob, content = "Lorem ipsum dolor sit amet...",
- readBlobNonBlockingSuccess, readBlobNonBlockingError;
+ readBlobNonBlockingSuccess, readBlobNonBlockingError, arch;
t.step(function () {
- add_result_callback(function () {
- try {
- tizen.filesystem.deleteFile("documents/file");
- } catch (err) {
- }
- });
+ arch = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch");
+ if (arch !== "aarch64") {
+ add_result_callback(function () {
+ try {
+ tizen.filesystem.deleteFile("documents/file");
+ } catch (err) {
+ }
+ });
- writeBlobNonBlockingSuccess = t.step_func(function (blob) {
- });
+ writeBlobNonBlockingSuccess = t.step_func(function (blob) {
+ });
- writeBlobNonBlockingError = t.step_func(function (error) {
- assert_unreached("writeBlobNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
- });
+ writeBlobNonBlockingError = t.step_func(function (error) {
+ assert_unreached("writeBlobNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
+ });
- readBlobNonBlockingSuccess = t.step_func(function (output) {
- });
+ readBlobNonBlockingSuccess = t.step_func(function (output) {
+ });
- readBlobNonBlockingError = t.step_func(function (error) {
- assert_unreached("readBlobNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
- });
+ readBlobNonBlockingError = t.step_func(function (error) {
+ assert_unreached("readBlobNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
+ });
- blob = new Blob([content], {type: "text/plain"});
- fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
- fileHandleWrite.writeBlobNonBlocking(blob, writeBlobNonBlockingSuccess, writeBlobNonBlockingError);
- fileHandleWrite.close();
+ blob = new Blob([content], {type: "text/plain"});
+ fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
+ fileHandleWrite.writeBlobNonBlocking(blob, writeBlobNonBlockingSuccess, writeBlobNonBlockingError);
+ fileHandleWrite.close();
- fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
- assert_throws(INVALID_VALUES_EXCEPTION, function () {
- fileHandleRead.readBlobNonBlocking(readBlobNonBlockingSuccess, readBlobNonBlockingError, 0xfffffffffffffffff);
- }, "InvalidValuesError should be thrown - invalid count.");
- fileHandleRead.close();
+ fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
+ assert_throws(INVALID_VALUES_EXCEPTION, function () {
+ fileHandleRead.readBlobNonBlocking(readBlobNonBlockingSuccess, readBlobNonBlockingError, 0x7fffffffffffffff);
+ }, "InvalidValuesError should be thrown - invalid count.");
+ fileHandleRead.close();
+ }
t.done();
});
//==== TEST_CRITERIA MC
test(function () {
- var fileHandleWrite, blob, fileHandleRead, content = "Lorem ipsum dolor sit amet...";
-
- add_result_callback(function () {
- try {
- tizen.filesystem.deleteFile("documents/file");
- } catch (err) {
- }
- });
-
- blob = new Blob([content], {type: "text/plain"});
- fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
- fileHandleWrite.writeBlob(blob);
- fileHandleWrite.close();
-
- fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
- assert_throws(INVALID_VALUES_EXCEPTION, function () {
- fileHandleRead.readBlob(0xfffffffffffffffff);
- }, "InvalidValuesError should be thrown - invalid count.");
- fileHandleRead.close();
+ var arch = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch");
+ if (arch !== "aarch64") {
+ var fileHandleWrite, blob, fileHandleRead, content = "Lorem ipsum dolor sit amet...";
+
+ add_result_callback(function () {
+ try {
+ tizen.filesystem.deleteFile("documents/file");
+ } catch (err) {
+ }
+ });
+
+ blob = new Blob([content], {type: "text/plain"});
+ fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
+ fileHandleWrite.writeBlob(blob);
+ fileHandleWrite.close();
+
+ fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
+ assert_throws(INVALID_VALUES_EXCEPTION, function () {
+ fileHandleRead.readBlob(0x7fffffffffffffff);
+ }, "InvalidValuesError should be thrown - invalid count.");
+ fileHandleRead.close();
+ }
}, document.title);
</script>
//==== TEST_CRITERIA MC
var t = async_test(document.title), dataToWrite = new Uint8Array([11, 21, 31, 71, 81, 91]), writeDataNonBlockingSuccess, writeDataNonBlockingError,
- readDataNonBlockingSuccess, readDataNonBlockingError, fileHandleWrite, fileHandleRead;
+ readDataNonBlockingSuccess, readDataNonBlockingError, fileHandleWrite, fileHandleRead, arch;
t.step(function () {
- add_result_callback(function () {
- try {
- tizen.filesystem.deleteFile("documents/file");
- } catch (err) {
- }
- });
+ arch = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch");
+ if (arch !== "aarch64") {
+ add_result_callback(function () {
+ try {
+ tizen.filesystem.deleteFile("documents/file");
+ } catch (err) {
+ }
+ });
- writeDataNonBlockingSuccess = t.step_func(function (data) {
- });
+ writeDataNonBlockingSuccess = t.step_func(function (data) {
+ });
- writeDataNonBlockingError = t.step_func(function (error) {
- assert_unreached("writeDataNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
- });
+ writeDataNonBlockingError = t.step_func(function (error) {
+ assert_unreached("writeDataNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
+ });
- readDataNonBlockingSuccess = t.step_func(function (position) {
- });
+ readDataNonBlockingSuccess = t.step_func(function (position) {
+ });
- readDataNonBlockingError = t.step_func(function (error) {
- assert_unreached("readDataNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
- });
+ readDataNonBlockingError = t.step_func(function (error) {
+ assert_unreached("readDataNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
+ });
- fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
- fileHandleWrite.writeDataNonBlocking(dataToWrite, writeDataNonBlockingSuccess, writeDataNonBlockingError);
- fileHandleWrite.close();
+ fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
+ fileHandleWrite.writeDataNonBlocking(dataToWrite, writeDataNonBlockingSuccess, writeDataNonBlockingError);
+ fileHandleWrite.close();
- fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
- assert_throws(INVALID_VALUES_EXCEPTION, function () {
- fileHandleRead.readDataNonBlocking(readDataNonBlockingSuccess, readDataNonBlockingError, 0xfffffffffffffffff);
- }, "InvalidValuesError should be thrown - invalid size.");
- fileHandleRead.close();
+ fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
+ assert_throws(INVALID_VALUES_EXCEPTION, function () {
+ fileHandleRead.readDataNonBlocking(readDataNonBlockingSuccess, readDataNonBlockingError, 0x7fffffffffffffff);
+ }, "InvalidValuesError should be thrown - invalid size.");
+ fileHandleRead.close();
+ }
t.done();
});
//==== TEST_CRITERIA MC
test(function () {
- var dataToWrite = new Uint8Array([11, 21, 31, 71, 81, 91]), fileHandleWrite, fileHandleRead;
-
- add_result_callback(function () {
- try {
- fileHandleRead.close();
- tizen.filesystem.deleteFile("documents/file");
- } catch (err) {
- }
- });
-
- fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
- fileHandleWrite.writeData(dataToWrite);
- fileHandleWrite.close();
-
- fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
- assert_throws(INVALID_VALUES_EXCEPTION, function () {
- fileHandleRead.readData(0xfffffffffffffffff);
- }, "InvalidValuesError should be thrown - invalid count.");
+ var arch = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch");
+ if (arch !== "aarch64") {
+ var dataToWrite = new Uint8Array([11, 21, 31, 71, 81, 91]), fileHandleWrite, fileHandleRead;
+
+ add_result_callback(function () {
+ try {
+ fileHandleRead.close();
+ tizen.filesystem.deleteFile("documents/file");
+ } catch (err) {
+ }
+ });
+
+ fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
+ fileHandleWrite.writeData(dataToWrite);
+ fileHandleWrite.close();
+
+ fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
+ assert_throws(INVALID_VALUES_EXCEPTION, function () {
+ fileHandleRead.readData(0x7fffffffffffffff);
+ }, "InvalidValuesError should be thrown - invalid count.");
+ }
}, document.title);
</script>
//==== ONLOAD_DELAY 90
//==== TEST_CRITERIA MC
-var t = async_test(document.title), readStringNonBlockingSuccess, readStringNonBlockingError, fileHandle;
+var t = async_test(document.title), readStringNonBlockingSuccess, readStringNonBlockingError, fileHandle, arch;
t.step(function () {
- add_result_callback(function () {
- try {
- fileHandle.close();
- tizen.filesystem.deleteFile("documents/file");
- } catch (err) {
- }
- });
+ arch = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch");
+ if (arch !== "aarch64") {
+ add_result_callback(function () {
+ try {
+ fileHandle.close();
+ tizen.filesystem.deleteFile("documents/file");
+ } catch (err) {
+ }
+ });
- readStringNonBlockingSuccess = t.step_func(function (output) {
- });
+ readStringNonBlockingSuccess = t.step_func(function (output) {
+ });
- readStringNonBlockingError = t.step_func(function (error) {
- assert_unreached("readStringNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
- });
+ readStringNonBlockingError = t.step_func(function (error) {
+ assert_unreached("readStringNonBlocking() error callback invoked: name:" + error.name + "msg:" + error.message);
+ });
- fileHandle = tizen.filesystem.openFile("documents/file", "w");
- fileHandle.close();
- fileHandle = tizen.filesystem.openFile("documents/file", "r");
- assert_throws(INVALID_VALUES_EXCEPTION, function () {
- fileHandle.readStringNonBlocking(readStringNonBlockingSuccess, readStringNonBlockingError, 0xfffffffffffffffff);
- }, "InvalidValuesError should be thrown - invalid count.");
+ fileHandle = tizen.filesystem.openFile("documents/file", "w");
+ fileHandle.close();
+ fileHandle = tizen.filesystem.openFile("documents/file", "r");
+ assert_throws(INVALID_VALUES_EXCEPTION, function () {
+ fileHandle.readStringNonBlocking(readStringNonBlockingSuccess, readStringNonBlockingError, 0x7fffffffffffffff);
+ }, "InvalidValuesError should be thrown - invalid count.");
+ }
t.done();
});
//==== TEST_CRITERIA MC
test(function () {
- var fileHandleWrite, fileHandleRead, fileContents, content = "Lorem ipsum dolor sit amet...";
-
- add_result_callback(function () {
- try {
- fileHandleRead.close();
- tizen.filesystem.deleteFile("documents/file");
- } catch (err) {
- }
- });
-
- fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
- fileHandleWrite.writeString(content);
- fileHandleWrite.close();
-
- fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
- assert_throws(INVALID_VALUES_EXCEPTION, function () {
- fileHandleRead.readString(0xfffffffffffffffff);
- }, "InvalidValuesError should be thrown - invalid count.");
+ var arch = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch");
+ if (arch !== "aarch64") {
+ var fileHandleWrite, fileHandleRead, fileContents, content = "Lorem ipsum dolor sit amet...";
+
+ add_result_callback(function () {
+ try {
+ fileHandleRead.close();
+ tizen.filesystem.deleteFile("documents/file");
+ } catch (err) {
+ }
+ });
+
+ fileHandleWrite = tizen.filesystem.openFile("documents/file", "w");
+ fileHandleWrite.writeString(content);
+ fileHandleWrite.close();
+
+ fileHandleRead = tizen.filesystem.openFile("documents/file", "r");
+ assert_throws(INVALID_VALUES_EXCEPTION, function () {
+ fileHandleRead.readString(0x7fffffffffffffff);
+ }, "InvalidValuesError should be thrown - invalid count.");
+ }
}, document.title);
</script>