Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio_mebibou
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Alexandra Rogova
jio_mebibou
Commits
1a8758a3
Commit
1a8758a3
authored
Sep 22, 2017
by
Vincent Bechu
Committed by
Vincent Bechu
Sep 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[indexeddbstorage] Fix putAttachment for empty blob
/reviewed-on
!74
parent
2fddffaf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
1 deletion
+30
-1
src/jio.storage/indexeddbstorage.js
src/jio.storage/indexeddbstorage.js
+3
-1
test/jio.storage/indexeddbstorage.tests.js
test/jio.storage/indexeddbstorage.tests.js
+27
-0
No files found.
src/jio.storage/indexeddbstorage.js
View file @
1a8758a3
...
...
@@ -385,7 +385,9 @@
end_index
-=
1
;
}
function
resolver
(
result
)
{
result_list
.
push
(
result
);
if
(
result
.
blob
!==
undefined
)
{
result_list
.
push
(
result
);
}
resolve
(
result_list
);
}
function
getPart
(
i
)
{
...
...
test/jio.storage/indexeddbstorage.tests.js
View file @
1a8758a3
...
...
@@ -1357,6 +1357,33 @@
});
});
test
(
"
retrieve empty blob
"
,
function
()
{
var
context
=
this
,
attachment
=
"
attachment
"
,
blob
=
new
Blob
();
stop
();
expect
(
1
);
deleteIndexedDB
(
context
.
jio
)
.
then
(
function
()
{
return
context
.
jio
.
put
(
"
foo
"
,
{
"
title
"
:
"
bar
"
});
})
.
then
(
function
()
{
return
context
.
jio
.
putAttachment
(
"
foo
"
,
attachment
,
blob
);
})
.
then
(
function
()
{
return
context
.
jio
.
getAttachment
(
"
foo
"
,
attachment
);
})
.
then
(
function
(
result
)
{
deepEqual
(
result
,
blob
,
"
check empty blob
"
);
})
.
fail
(
function
(
error
)
{
ok
(
false
,
error
);
})
.
always
(
function
()
{
start
();
});
});
/////////////////////////////////////////////////////////////////
// indexeddbStorage.removeAttachment
/////////////////////////////////////////////////////////////////
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment