aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/test/lluri_tut.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:19 -0500
committerJacek Antonelli2008-08-15 23:45:19 -0500
commitb235c59d60472f818a9142c0886b95a0ff4191d7 (patch)
treed323c55587584b19cc43a03f58a178823f12d3cd /linden/indra/test/lluri_tut.cpp
parentSecond Life viewer sources 1.18.5.3 (diff)
downloadmeta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.zip
meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.tar.gz
meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.tar.bz2
meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.tar.xz
Second Life viewer sources 1.18.6.0-RC
Diffstat (limited to 'linden/indra/test/lluri_tut.cpp')
-rw-r--r--linden/indra/test/lluri_tut.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/linden/indra/test/lluri_tut.cpp b/linden/indra/test/lluri_tut.cpp
index 8ff1921..c23825b 100644
--- a/linden/indra/test/lluri_tut.cpp
+++ b/linden/indra/test/lluri_tut.cpp
@@ -264,5 +264,44 @@ namespace tut
264 "datasever:12345", "/agent/11111111-2222-3333-4444-5566778899aa/logininfo"); 264 "datasever:12345", "/agent/11111111-2222-3333-4444-5566778899aa/logininfo");
265 } 265 }
266#endif // LL_ENABLE_JANKY_DEPRECATED_WEB_SERVICE_CALLS 266#endif // LL_ENABLE_JANKY_DEPRECATED_WEB_SERVICE_CALLS
267
268
269 template<> template<>
270 void URITestObject::test<15>()
271 {
272 LLURI u("secondlife:///app/login?first_name=Testert4&last_name=Tester&web_login_key=test");
273 // if secondlife is the scheme, LLURI should parse /app/login as path, with no authority
274 ensure_equals("scheme", u.scheme(), "secondlife");
275 ensure_equals("authority", u.authority(), "");
276 ensure_equals("path", u.path(), "/app/login");
277 ensure_equals("pathmap", u.pathArray()[0].asString(), "app");
278 ensure_equals("pathmap", u.pathArray()[1].asString(), "login");
279 ensure_equals("query", u.query(), "first_name=Testert4&last_name=Tester&web_login_key=test");
280 ensure_equals("query map element", u.queryMap()["last_name"].asString(), "Tester");
281
282 u = LLURI("secondlife://Da Boom/128/128/128");
283 // if secondlife is the scheme, LLURI should parse /128/128/128 as path, with Da Boom as authority
284 ensure_equals("scheme", u.scheme(), "secondlife");
285 ensure_equals("authority", u.authority(), "Da Boom");
286 ensure_equals("path", u.path(), "/128/128/128");
287 ensure_equals("pathmap", u.pathArray()[0].asString(), "128");
288 ensure_equals("pathmap", u.pathArray()[1].asString(), "128");
289 ensure_equals("pathmap", u.pathArray()[2].asString(), "128");
290 ensure_equals("query", u.query(), "");
291 }
292
293 template<> template<>
294 void URITestObject::test<16>()
295 {
296 // Parse about: schemes
297 LLURI u("about:blank?redirect-http-hack=secondlife%3A%2F%2F%2Fapp%2Flogin%3Ffirst_name%3DCallum%26last_name%3DLinden%26location%3Dspecify%26grid%3Dvaak%26region%3D%2FMorris%2F128%2F128%26web_login_key%3Defaa4795-c2aa-4c58-8966-763c27931e78");
298 ensure_equals("scheme", u.scheme(), "about");
299 ensure_equals("authority", u.authority(), "");
300 ensure_equals("path", u.path(), "blank");
301 ensure_equals("pathmap", u.pathArray()[0].asString(), "blank");
302 ensure_equals("query", u.query(), "redirect-http-hack=secondlife:///app/login?first_name=Callum&last_name=Linden&location=specify&grid=vaak&region=/Morris/128/128&web_login_key=efaa4795-c2aa-4c58-8966-763c27931e78");
303 ensure_equals("query map element", u.queryMap()["redirect-http-hack"].asString(), "secondlife:///app/login?first_name=Callum&last_name=Linden&location=specify&grid=vaak&region=/Morris/128/128&web_login_key=efaa4795-c2aa-4c58-8966-763c27931e78");
304 }
267} 305}
268 306
307