summaryrefslogtreecommitdiff
path: root/indra/newview/tests
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2009-08-06 18:45:37 -0700
committerbrad kittenbrink <brad@lindenlab.com>2009-08-06 18:45:37 -0700
commite6c9f944380d3a9b6562cf580e8c43a69c060dfd (patch)
treebd6a171886c135b9a85e9e44e2b166a4898e72b0 /indra/newview/tests
parent0bf8a15cc03b48432a5b9e0011a01908ef903960 (diff)
Backed out changeset bfb246df4655: rolling back LLFloaterTOS post-merge fixups because they didn't work on linux.
Diffstat (limited to 'indra/newview/tests')
-rw-r--r--indra/newview/tests/lllogininstance_test.cpp24
1 files changed, 8 insertions, 16 deletions
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index d3080d6e4a..5af8acebaf 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -91,23 +91,15 @@ LLURLSimString LLURLSimString::sInstance;
bool LLURLSimString::parse() { return true; }
//-----------------------------------------------------------------------------
-#include "llfloaterreg.h"
#include "../llfloatertos.h"
-static std::string gTOSType;
+static LLFloaterTOS::ETOSType gTOSType;
static LLFloaterTOS::YesNoCallback gTOSCallback;
-
-void LLFloaterTOS::setTOSCallback(YesNoCallback const & callback)
+LLFloaterTOS* LLFloaterTOS::show(LLFloaterTOS::ETOSType type,
+ const std::string & message,
+ const YesNoCallback& 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;
}
@@ -190,7 +182,7 @@ namespace tut
gLoginCreds.clear();
gDisconnectCalled = false;
- gTOSType = ""; // Set to invalid value.
+ // gTOSType = -1; // Set to invalid value.
gTOSCallback = 0; // clear the callback.
@@ -279,7 +271,7 @@ namespace tut
response["data"]["reason"] = "tos";
gTestPump.post(response);
- ensure_equals("TOS Dialog type", gTOSType, "message_tos");
+ ensure_equals("TOS Dialog type", gTOSType, LLFloaterTOS::TOS_TOS);
ensure("TOS callback given", gTOSCallback != 0);
gTOSCallback(false); // Call callback denying TOS.
ensure("No TOS, failed auth", logininstance->authFailure());
@@ -305,7 +297,7 @@ namespace tut
response["data"]["reason"] = "critical"; // Change response to "critical message"
gTestPump.post(response);
- ensure_equals("TOS Dialog type", gTOSType, "message_critical");
+ ensure_equals("TOS Dialog type", gTOSType, LLFloaterTOS::TOS_CRITICAL_MESSAGE);
ensure("TOS callback given", gTOSCallback != 0);
gTOSCallback(true);
ensure_equals("Accepted read critical message", gLoginCreds["params"]["read_critical"].asBoolean(), true);