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
3c3d98e5
Commit
3c3d98e5
authored
Jul 23, 2012
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct a message, rename a variable to make it more explicit
parent
fe0f096f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
OfficeJS/test/jiotests.js
OfficeJS/test/jiotests.js
+17
-16
No files found.
OfficeJS/test/jiotests.js
View file @
3c3d98e5
...
...
@@ -1265,7 +1265,7 @@ test ('Remove Errors', function () {
o
.
tick
();
o
.
spy
(
'
status
'
,
'
done
'
,
'
removing existant "file.doc" owner "1",
'
+
'
error
'
);
'
ok
'
);
o
.
jio_1
.
removeDocument
(
'
file.doc
'
,{
onResponse
:
o
.
f
,
max_retry
:
1
});
o
.
tick
();
...
...
@@ -1366,7 +1366,7 @@ test ('Revision Conflicts' , function () {
o
.
spy
(
'
status
'
,
'
fail
'
,
'
saving "file.doc" with owner "me",
'
+
'
third revision, conflict!
'
);
o
.
c
=
function
(
conflict_object
)
{
o
.
co
=
conflict_object
;
o
.
co
nflict_object
=
conflict_object
;
ok
(
true
,
'
onConflict callback called once
'
);
};
o
.
t
.
spy
(
o
,
'
c
'
);
...
...
@@ -1374,14 +1374,14 @@ test ('Revision Conflicts' , function () {
onResponse
:
o
.
f
,
max_retry
:
1
,
onConflict
:
o
.
c
});
o
.
tick
(
undefined
,
'
f
'
);
o
.
tick
(
0
,
'
c
'
);
if
(
!
o
.
co
)
{
return
ok
(
false
,
'
impossible to continue the tests
'
);
}
o
.
co
=
undefined
;
if
(
!
o
.
conflict_object
){
return
ok
(
false
,
'
impossible to continue the tests
'
);
}
o
.
co
nflict_object
=
undefined
;
// me tries to save again but does not solve anything
o
.
spy
(
'
status
'
,
'
fail
'
,
"
don't solve anything,
"
+
'
save "file.doc" with owner "me", forth revision, conflict!
'
);
o
.
c
=
function
(
conflict_object
)
{
o
.
co
=
conflict_object
;
o
.
co
nflict_object
=
conflict_object
;
ok
(
true
,
'
onConflict callback called once
'
);
};
o
.
t
.
spy
(
o
,
'
c
'
);
...
...
@@ -1389,17 +1389,17 @@ test ('Revision Conflicts' , function () {
onResponse
:
o
.
f
,
max_retry
:
1
,
onConflict
:
o
.
c
});
o
.
tick
();
o
.
tick
(
0
,
'
c
'
);
if
(
!
o
.
co
)
{
return
ok
(
false
,
'
impossible to continue the tests
'
);
}
if
(
!
o
.
conflict_object
){
return
ok
(
false
,
'
impossible to continue the tests
'
);
}
// me saves the revision created by solving the conflict
o
.
spy
(
'
status
'
,
'
done
'
,
'
solving conflict and save "file.doc" with owner
'
+
'
"me", forth revision, no conflict.
'
);
o
.
jio_me
.
saveDocument
(
'
file.doc
'
,
'
content4me
'
,{
onResponse
:
o
.
f
,
max_retry
:
1
,
known_conflict_list
:[
o
.
co
]});
onResponse
:
o
.
f
,
max_retry
:
1
,
known_conflict_list
:[
o
.
co
nflict_object
]});
o
.
tick
();
o
.
spy
(
'
status
'
,
'
done
'
,
'
removing "file.doc" with owner "me",
'
+
// me removes the document
o
.
spy
(
'
status
'
,
'
done
'
,
'
removing "file.doc" with owner "me",
'
+
'
no conflict.
'
);
o
.
c
=
o
.
t
.
spy
();
o
.
jio_me
.
removeDocument
(
'
file.doc
'
,{
onResponse
:
o
.
f
,
max_retry
:
1
,
...
...
@@ -1411,7 +1411,7 @@ test ('Revision Conflicts' , function () {
o
.
spy
(
'
status
'
,
'
fail
'
,
'
saving "file.doc" with owner "him",
'
+
'
any revision, conflict!
'
);
o
.
c
=
function
(
conflict_object
)
{
o
.
co
=
conflict_object
;
o
.
co
nflict_object
=
conflict_object
;
ok
(
true
,
'
onConflict callback called once
'
);
};
o
.
t
.
spy
(
o
,
'
c
'
);
...
...
@@ -1488,7 +1488,7 @@ test ('Solving Conflict Conflicts' , function () {
o
.
spy
(
'
status
'
,
'
fail
'
,
'
saving "file.doc" with owner "you",
'
+
'
second revision, conflict!
'
);
o
.
c
=
function
(
conflict_object
)
{
o
.
co
=
conflict_object
;
o
.
co
nflict_object
=
conflict_object
;
ok
(
true
,
'
onConflict callback called once
'
);
};
o
.
t
.
spy
(
o
,
'
c
'
);
...
...
@@ -1496,7 +1496,7 @@ test ('Solving Conflict Conflicts' , function () {
onResponse
:
o
.
f
,
max_retry
:
1
,
onConflict
:
o
.
c
});
o
.
tick
();
o
.
tick
(
0
,
'
c
'
);
if
(
!
o
.
co
)
{
return
ok
(
false
,
'
impossible to continue the tests
'
);
}
if
(
!
o
.
conflict_object
){
return
ok
(
false
,
'
impossible to continue the tests
'
);
}
o
.
spy
(
'
status
'
,
'
done
'
,
'
saving "file.doc" with owner "her",
'
+
'
next revision, no conflict.
'
);
...
...
@@ -1507,21 +1507,22 @@ test ('Solving Conflict Conflicts' , function () {
o
.
spy
(
'
status
'
,
'
fail
'
,
'
solving conflict and save "file.doc" with owner
'
+
'
"you", fith revision, conflict!
'
);
o
.
c
=
function
(
conflict_object
)
{
o
.
co
=
conflict_object
;
o
.
co
nflict_object
=
conflict_object
;
ok
(
true
,
'
onConflict callback called once
'
);
};
o
.
t
.
spy
(
o
,
'
c
'
);
o
.
jio_you
.
saveDocument
(
'
file.doc
'
,
'
content4you
'
,{
onResponse
:
o
.
f
,
max_retry
:
1
,
known_conflict_list
:[
o
.
co
],
onConflict
:
o
.
c
});
o
.
co
=
undefined
;
onResponse
:
o
.
f
,
max_retry
:
1
,
known_conflict_list
:[
o
.
conflict_object
],
onConflict
:
o
.
c
});
o
.
conflict_object
=
undefined
;
o
.
tick
();
o
.
tick
(
0
,
'
c
'
);
if
(
!
o
.
co
)
{
return
ok
(
false
,
'
impossible to continue the tests
'
);
}
if
(
!
o
.
conflict_object
){
return
ok
(
false
,
'
impossible to continue the tests
'
);
}
o
.
spy
(
'
status
'
,
'
done
'
,
'
solving conflict and save "file.doc" with owner
'
+
'
"you", forth revision, no conflict.
'
);
o
.
jio_you
.
saveDocument
(
'
file.doc
'
,
'
content5you
'
,{
onResponse
:
o
.
f
,
max_retry
:
1
,
known_conflict_list
:[
o
.
co
]});
onResponse
:
o
.
f
,
max_retry
:
1
,
known_conflict_list
:[
o
.
co
nflict_object
]});
o
.
tick
();
o
.
jio_you
.
stop
();
...
...
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