Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
officejs
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
officejs
Commits
e159ec00
Commit
e159ec00
authored
May 31, 2012
by
Tristan Cavelier
Committed by
Sebastien Robin
Jun 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating Qunit tests.
parent
ddf0bcf9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
OfficeJS/test/jiotests.js
OfficeJS/test/jiotests.js
+19
-2
No files found.
OfficeJS/test/jiotests.js
View file @
e159ec00
...
@@ -22,6 +22,21 @@ var getXML = function (url) {
...
@@ -22,6 +22,21 @@ var getXML = function (url) {
$
.
ajax
({
'
url
'
:
url
,
async
:
false
,
$
.
ajax
({
'
url
'
:
url
,
async
:
false
,
dataType
:
'
text
'
,
success
:
function
(
xml
){
tmp
=
xml
;}});
dataType
:
'
text
'
,
success
:
function
(
xml
){
tmp
=
xml
;}});
return
tmp
;
return
tmp
;
},
addPath
=
function
(
path
)
{
var
array
=
LocalOrCookieStorage
.
getItem
(
'
jio/localfilearray
'
)
||
[];
array
.
push
(
path
);
LocalOrCookieStorage
.
setItem
(
'
jio/localfilearray
'
,
array
);
},
removePath
=
function
(
path
)
{
var
array
=
LocalOrCookieStorage
.
getItem
(
'
jio/localfilearray
'
)
||
[],
newarray
=
[],
i
;
for
(
i
=
0
;
i
<
array
.
length
;
i
+=
1
)
{
if
(
array
[
i
]
!==
path
)
{
newarray
.
push
(
array
[
i
]);
}
}
LocalOrCookieStorage
.
setItem
(
'
jio/localfilearray
'
,
newarray
);
};
};
//// end tools
//// end tools
...
@@ -266,11 +281,11 @@ test ('Check name availability', function () {
...
@@ -266,11 +281,11 @@ test ('Check name availability', function () {
{
"
ID
"
:
'
noid
'
});
{
"
ID
"
:
'
noid
'
});
// name must be available
// name must be available
LocalOrCookieStorage
.
deleteItem
(
'
jio/local/MrCheckName/jiotests/file
'
);
removePath
(
'
jio/local/MrCheckName/jiotests/file
'
);
mytest
(
true
);
mytest
(
true
);
// name must be unavailable
// name must be unavailable
LocalOrCookieStorage
.
setItem
(
'
jio/local/MrCheckName/jiotests/file
'
,{}
);
addPath
(
'
jio/local/MrCheckName/jiotests/file
'
);
mytest
(
false
);
mytest
(
false
);
o
.
jio
.
stop
();
o
.
jio
.
stop
();
...
@@ -386,6 +401,8 @@ test ('Get document list', function () {
...
@@ -386,6 +401,8 @@ test ('Get document list', function () {
'
lastModified
'
:
1
,
'
creationDate
'
:
0
};
'
lastModified
'
:
1
,
'
creationDate
'
:
0
};
doc2
=
{
'
fileName
'
:
'
memo
'
,
'
fileContent
'
:
'
test
'
,
doc2
=
{
'
fileName
'
:
'
memo
'
,
'
fileContent
'
:
'
test
'
,
'
lastModified
'
:
5
,
'
creationDate
'
:
2
};
'
lastModified
'
:
5
,
'
creationDate
'
:
2
};
addPath
(
'
jio/local/MrListName/jiotests/file
'
);
addPath
(
'
jio/local/MrListName/jiotests/memo
'
);
LocalOrCookieStorage
.
setItem
(
'
jio/local/MrListName/jiotests/file
'
,
doc1
);
LocalOrCookieStorage
.
setItem
(
'
jio/local/MrListName/jiotests/file
'
,
doc1
);
LocalOrCookieStorage
.
setItem
(
'
jio/local/MrListName/jiotests/memo
'
,
doc2
);
LocalOrCookieStorage
.
setItem
(
'
jio/local/MrListName/jiotests/memo
'
,
doc2
);
delete
doc1
.
fileContent
;
delete
doc1
.
fileContent
;
...
...
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