Bug 1142083 - Add test for IDN Unicode domain redirect r=mcmanus

This commit is contained in:
Valentin Gosu 2015-06-20 00:03:57 +03:00
Родитель c91754df8d
Коммит b691ca8d67
5 изменённых файлов: 59 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,16 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
This page does nothing. If the loading page managed to load this, the test
probably succeeded.
</body>
</html>

Просмотреть файл

@ -10,6 +10,9 @@ support-files =
web_packaged_app.sjs
signed_web_packaged_app.sjs
file_loadinfo_redirectchain.sjs
redirect_idn.html^headers^
redirect_idn.html
empty.html
[test_arraybufferinputstream.html]
[test_partially_cached_content.html]
@ -30,3 +33,4 @@ skip-if = e10s || buildapp != 'browser'
[test_web_packaged_app.html]
[test_loadinfo_redirectchain.html]
skip-if = buildapp == 'b2g' #no ssl support
[test_idn_redirect.html]

Просмотреть файл

Просмотреть файл

@ -0,0 +1,3 @@
HTTP 301 Moved Permanently
Location: http://exämple.test/tests/netwerk/test/mochitests/empty.html
X-Comment: Bug 1142083 - This is a redirect to http://exämple.test

Просмотреть файл

@ -0,0 +1,36 @@
<!DOCTYPE HTML>
<html>
<!--
Bug 1142083 - IDN Unicode domain redirect is broken
This test loads redirectme.html which is redirected simple_test.html, on a different IDN domain.
A message is posted to that page, with responds with another.
Upon receiving that message, we consider that the IDN redirect has functioned properly, since the intended page was loaded.
-->
<head>
<title>Test for URI Manipulation</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<pre id="test">
<script type="text/javascript">
SimpleTest.waitForExplicitFinish();
var iframe = document.createElement("iframe");
iframe.src = "about:blank";
iframe.addEventListener("load", finishTest);
document.body.appendChild(iframe);
iframe.src = "http://mochi.test:8888/tests/netwerk/test/mochitests/redirect_idn.html";
function finishTest(e) {
ok(true);
SimpleTest.finish();
}
</script>
</body>
</html>