You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by kn...@apache.org on 2019/03/12 05:00:48 UTC
[cordova-plugin-file] branch travis_tests updated: indexed db
process debug log is added
This is an automated email from the ASF dual-hosted git repository.
knaito pushed a commit to branch travis_tests
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-file.git
The following commit(s) were added to refs/heads/travis_tests by this push:
new a1a839d indexed db process debug log is added
a1a839d is described below
commit a1a839d24b4b1b41d2421ef8b9c94b95ad04da53
Author: knaito <kn...@asial.co.jp>
AuthorDate: Tue Mar 12 14:00:23 2019 +0900
indexed db process debug log is added
---
src/browser/FileProxy.js | 6 ++++++
tests/tests.js | 48 ++++++++++++++++++++++++------------------------
2 files changed, 30 insertions(+), 24 deletions(-)
diff --git a/src/browser/FileProxy.js b/src/browser/FileProxy.js
index 33eed4c..332536b 100644
--- a/src/browser/FileProxy.js
+++ b/src/browser/FileProxy.js
@@ -894,6 +894,12 @@
(errorCallback || onError)(err);
};
tx.oncomplete = function () {
+ window.customLog('log', 'indexeddb get is completed');
+ window.customLog('log', request.error);
+ window.customLog('log', request.result);
+ window.customLog('log', request.source);
+ window.customLog('log', request.readState);
+ window.customLog('log', request.transaction);
successCallback(request.result);
};
};
diff --git a/tests/tests.js b/tests/tests.js
index b4f8125..723f063 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -417,30 +417,30 @@ exports.defineAutoTests = function () {
// it('file.spec.8 should be defined', function () {
// expect(window.resolveLocalFileSystemURL).toBeDefined();
// });
- // it('file.spec.9 should resolve a valid file name', function (done) {
- // var fileName = 'file.spec.9';
- // var win = function (fileEntry) {
- // window.customLog('log', '----- win is called ----');
- // expect(fileEntry).toBeDefined();
- // expect(fileEntry.isFile).toBe(true);
- // expect(fileEntry.isDirectory).toBe(false);
- // expect(fileEntry.name).toCanonicallyMatch(fileName);
- // expect(fileEntry.toURL()).not.toMatch(/^cdvfile:/, 'should not use cdvfile URL');
- // expect(fileEntry.toURL()).not.toMatch(/\/$/, 'URL should not end with a slash');
- // // Clean-up
- // deleteEntry(fileName, done);
- // };
- // createFile(fileName, function (entry) {
- // window.customLog('log', '----- entry.toURL() ----');
- // window.customLog('log', entry.toURL());
- // setTimeout(function () {
- // window.resolveLocalFileSystemURL(entry.toURL(), win, function (err) {
- // window.customLog('log', '********* called *******');
- // (failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving file URL: ' + entry.toURL()))(err);
- // });
- // }, 1000);
- // }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName), failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
- // });
+ it('file.spec.9 should resolve a valid file name', function (done) {
+ var fileName = 'file.spec.9';
+ var win = function (fileEntry) {
+ window.customLog('log', '----- win is called ----');
+ expect(fileEntry).toBeDefined();
+ expect(fileEntry.isFile).toBe(true);
+ expect(fileEntry.isDirectory).toBe(false);
+ expect(fileEntry.name).toCanonicallyMatch(fileName);
+ expect(fileEntry.toURL()).not.toMatch(/^cdvfile:/, 'should not use cdvfile URL');
+ expect(fileEntry.toURL()).not.toMatch(/\/$/, 'URL should not end with a slash');
+ // Clean-up
+ deleteEntry(fileName, done);
+ };
+ createFile(fileName, function (entry) {
+ window.customLog('log', '----- entry.toURL() ----');
+ window.customLog('log', entry.toURL());
+ setTimeout(function () {
+ window.resolveLocalFileSystemURL(entry.toURL(), win, function (err) {
+ window.customLog('log', '********* called *******');
+ (failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving file URL: ' + entry.toURL()))(err);
+ });
+ }, 1000);
+ }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName), failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+ });
// it('file.spec.9.1 should resolve a file even with a terminating slash', function (done) {
// var fileName = 'file.spec.9.1';
// var win = function (fileEntry) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org