summaryrefslogtreecommitdiffstats
path: root/chrome/test/data
diff options
context:
space:
mode:
authormmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-14 21:28:32 +0000
committermmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-14 21:28:32 +0000
commite602696544fd704597a8ea2c907ffbcb0f688df4 (patch)
tree82c1032031c1e6cfe87ef43b367dd7bd24b5a4fa /chrome/test/data
parentbcba8aa49bfc2db2a74b042a22784b58ed005fc0 (diff)
downloadchromium_src-e602696544fd704597a8ea2c907ffbcb0f688df4.zip
chromium_src-e602696544fd704597a8ea2c907ffbcb0f688df4.tar.gz
chromium_src-e602696544fd704597a8ea2c907ffbcb0f688df4.tar.bz2
Captive portals intercept all HTTP requests until the user
has logged in, like at Starbucks and airports. When behind one, all SSL requests timeout after a potentially substantial delay. This CL Adds a CaptivePortalTabHelper which triggers captive portal checks when an SSL load is taking too long. If a captive portal is found, opens a login tab. Whenever the new tab is navigated, we check again for a captive portal. Once we discover the portal is gone, we reload the original tab. design doc: https://docs.google.com/a/chromium.org/document/d/1k-gP2sswzYNvryu9NcgN7q5XrsMlUdlUdoW9WRaEmfM/edit R=cbentzel@chromium.org,avi@chromium.org BUG=87100, 115487 Review URL: https://chromiumcodereview.appspot.com/10020051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142242 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data')
-rw-r--r--chrome/test/data/captive_portal/iframe_timeout.html12
-rw-r--r--chrome/test/data/captive_portal/login.html19
-rw-r--r--chrome/test/data/captive_portal/login.html.mock-http-headers2
-rw-r--r--chrome/test/data/captive_portal/page204.html1
-rw-r--r--chrome/test/data/captive_portal/page204.html.mock-http-headers3
5 files changed, 37 insertions, 0 deletions
diff --git a/chrome/test/data/captive_portal/iframe_timeout.html b/chrome/test/data/captive_portal/iframe_timeout.html
new file mode 100644
index 0000000..36286ca
--- /dev/null
+++ b/chrome/test/data/captive_portal/iframe_timeout.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+<title>Iframe Timeout</title>
+
+</head>
+<body>
+This iframe will fail to load with an HTTPS connection timeout.
+"mock.failed.request" is the magic hostname used by URLRequestFailedJob,
+and -118 is CONNECTION_TIMED_OUT.
+<iframe src="https://mock.failed.request/-118"></iframe>
+</body>
+</html>
diff --git a/chrome/test/data/captive_portal/login.html b/chrome/test/data/captive_portal/login.html
new file mode 100644
index 0000000..ffc3130
--- /dev/null
+++ b/chrome/test/data/captive_portal/login.html
@@ -0,0 +1,19 @@
+<html>
+<head>
+<title>Fake Login Page</title>
+
+<script>
+
+function submitForm() {
+ document.getElementById('form').submit();
+}
+
+</script>
+
+</head>
+<body>
+<form id='form' action="login.html" method="post">
+<input type="submit" value="Login" />
+</form>
+</body>
+</html>
diff --git a/chrome/test/data/captive_portal/login.html.mock-http-headers b/chrome/test/data/captive_portal/login.html.mock-http-headers
new file mode 100644
index 0000000..2da6d2c
--- /dev/null
+++ b/chrome/test/data/captive_portal/login.html.mock-http-headers
@@ -0,0 +1,2 @@
+HTTP/1.0 200 Just Peachy
+
diff --git a/chrome/test/data/captive_portal/page204.html b/chrome/test/data/captive_portal/page204.html
new file mode 100644
index 0000000..64322a2
--- /dev/null
+++ b/chrome/test/data/captive_portal/page204.html
@@ -0,0 +1 @@
+<title>This page intentionally left blank</title>
diff --git a/chrome/test/data/captive_portal/page204.html.mock-http-headers b/chrome/test/data/captive_portal/page204.html.mock-http-headers
new file mode 100644
index 0000000..cc9dc4b
--- /dev/null
+++ b/chrome/test/data/captive_portal/page204.html.mock-http-headers
@@ -0,0 +1,3 @@
+HTTP/1.0 204 No Content
+Content-Length: 0
+