summaryrefslogtreecommitdiff
path: root/indra/test/llhttpclient_tut.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/test/llhttpclient_tut.cpp')
-rw-r--r--indra/test/llhttpclient_tut.cpp50
1 files changed, 23 insertions, 27 deletions
diff --git a/indra/test/llhttpclient_tut.cpp b/indra/test/llhttpclient_tut.cpp
index a177d5f2ea..03759001ae 100644
--- a/indra/test/llhttpclient_tut.cpp
+++ b/indra/test/llhttpclient_tut.cpp
@@ -2,30 +2,25 @@
* @file llhttpclient_tut.cpp
* @brief Testing the HTTP client classes.
*
- * $LicenseInfo:firstyear=2006&license=viewergpl$
- *
- * Copyright (c) 2006-2007, Linden Research, Inc.
- *
+ * $LicenseInfo:firstyear=2006&license=viewerlgpl$
* Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab. Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
*
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -35,7 +30,7 @@
*
*/
-#include <tut/tut.h>
+#include <tut/tut.hpp>
#include "linden_common.h"
// These are too slow on Windows to actually include in the build. JC
@@ -58,8 +53,8 @@ namespace tut
class LLSDStorageNode : public LLHTTPNode
{
public:
- LLSD get() const { return storage; }
- LLSD put(const LLSD& value) const { storage = value; return LLSD(); }
+ LLSD simpleGet() const { return storage; }
+ LLSD simplePut(const LLSD& value) const { storage = value; return LLSD(); }
};
class ErrorNode : public LLHTTPNode
@@ -259,7 +254,7 @@ namespace tut
template<> template<>
void HTTPClientTestObject::test<1>()
{
- LLHTTPClient::get("http://www.secondlife.com/", newResult());
+ LLHTTPClient::get("http://www.google.com/", newResult());
runThePump();
ensureStatusOK();
ensure("result object wasn't destroyed", mResultDeleted);
@@ -268,6 +263,7 @@ namespace tut
template<> template<>
void HTTPClientTestObject::test<2>()
{
+ skip("error test depends on dev's local ISP not supplying \"helpful\" search page");
LLHTTPClient::get("http://www.invalid", newResult());
runThePump();
ensureStatusError();
@@ -345,7 +341,7 @@ namespace tut
// won't ever let it run. Instead get from a known LLSD
// source and compare results with the non-blocking get which
// is tested against the mini server earlier.
- skip_fail("secondlife.com is not reliable enough for unit tests.");
+ skip("secondlife.com is not reliable enough for unit tests.");
LLSD expected;
@@ -365,7 +361,7 @@ namespace tut
{
// This is testing for the presence of the Header in the returned results
// from an HTTP::get call.
- LLHTTPClient::get("http://www.secondlife.com/", newResult());
+ LLHTTPClient::get("http://www.google.com/", newResult());
runThePump();
ensureStatusOK();
LLSD header = getHeader();
@@ -374,7 +370,7 @@ namespace tut
template<> template<>
void HTTPClientTestObject::test<9>()
{
- LLHTTPClient::head("http://www.secondlife.com/", newResult());
+ LLHTTPClient::head("http://www.google.com/", newResult());
runThePump();
ensureStatusOK();
ensure("result object wasn't destroyed", mResultDeleted);