diff options
author | Jo Asplin <jo.asplin@nokia.com> | 2011-09-06 13:46:40 +0200 |
---|---|---|
committer | Jo Asplin <jo.asplin@nokia.com> | 2011-09-09 09:32:17 +0200 |
commit | c59f9ad7768a007ca7a49ea11b16617529e86d52 (patch) | |
tree | d481be2a727f8461a76c2b729fc7e93784a3cff1 /tests/auto/network/access/qabstractnetworkcache/tests | |
parent | 2d41aff1e8557a43268bce631df834bfa79593cf (diff) |
Moved network autotests into new directory structure
Task-number: QTBUG-21223
Change-Id: I55dbf5c42a1c5d938b9e0c9bf7d90457a6c26bbc
Reviewed-on: http://codereview.qt-project.org/4259
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/network/access/qabstractnetworkcache/tests')
10 files changed, 88 insertions, 0 deletions
diff --git a/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_cachecontrol-expire.cgi b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_cachecontrol-expire.cgi new file mode 100755 index 0000000000..7dc506fc1e --- /dev/null +++ b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_cachecontrol-expire.cgi @@ -0,0 +1,7 @@ +#!/bin/bash +# cache control takes precedence over expires +echo "Cache-Control: max-age=-1" +echo "Expires: Mon, 30 Oct 2028 14:19:41 GMT" +echo "Content-type: text/html"; +echo "" +echo "Hello World!" diff --git a/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_cachecontrol.cgi b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_cachecontrol.cgi new file mode 100755 index 0000000000..f2edfc161f --- /dev/null +++ b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_cachecontrol.cgi @@ -0,0 +1,13 @@ +#!/bin/bash +if [ ! -z ${HTTP_IF_MODIFIED_SINCE} ] ; then + echo "Status: 304" + echo "" + exit; +fi + +cc=`echo "${QUERY_STRING}" | sed -e s/%20/\ /g` +echo "Cache-Control: $cc" +echo "Last-Modified: Sat, 31 Oct 1981 06:00:00 GMT" +echo "Content-type: text/html"; +echo "" +echo "Hello World!" diff --git a/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_cachecontrol200.cgi b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_cachecontrol200.cgi new file mode 100755 index 0000000000..e44d5ed570 --- /dev/null +++ b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_cachecontrol200.cgi @@ -0,0 +1,9 @@ +#!/bin/bash +cc=`echo "${QUERY_STRING}" | sed -e s/%20/\ /g` +echo "Status: 200" +echo "Cache-Control: $cc" +echo "Last-Modified: Sat, 31 Oct 1981 06:00:00 GMT" +echo "Content-type: text/html"; +echo "X-Script: $0" +echo "" +echo "Hello World!" diff --git a/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_etag200.cgi b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_etag200.cgi new file mode 100755 index 0000000000..0966abfdd1 --- /dev/null +++ b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_etag200.cgi @@ -0,0 +1,5 @@ +#!/bin/bash +echo "ETag: foo" +echo "Content-type: text/html"; +echo "" +echo "Hello World!" diff --git a/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_etag304.cgi b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_etag304.cgi new file mode 100755 index 0000000000..91a4b922bd --- /dev/null +++ b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_etag304.cgi @@ -0,0 +1,11 @@ +#!/bin/bash +if [ ! -z ${HTTP_IF_NONE_MATCH} ] ; then + echo "Status: 304" + echo "" + exit; +fi + +echo "ETag: foo" +echo "Content-type: text/html"; +echo "" +echo "Hello World!" diff --git a/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_expires200.cgi b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_expires200.cgi new file mode 100755 index 0000000000..e18ebc86ad --- /dev/null +++ b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_expires200.cgi @@ -0,0 +1,5 @@ +#!/bin/bash +echo "Expires: Sat, 31 Oct 1981 6:00:00 GMT" +echo "Content-type: text/html"; +echo "" +echo "Hello World!" diff --git a/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_expires304.cgi b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_expires304.cgi new file mode 100755 index 0000000000..1c7de1cd77 --- /dev/null +++ b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_expires304.cgi @@ -0,0 +1,11 @@ +#!/bin/bash +if [ ${HTTP_IF_MODIFIED_SINCE} == "Mon, 30 Oct 2028 14:19:41 GMT" ] ; then + echo "Status: 304" + echo "" + exit; +fi + +echo "Expires: Mon, 30 Oct 2028 14:19:41 GMT" +echo "Content-type: text/html"; +echo "" +echo "Hello World!" diff --git a/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_expires500.cgi b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_expires500.cgi new file mode 100755 index 0000000000..9615c4f0bd --- /dev/null +++ b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_expires500.cgi @@ -0,0 +1,11 @@ +#!/bin/bash +if [ ! -z ${HTTP_IF_MODIFIED_SINCE} ] ; then + echo "Status: 500" + echo "" + exit; +fi + +echo "Expires: Mon, 30 Oct 2028 14:19:41 GMT" +echo "Content-type: text/html"; +echo "" +echo "Hello World!" diff --git a/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_lastModified200.cgi b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_lastModified200.cgi new file mode 100755 index 0000000000..5dc219b1e7 --- /dev/null +++ b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_lastModified200.cgi @@ -0,0 +1,5 @@ +#!/bin/bash +echo "Last-Modified: Sat, 31 Oct 1981 6:00:00 GMT" +echo "Content-type: text/html"; +echo "" +echo "Hello World!" diff --git a/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_lastModified304.cgi b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_lastModified304.cgi new file mode 100755 index 0000000000..bdf23bed2f --- /dev/null +++ b/tests/auto/network/access/qabstractnetworkcache/tests/httpcachetest_lastModified304.cgi @@ -0,0 +1,11 @@ +#!/bin/bash +if [ ${HTTP_IF_MODIFIED_SINCE} == "Sat, 31 Oct 1981 06:00:00 GMT" ] ; then + echo "Status: 304" + echo "" + exit; +fi + +echo "Last-Modified: Sat, 31 Oct 1981 06:00:00 GMT" +echo "Content-type: text/html"; +echo "" +echo "Hello World!" |