DSZone: add testDestroyWindow() for test cases 70/243470/1
authorDuna Oh <duna.oh@samsung.com>
Thu, 3 Sep 2020 02:05:11 +0000 (11:05 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Mon, 7 Sep 2020 10:46:45 +0000 (19:46 +0900)
Change-Id: I870cd47f2544f8ff0813b8b1a77bd78acc175e19

src/DSZone/DSZone.cpp
src/DSZone/DSZone.h

index eedc406..3997032 100644 (file)
@@ -242,6 +242,15 @@ bool DSZone::testCreateWindow(std::shared_ptr<DSWaylandSurface> waylandSurface)
         return true;
 }
 
+bool DSZone::testDestroyWindow(std::shared_ptr<DSWaylandSurface> waylandSurface)
+{
+       if (waylandSurface == nullptr)
+               return false;
+
+        __onSurfaceDestroy(waylandSurface);
+        return true;
+}
+
 std::list<std::shared_ptr<DSWindow>> DSZone::getWindowList()
 {
        return __windowList;
index 0fdd351..3857d70 100644 (file)
@@ -62,6 +62,7 @@ public:
        void callCallbackWindowShellCreated(std::shared_ptr<DSWindowShell> winShell);
        // for test
        bool testCreateWindow(std::shared_ptr<DSWaylandSurface> waylandSurface);
+       bool testDestroyWindow(std::shared_ptr<DSWaylandSurface> waylandSurface);
 
        // for window property
        bool setWindowParent(DSWaylandSurface *dswlSurface, DSWaylandSurface *dswlParentSurface);