[Libreoffice-commits] online.git: test/data test/UnitRenderShape.cpp
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Wed Feb 26 20:38:26 UTC 2020
test/UnitRenderShape.cpp | 38 ----------------------------------
test/data/shapes_writer.svg | 49 --------------------------------------------
2 files changed, 87 deletions(-)
New commits:
commit 8265fab93f5b818a33edf5b952c0764be3b93a60
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Feb 26 20:17:12 2020 +0100
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Wed Feb 26 21:38:09 2020 +0100
test: remove redundant shape related C++ test.
This test case is covered by cypress tests. See
shape_properties_spec.js. Those tests will fail if
SVG rendering is broken.
Change-Id: I1a3434f9696c6a323a23ded0b1b2816d74373c7a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89590
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
diff --git a/test/UnitRenderShape.cpp b/test/UnitRenderShape.cpp
index b15e94358..9167ec5af 100644
--- a/test/UnitRenderShape.cpp
+++ b/test/UnitRenderShape.cpp
@@ -71,7 +71,6 @@ void stripDescriptions(std::vector<char>& svg)
class UnitRenderShape : public UnitWSD
{
TestResult testRenderShapeSelectionImpress();
- TestResult testRenderShapeSelectionWriter();
TestResult testRenderShapeSelectionWriterImage();
public:
@@ -121,39 +120,6 @@ UnitBase::TestResult UnitRenderShape::testRenderShapeSelectionImpress()
return TestResult::Ok;
}
-UnitBase::TestResult UnitRenderShape::testRenderShapeSelectionWriter()
-{
- const char* testname = "testRenderShapeSelectionWriter ";
- try
- {
- std::string documentPath, documentURL;
- helpers::getDocumentPathAndURL("shape.odt", documentPath, documentURL, testname);
-
- std::shared_ptr<LOOLWebSocket> socket = helpers::loadDocAndGetSocket(
- Poco::URI(helpers::getTestServerURI()), documentURL, testname);
-
- // Select the shape with SHIFT + F4
- helpers::sendKeyPress(socket, 0, 771 | helpers::SpecialKey::skShift, testname);
- std::this_thread::sleep_for(std::chrono::milliseconds(250));
- helpers::sendTextFrame(socket, "rendershapeselection mimetype=image/svg+xml", testname);
- std::vector<char> responseSVG
- = helpers::getResponseMessage(socket, "shapeselectioncontent:", testname);
- CPPUNIT_ASSERT(!responseSVG.empty());
- auto it = std::find(responseSVG.begin(), responseSVG.end(), '\n');
- if (it != responseSVG.end())
- responseSVG.erase(responseSVG.begin(), ++it);
-
- stripDescriptions(responseSVG);
-
- CPPUNIT_ASSERT(helpers::svgMatch(testname, responseSVG, "shapes_writer.svg"));
- }
- catch (const Poco::Exception& exc)
- {
- CPPUNIT_FAIL(exc.displayText());
- }
- return TestResult::Ok;
-}
-
UnitBase::TestResult UnitRenderShape::testRenderShapeSelectionWriterImage()
{
const char* testname = "testRenderShapeSelectionWriterImage ";
@@ -194,10 +160,6 @@ void UnitRenderShape::invokeTest()
if (result != TestResult::Ok)
exitTest(result);
- result = testRenderShapeSelectionWriter();
- if (result != TestResult::Ok)
- exitTest(result);
-
result = testRenderShapeSelectionWriterImage();
if (result != TestResult::Ok)
exitTest(result);
diff --git a/test/data/shapes_writer.svg b/test/data/shapes_writer.svg
deleted file mode 100644
index e5764d969..000000000
--- a/test/data/shapes_writer.svg
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<svg version="1.2" width="33.67mm" height="82.62mm" viewBox="7310 6216 3367 8262" preserveAspectRatio="xMidYMid" fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" xmlns:ooo="http://xml.openoffice.org/svg/export" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" xml:space="preserve">
- <defs class="EmbeddedBulletChars">
- <g id="bullet-char-template-57356" transform="scale(0.00048828125,-0.00048828125)">
- <path d="M 580,1141 L 1163,571 580,0 -4,571 580,1141 Z"/>
- </g>
- <g id="bullet-char-template-57354" transform="scale(0.00048828125,-0.00048828125)">
- <path d="M 8,1128 L 1137,1128 1137,0 8,0 8,1128 Z"/>
- </g>
- <g id="bullet-char-template-10146" transform="scale(0.00048828125,-0.00048828125)">
- <path d="M 174,0 L 602,739 174,1481 1456,739 174,0 Z M 1358,739 L 309,1346 659,739 1358,739 Z"/>
- </g>
- <g id="bullet-char-template-10132" transform="scale(0.00048828125,-0.00048828125)">
- <path d="M 2015,739 L 1276,0 717,0 1260,543 174,543 174,936 1260,936 717,1481 1274,1481 2015,739 Z"/>
- </g>
- <g id="bullet-char-template-10007" transform="scale(0.00048828125,-0.00048828125)">
- <path d="M 0,-2 C -7,14 -16,27 -25,37 L 356,567 C 262,823 215,952 215,954 215,979 228,992 255,992 264,992 276,990 289,987 310,991 331,999 354,1012 L 381,999 492,748 772,1049 836,1024 860,1049 C 881,1039 901,1025 922,1006 886,937 835,863 770,784 769,783 710,716 594,584 L 774,223 C 774,196 753,168 711,139 L 727,119 C 717,90 699,76 672,76 641,76 570,178 457,381 L 164,-76 C 142,-110 111,-127 72,-127 30,-127 9,-110 8,-76 1,-67 -2,-52 -2,-32 -2,-23 -1,-13 0,-2 Z"/>
- </g>
- <g id="bullet-char-template-10004" transform="scale(0.00048828125,-0.00048828125)">
- <path d="M 285,-33 C 182,-33 111,30 74,156 52,228 41,333 41,471 41,549 55,616 82,672 116,743 169,778 240,778 293,778 328,747 346,684 L 369,508 C 377,444 397,411 428,410 L 1163,1116 C 1174,1127 1196,1133 1229,1133 1271,1133 1292,1118 1292,1087 L 1292,965 C 1292,929 1282,901 1262,881 L 442,47 C 390,-6 338,-33 285,-33 Z"/>
- </g>
- <g id="bullet-char-template-9679" transform="scale(0.00048828125,-0.00048828125)">
- <path d="M 813,0 C 632,0 489,54 383,161 276,268 223,411 223,592 223,773 276,916 383,1023 489,1130 632,1184 813,1184 992,1184 1136,1130 1245,1023 1353,916 1407,772 1407,592 1407,412 1353,268 1245,161 1136,54 992,0 813,0 Z"/>
- </g>
- <g id="bullet-char-template-8226" transform="scale(0.00048828125,-0.00048828125)">
- <path d="M 346,457 C 273,457 209,483 155,535 101,586 74,649 74,723 74,796 101,859 155,911 209,963 273,989 346,989 419,989 480,963 531,910 582,859 608,796 608,723 608,648 583,586 532,535 482,483 420,457 346,457 Z"/>
- </g>
- <g id="bullet-char-template-8211" transform="scale(0.00048828125,-0.00048828125)">
- <path d="M -4,459 L 1135,459 1135,606 -4,606 -4,459 Z"/>
- </g>
- <g id="bullet-char-template-61548" transform="scale(0.00048828125,-0.00048828125)">
- <path d="M 173,740 C 173,903 231,1043 346,1159 462,1274 601,1332 765,1332 928,1332 1067,1274 1183,1159 1299,1043 1357,903 1357,740 1357,577 1299,437 1183,322 1067,206 928,148 765,148 601,148 462,206 346,322 231,437 173,577 173,740 Z"/>
- </g>
- </defs>
- <g class="Page">
- <g class="com.sun.star.drawing.CustomShape">
- <g id="id1">
- <rect class="BoundingBox" stroke="none" fill="none" x="7310" y="6216" width="3367" height="8262"/>
- <path fill="rgb(114,159,207)" stroke="none" d="M 7311,14474 L 7311,7057 8151,6218 10673,6218 10673,13633 9832,14474 7311,14474 Z"/>
- <path fill="none" stroke="rgb(52,101,164)" d="M 7311,14474 L 7311,7057 8151,6218 10673,6218 10673,13633 9832,14474 7311,14474 Z"/>
- <path fill="rgb(139,176,217)" stroke="none" d="M 7311,7057 L 8151,6218 10673,6218 9832,7057 7311,7057 Z"/>
- <path fill="none" stroke="rgb(52,101,164)" d="M 7311,7057 L 8151,6218 10673,6218 9832,7057 7311,7057 Z"/>
- <path fill="rgb(91,127,166)" stroke="none" d="M 9832,14474 L 9832,7057 10673,6218 10673,13633 9832,14474 Z"/>
- <path fill="none" stroke="rgb(52,101,164)" d="M 9832,14474 L 9832,7057 10673,6218 10673,13633 9832,14474 Z"/>
- </g>
- </g>
- </g>
-</svg>
\ No newline at end of file
More information about the Libreoffice-commits
mailing list