From c7353e6c590c033e57c13ff8d49cbd992d9357f2 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Fri, 2 Nov 2018 09:57:58 -0700 Subject: [PATCH] Added `setWindowSize` - FOR TESTING ON MAC --- interface/src/scripting/TestScriptingInterface.cpp | 4 ++++ interface/src/scripting/TestScriptingInterface.h | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/interface/src/scripting/TestScriptingInterface.cpp b/interface/src/scripting/TestScriptingInterface.cpp index a31e43d6c6..968c5b8001 100644 --- a/interface/src/scripting/TestScriptingInterface.cpp +++ b/interface/src/scripting/TestScriptingInterface.cpp @@ -209,3 +209,7 @@ QString TestScriptingInterface::getOperatingSystemType() { return "UNKNOWN"; #endif } + +void TestScriptingInterface::setWindowSize(int width, int height) { + qApp->getWindow()->resize(width, height); +} \ No newline at end of file diff --git a/interface/src/scripting/TestScriptingInterface.h b/interface/src/scripting/TestScriptingInterface.h index a40826bd25..8dbfded39c 100644 --- a/interface/src/scripting/TestScriptingInterface.h +++ b/interface/src/scripting/TestScriptingInterface.h @@ -166,9 +166,16 @@ public slots: /**jsdoc * Returns the Operating Sytem type * @function Test.getOperatingSystemType + * @returns {string} "WINDOWS", "MACOS" or "UNKNOWN" */ QString getOperatingSystemType(); + /**jsdoc + * Sets the size of the Window on desktop + * @function Test.getOperatingSystemType + */ + void setWindowSize(int width, int height); + private: bool waitForCondition(qint64 maxWaitMs, std::function condition); QString _testResultsLocation;