summaryrefslogtreecommitdiff
path: root/indra/newview/tests
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2015-01-23 04:09:17 -0800
committerNat Goodspeed <nat@lindenlab.com>2015-01-23 04:09:17 -0800
commitc93648e3d2a5a70a6fc8c0de46d45580798b0386 (patch)
treea594de399fc7bb290762c942eec2b5ce88243359 /indra/newview/tests
parentba43a216fdd1ee5f77f3aece4ce9dbf441bab3e6 (diff)
Make MandatoryUpdateMachine use LLLoginInstance's LLNotificationsInterface.
LLLoginInstance has a test hook setNotificationsInterface(), used by lllogininstance_test.cpp to redirect notifications through a dummy LLNotificationsInterface implementation. Certain of LLLoginInstance's MandatoryUpdateMachine state classes need to post notifications too; but until now they directly called LLNotificationsUtil::add(). In the production viewer, this should (!) be the same as calling through LLLoginInstance::mNotifications -- but it broke two of the LLLoginInstance unit tests, so they were skipped. Since MandatoryUpdateMachine's constructor is already passed the invoking LLLoginInstance&, make it store the reference. Add MandatoryUpdateMachine:: getNotificationsInterface(), which forwards to new LLLoginInstance:: getNotificationsInterface(). Change LLNotificationsUtil::add() calls in MandatoryUpdateMachine state classes to call through mMachine's getNotificationInterface() instead. This allows us to remove #include "llnotificationsutil.h" from lllogininstance.cpp, also that #include plus stub LLNotificationsUtil::add() implementation from lllogininstance_test.cpp. Finally, it allows us to remove the skip() calls from the two unit tests.
Diffstat (limited to 'indra/newview/tests')
-rwxr-xr-xindra/newview/tests/lllogininstance_test.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index 9ee6403739..1b0334498e 100755
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -193,14 +193,6 @@ void LLAppViewer::forceQuit(void) {}
LLAppViewer * LLAppViewer::sInstance = 0;
//-----------------------------------------------------------------------------
-#include "llnotificationsutil.h"
-LLNotificationPtr LLNotificationsUtil::add(const std::string& name,
- const LLSD& substitutions,
- const LLSD& payload,
- boost::function<void (const LLSD&, const LLSD&)> functor) { return LLNotificationPtr((LLNotification*)0); }
-
-
-//-----------------------------------------------------------------------------
#include "llupdaterservice.h"
std::string const & LLUpdaterService::pumpName(void)
@@ -488,8 +480,6 @@ namespace tut
template<> template<>
void lllogininstance_object::test<3>()
{
- skip("test fails with Xcode 6, skipping");
-
set_test_name("Test Mandatory Update User Accepts");
// Part 1 - Mandatory Update, with User accepts response.
@@ -517,8 +507,6 @@ namespace tut
template<> template<>
void lllogininstance_object::test<4>()
{
- skip("test fails with Xcode 6, skipping");
-
set_test_name("Test Mandatory Update User Decline");
// Test connect with update needed.