From 0bf8a15cc03b48432a5b9e0011a01908ef903960 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Wed, 5 Aug 2009 18:39:02 -0700 Subject: Fixups after the latest merge with viewer-2.0.0-3. Updated LLLoginInstance to use the new LLFloaterReg way of getting hold of floaters. --- indra/newview/tests/lllogininstance_test.cpp | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'indra/newview/tests') diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index 5af8acebaf..d3080d6e4a 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -91,15 +91,23 @@ LLURLSimString LLURLSimString::sInstance; bool LLURLSimString::parse() { return true; } //----------------------------------------------------------------------------- +#include "llfloaterreg.h" #include "../llfloatertos.h" -static LLFloaterTOS::ETOSType gTOSType; +static std::string gTOSType; static LLFloaterTOS::YesNoCallback gTOSCallback; -LLFloaterTOS* LLFloaterTOS::show(LLFloaterTOS::ETOSType type, - const std::string & message, - const YesNoCallback& callback) + +void LLFloaterTOS::setTOSCallback(YesNoCallback const & callback) { - gTOSType = type; gTOSCallback = callback; +} + +//static +LLFloater* LLFloaterReg::showInstance(const std::string & name, + const LLSD & key, + BOOL focus) +{ + gTOSType = name; + gTOSCallback = LLFloaterTOS::YesNoCallback(); return NULL; } @@ -182,7 +190,7 @@ namespace tut gLoginCreds.clear(); gDisconnectCalled = false; - // gTOSType = -1; // Set to invalid value. + gTOSType = ""; // Set to invalid value. gTOSCallback = 0; // clear the callback. @@ -271,7 +279,7 @@ namespace tut response["data"]["reason"] = "tos"; gTestPump.post(response); - ensure_equals("TOS Dialog type", gTOSType, LLFloaterTOS::TOS_TOS); + ensure_equals("TOS Dialog type", gTOSType, "message_tos"); ensure("TOS callback given", gTOSCallback != 0); gTOSCallback(false); // Call callback denying TOS. ensure("No TOS, failed auth", logininstance->authFailure()); @@ -297,7 +305,7 @@ namespace tut response["data"]["reason"] = "critical"; // Change response to "critical message" gTestPump.post(response); - ensure_equals("TOS Dialog type", gTOSType, LLFloaterTOS::TOS_CRITICAL_MESSAGE); + ensure_equals("TOS Dialog type", gTOSType, "message_critical"); ensure("TOS callback given", gTOSCallback != 0); gTOSCallback(true); ensure_equals("Accepted read critical message", gLoginCreds["params"]["read_critical"].asBoolean(), true); -- cgit v1.2.3