summaryrefslogtreecommitdiff
path: root/test/UnitWOPI.cpp
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2019-11-17 08:46:05 -0500
committerAshod Nakashian <ashnakash@gmail.com>2019-11-22 01:51:34 +0100
commitddb697bfa5c1257dbfc4b9c3ab89dc7673ad1e9d (patch)
tree244ff4add42cf7dc431f60e903e7f1dd0baaa4b8 /test/UnitWOPI.cpp
parent7c4ba459ff70bf4050ad4a936796845f04f6b127 (diff)
test: validate ExtendedData sent to WOPI
Change-Id: Ib5da41e7f1ca7547ea6ac43daefa4b0259ba4c41 Reviewed-on: https://gerrit.libreoffice.org/83045 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'test/UnitWOPI.cpp')
-rw-r--r--test/UnitWOPI.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/UnitWOPI.cpp b/test/UnitWOPI.cpp
index 863dc4c13..b7c57a6ac 100644
--- a/test/UnitWOPI.cpp
+++ b/test/UnitWOPI.cpp
@@ -70,6 +70,10 @@ public:
// and this test fakes that it's an autosave
CPPUNIT_ASSERT_EQUAL(std::string("true"), request.get("X-LOOL-WOPI-IsAutosave"));
+ // Check that we get the extended data.
+ CPPUNIT_ASSERT_EQUAL(std::string("CustomFlag=Custom Value;AnotherFlag=AnotherValue"),
+ request.get("X-LOOL-WOPI-ExtendedData"));
+
_finishedSaveModified = true;
}
@@ -105,7 +109,11 @@ public:
}
case Phase::SaveModified:
{
- helpers::sendTextFrame(*getWs()->getLOOLWebSocket(), "save dontTerminateEdit=0 dontSaveIfUnmodified=0", testName);
+ helpers::sendTextFrame(*getWs()->getLOOLWebSocket(),
+ "save dontTerminateEdit=0 dontSaveIfUnmodified=0 "
+ "extendedData=CustomFlag%3DCustom%20Value%3BAnotherFlag%"
+ "3DAnotherValue",
+ testName);
_phase = Phase::Polling;
_savingPhase = SavingPhase::Modified;