wsd: test: better UnitOAuth
There was a race between the closedocument command and the save command that caused occassional random failures. Change-Id: I9e0e71545bab586826273fdb6e160b624be91dbe Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This commit is contained in:
parent
57fe2061eb
commit
63ac54a552
1 changed files with 9 additions and 2 deletions
|
@ -102,8 +102,6 @@ public:
|
|||
LOK_ASSERT_EQUAL_MESSAGE("GetFile was not invoked", true, _getFileCalled);
|
||||
_getFileCalled = false;
|
||||
|
||||
// Close the document after loading.
|
||||
WSD_CMD("closedocument");
|
||||
switch (_phase)
|
||||
{
|
||||
case Phase::LoadToken:
|
||||
|
@ -111,16 +109,25 @@ public:
|
|||
_credential = "abcdefg123456_newtoken";
|
||||
WSD_CMD("resetaccesstoken " + _credential);
|
||||
WSD_CMD("save dontTerminateEdit=0 dontSaveIfUnmodified=0");
|
||||
|
||||
// Close the document after loading.
|
||||
WSD_CMD("closedocument");
|
||||
break;
|
||||
case Phase::ModifyAccessToken:
|
||||
// Close the document after loading.
|
||||
WSD_CMD("closedocument");
|
||||
break;
|
||||
case Phase::LoadHeader:
|
||||
// Close the document after loading.
|
||||
WSD_CMD("closedocument");
|
||||
TRANSITION_STATE(_phase, Phase::LoadingHeader);
|
||||
_credential = "basic==";
|
||||
initWebsocket("/wopi/files/1?access_header=Authorization: Basic " + _credential);
|
||||
WSD_CMD("load url=" + getWopiSrc());
|
||||
break;
|
||||
case Phase::LoadingHeader:
|
||||
// Close the document after loading.
|
||||
WSD_CMD("closedocument");
|
||||
passTest("Finished all cases successfully");
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue