[Libreoffice-commits] online.git: test/UnitWOPI.cpp

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 22 00:51:52 UTC 2019


 test/UnitWOPI.cpp |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit ddb697bfa5c1257dbfc4b9c3ab89dc7673ad1e9d
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun Nov 17 08:46:05 2019 -0500
Commit:     Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Fri Nov 22 01:51:34 2019 +0100

    test: validate ExtendedData sent to WOPI
    
    Change-Id: Ib5da41e7f1ca7547ea6ac43daefa4b0259ba4c41
    Reviewed-on: https://gerrit.libreoffice.org/83045
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

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;


More information about the Libreoffice-commits mailing list