diff options
Diffstat (limited to 'indra/newview/tests')
-rw-r--r-- | indra/newview/tests/lllogininstance_test.cpp | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index 19cf9cd961..d3080d6e4a 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -69,7 +69,6 @@ std::string LLViewerLogin::getGridLabel() const { return VIEWERLOGIN_GRIDLABEL; //-----------------------------------------------------------------------------
#include "../llviewercontrol.h"
LLControlGroup gSavedSettings("Global");
-LLControlGroup gSavedSkinSettings("Skinning");
std::string gCurrentVersion = "invalid_version";
LLControlGroup::LLControlGroup(const std::string& name) :
@@ -83,21 +82,32 @@ std::string LLControlGroup::getString(const std::string& name) { return "test_st BOOL LLControlGroup::declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, BOOL persist) { return TRUE; }
BOOL LLControlGroup::declareString(const std::string& name, const std::string &initial_val, const std::string& comment, BOOL persist) { return TRUE; }
+#include "lluicolortable.h"
+void LLUIColorTable::saveUserSettings(void)const {}
+
//-----------------------------------------------------------------------------
#include "../llurlsimstring.h"
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;
}
@@ -180,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.
@@ -269,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());
@@ -295,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);
|