diff options
author | brad kittenbrink <brad@lindenlab.com> | 2009-08-11 12:21:55 -0400 |
---|---|---|
committer | brad kittenbrink <brad@lindenlab.com> | 2009-08-11 12:21:55 -0400 |
commit | dc2d11d3de38d42b3d696abeb189c923881b6f63 (patch) | |
tree | e85be2840a69de1bdccad31e7bdab903803ed1b4 /indra/newview/tests | |
parent | b2632c50efc12eacdcadace64e6c0f1906b86ff6 (diff) | |
parent | 8f4811f3fd7f252a5f5bc50ed11fecd8e42f3e68 (diff) |
Merged in my latest work including improved version of DEV-35401 "doubleton" workaround and LLFloaterTOS post-merge fixups.
Diffstat (limited to 'indra/newview/tests')
-rw-r--r-- | indra/newview/tests/lllogininstance_test.cpp | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index d3080d6e4a..a84e796159 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -91,23 +91,16 @@ LLURLSimString LLURLSimString::sInstance; bool LLURLSimString::parse() { return true; }
//-----------------------------------------------------------------------------
-#include "llfloaterreg.h"
#include "../llfloatertos.h"
+#include "llfloaterreg.h"
static std::string gTOSType;
-static LLFloaterTOS::YesNoCallback gTOSCallback;
-
-void LLFloaterTOS::setTOSCallback(YesNoCallback const & callback)
-{
- gTOSCallback = callback;
-}
+static LLEventPump * gTOSReplyPump = NULL;
//static
-LLFloater* LLFloaterReg::showInstance(const std::string & name,
- const LLSD & key,
- BOOL focus)
+LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, BOOL focus)
{
gTOSType = name;
- gTOSCallback = LLFloaterTOS::YesNoCallback();
+ gTOSReplyPump = &LLEventPumps::instance().obtain(key["reply_pump"]);
return NULL;
}
@@ -191,7 +184,7 @@ namespace tut gDisconnectCalled = false;
gTOSType = ""; // Set to invalid value.
- gTOSCallback = 0; // clear the callback.
+ gTOSReplyPump = 0; // clear the callback.
gSavedSettings.declareBOOL("NoInventoryLibrary", FALSE, "", FALSE);
@@ -280,14 +273,14 @@ namespace tut gTestPump.post(response);
ensure_equals("TOS Dialog type", gTOSType, "message_tos");
- ensure("TOS callback given", gTOSCallback != 0);
- gTOSCallback(false); // Call callback denying TOS.
+ ensure("TOS callback given", gTOSReplyPump != 0);
+ gTOSReplyPump->post(false); // Call callback denying TOS.
ensure("No TOS, failed auth", logininstance->authFailure());
// Start again.
logininstance->connect(test_uri, credentials);
gTestPump.post(response); // Fail for tos again.
- gTOSCallback(true); // Accept tos, should reconnect w/ agree_to_tos.
+ gTOSReplyPump->post(true); // Accept tos, should reconnect w/ agree_to_tos.
ensure_equals("Accepted agree to tos", gLoginCreds["params"]["agree_to_tos"].asBoolean(), true);
ensure("Incomplete login status", !logininstance->authFailure() && !logininstance->authSuccess());
@@ -306,8 +299,8 @@ namespace tut gTestPump.post(response);
ensure_equals("TOS Dialog type", gTOSType, "message_critical");
- ensure("TOS callback given", gTOSCallback != 0);
- gTOSCallback(true);
+ ensure("TOS callback given", gTOSReplyPump != 0);
+ gTOSReplyPump->post(true);
ensure_equals("Accepted read critical message", gLoginCreds["params"]["read_critical"].asBoolean(), true);
ensure("Incomplete login status", !logininstance->authFailure() && !logininstance->authSuccess());
|