Update web-platform-tests to revision a46616a5b18e83587ddbbed756c7b96cbb4b015d

This commit is contained in:
Josh Matthews 2017-06-19 19:07:14 -04:00 committed by Ms2ger
parent 3f07cfec7c
commit 578498ba24
4001 changed files with 159517 additions and 30260 deletions

View file

@ -277,7 +277,7 @@ window.onload =
// Per https://w3c.github.io/resource-timing/#performanceresourcetiming:
// "[If redirected, startTime] MUST return the same value as redirectStart. Otherwise,
// [startTime] MUST return the same value as fetchStart."
assert_true(actual.startTime == actual.redirectStart || actual.startTime == actual.fetchStart,
assert_in_array(actual.startTime, [actual.redirectStart, actual.fetchStart],
"startTime must be equal to redirectStart or fetchStart.");
// redirectStart <= redirectEnd <= fetchStart <= domainLookupStart <= domainLookupEnd <= connectStart

View file

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Resource Timing TAO tests</title>
<link rel="author" title="Google" href="http://www.google.com/" />
<link rel="help" href="https://www.w3.org/TR/resource-timing-2/#timing-allow-origin"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/webperftestharness.js"></script>
<script src="resources/webperftestharnessextension.js"></script>
<script>
setup({explicit_done: true});
// explicitly test the namespace before we start testing
test_namespace("getEntriesByType");
var d;
var iframe;
var iframeBody;
var image;
var random = Math.random();
function setup_iframe() {
iframe = document.getElementById('frameContext');
d = iframe.contentWindow.document;
iframeBody = d.body;
iframe.addEventListener('load', onload_test, false);
}
function onload_test() {
if (window.performance.getEntriesByType === undefined) {
done();
return;
}
var context = new PerformanceContext(iframe.contentWindow.performance);
var entries = context.getEntriesByType('resource');
if(entries.length > 0) {
entry = entries[0];
test_not_equals((entry.redirectStart + entry.redirectEnd + entry.domainLookupStart + entry.domainLookupEnd + entry.connectStart + entry.connectEnd + entry.secureConnectionStart + entry.requestStart + entry.responseStart), 0, 'redirectStart, redirectEnd, domainLookupStart, domainLookupEnd, connectStart, connectEnd, secureConnectionStart, requestStart, and responseStart -- should NOT be all returned as 0 when the Timing-Allow-Origin header value list contains a case-sensitive match for the value of the origin of the current document and TAO algorithm passes');
}
done();
}
window.setup_iframe = setup_iframe;
</script>
</head>
<body>
<h1>Description</h1>
<p>This test validates that for a cross origin resource, the timing allow check algorithm will pass when the Timing-Allow-Origin header value list contains a case-sensitive match for the value of the origin of the current document.</p>
<div id="log"></div>
<iframe id="frameContext" src="resources/iframe_TAO_match_origin.html"></iframe>
</body>
</html>

View file

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Resource Timing TAO tests</title>
<link rel="author" title="Google" href="http://www.google.com/" />
<link rel="help" href="https://www.w3.org/TR/resource-timing-2/#timing-allow-origin"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/webperftestharness.js"></script>
<script src="resources/webperftestharnessextension.js"></script>
<script>
setup({explicit_done: true});
// explicitly test the namespace before we start testing
test_namespace("getEntriesByType");
var d;
var iframe;
var iframeBody;
var image;
var random = Math.random();
function setup_iframe() {
iframe = document.getElementById('frameContext');
d = iframe.contentWindow.document;
iframeBody = d.body;
iframe.addEventListener('load', onload_test, false);
}
function onload_test() {
if (window.performance.getEntriesByType === undefined) {
done();
return;
}
var context = new PerformanceContext(iframe.contentWindow.performance);
var entries = context.getEntriesByType('resource');
if(entries.length > 0) {
entry = entries[0];
test_not_equals((entry.redirectStart + entry.redirectEnd + entry.domainLookupStart + entry.domainLookupEnd + entry.connectStart + entry.connectEnd + entry.secureConnectionStart + entry.requestStart + entry.responseStart), 0, 'redirectStart, redirectEnd, domainLookupStart, domainLookupEnd, connectStart, connectEnd, secureConnectionStart, requestStart, and responseStart -- should NOT be all returned as 0 when the Timing-Allow-Origin header value list contains a wildcard ("*") and TAO algorithm passes');
}
done();
}
window.setup_iframe = setup_iframe;
</script>
</head>
<body>
<h1>Description</h1>
<p>This test validates that for a cross origin resource, the timing allow check algorithm will pass when the Timing-Allow-Origin header value list contains a wildcard ("*").</p>
<div id="log"></div>
<iframe id="frameContext" src="resources/iframe_TAO_match_wildcard.html"></iframe>
</body>
</html>

View file

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Resource Timing TAO tests</title>
<link rel="author" title="Google" href="http://www.google.com/" />
<link rel="help" href="https://www.w3.org/TR/resource-timing-2/#timing-allow-origin"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/webperftestharness.js"></script>
<script src="resources/webperftestharnessextension.js"></script>
<script>
setup({explicit_done: true});
// explicitly test the namespace before we start testing
test_namespace("getEntriesByType");
var d;
var iframe;
var iframeBody;
var image;
var random = Math.random();
function setup_iframe() {
iframe = document.getElementById('frameContext');
d = iframe.contentWindow.document;
iframeBody = d.body;
iframe.addEventListener('load', onload_test, false);
}
function onload_test() {
if (window.performance.getEntriesByType === undefined) {
done();
return;
}
var context = new PerformanceContext(iframe.contentWindow.performance);
var entries = context.getEntriesByType('resource');
if(entries.length > 0) {
entry = entries[0];
test_not_equals((entry.redirectStart + entry.redirectEnd + entry.domainLookupStart + entry.domainLookupEnd + entry.connectStart + entry.connectEnd + entry.secureConnectionStart + entry.requestStart + entry.responseStart), 0, 'redirectStart, redirectEnd, domainLookupStart, domainLookupEnd, connectStart, connectEnd, secureConnectionStart, requestStart, and responseStart -- should not be all returned as 0 when the HTTP response has multiple Timing-Allow-Origin header fields and the subsequent field value is separated by a comma, i.e. TAO algorithm passes');
}
done();
}
window.setup_iframe = setup_iframe;
</script>
</head>
<body>
<h1>Description</h1>
<p>This test validates that for a cross origin resource, the timing allow check algorithm will pass when the HTTP response has multiple Timing-Allow-Origin header fields and the subsequent field value is separated by a comma.</p>
<div id="log"></div>
<iframe id="frameContext" src="resources/iframe_TAO_multi.html"></iframe>
</body>
</html>

View file

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Resource Timing TAO tests</title>
<link rel="author" title="Google" href="http://www.google.com/" />
<link rel="help" href="https://www.w3.org/TR/resource-timing-2/#timing-allow-origin"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/webperftestharness.js"></script>
<script src="resources/webperftestharnessextension.js"></script>
<script>
setup({explicit_done: true});
// explicitly test the namespace before we start testing
test_namespace("getEntriesByType");
var d;
var iframe;
var iframeBody;
var image;
var random = Math.random();
function setup_iframe() {
iframe = document.getElementById('frameContext');
d = iframe.contentWindow.document;
iframeBody = d.body;
iframe.addEventListener('load', onload_test, false);
}
function onload_test() {
if (window.performance.getEntriesByType === undefined) {
done();
return;
}
var context = new PerformanceContext(iframe.contentWindow.performance);
var entries = context.getEntriesByType('resource');
if(entries.length > 0) {
entry = entries[0];
test_equals((entry.redirectStart + entry.redirectEnd + entry.domainLookupStart + entry.domainLookupEnd + entry.connectStart + entry.connectEnd + entry.secureConnectionStart + entry.requestStart + entry.responseStart), 0, 'redirectStart, redirectEnd, domainLookupStart, domainLookupEnd, connectStart, connectEnd, secureConnectionStart, requestStart, and responseStart -- should be all returned as 0 when the value of Timing-Allow-Origin is null and TAO algorithm fails');
}
done();
}
window.setup_iframe = setup_iframe;
</script>
</head>
<body>
<h1>Description</h1>
<p>This test validates that for a cross origin resource, the timing allow check algorithm will fail when the value of Timing-Allow-Origin is null.</p>
<div id="log"></div>
<iframe id="frameContext" src="resources/iframe_TAO_null.html"></iframe>
</body>
</html>

View file

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Resource Timing TAO tests</title>
<link rel="author" title="Google" href="http://www.google.com/" />
<link rel="help" href="https://www.w3.org/TR/resource-timing-2/#timing-allow-origin"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/webperftestharness.js"></script>
<script src="resources/webperftestharnessextension.js"></script>
<script>
setup({explicit_done: true});
// explicitly test the namespace before we start testing
test_namespace("getEntriesByType");
var d;
var iframe;
var iframeBody;
var image;
var random = Math.random();
function setup_iframe() {
iframe = document.getElementById('frameContext');
d = iframe.contentWindow.document;
iframeBody = d.body;
iframe.addEventListener('load', onload_test, false);
}
function onload_test() {
if (window.performance.getEntriesByType === undefined) {
done();
return;
}
var context = new PerformanceContext(iframe.contentWindow.performance);
var entries = context.getEntriesByType('resource');
if(entries.length > 0) {
entry = entries[0];
test_not_equals((entry.redirectStart + entry.redirectEnd + entry.domainLookupStart + entry.domainLookupEnd + entry.connectStart + entry.connectEnd + entry.secureConnectionStart + entry.requestStart + entry.responseStart), 0, 'redirectStart, redirectEnd, domainLookupStart, domainLookupEnd, connectStart, connectEnd, secureConnectionStart, requestStart, and responseStart -- should NOT be all returned as 0 when the value of Timing-Allow-Origin is a case-sensitive match for the value of the origin of the current document and TAO algorithm passes');
}
done();
}
window.setup_iframe = setup_iframe;
</script>
</head>
<body>
<h1>Description</h1>
<p>This test validates that for a cross origin resource, the timing allow check algorithm will pass when the value of Timing-Allow-Origin is a case-sensitive match for the value of the origin of the current document.</p>
<div id="log"></div>
<iframe id="frameContext" src="resources/iframe_TAO_origin.html"></iframe>
</body>
</html>

View file

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Resource Timing TAO tests</title>
<link rel="author" title="Google" href="http://www.google.com/" />
<link rel="help" href="https://www.w3.org/TR/resource-timing-2/#timing-allow-origin"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/webperftestharness.js"></script>
<script src="resources/webperftestharnessextension.js"></script>
<script>
setup({explicit_done: true});
// explicitly test the namespace before we start testing
test_namespace("getEntriesByType");
var d;
var iframe;
var iframeBody;
var image;
var random = Math.random();
function setup_iframe() {
iframe = document.getElementById('frameContext');
d = iframe.contentWindow.document;
iframeBody = d.body;
iframe.addEventListener('load', onload_test, false);
}
function onload_test() {
if (window.performance.getEntriesByType === undefined) {
done();
return;
}
var context = new PerformanceContext(iframe.contentWindow.performance);
var entries = context.getEntriesByType('resource');
if(entries.length > 0) {
entry = entries[0];
test_equals((entry.redirectStart + entry.redirectEnd + entry.domainLookupStart + entry.domainLookupEnd + entry.connectStart + entry.connectEnd + entry.secureConnectionStart + entry.requestStart + entry.responseStart), 0, 'redirectStart, redirectEnd, domainLookupStart, domainLookupEnd, connectStart, connectEnd, secureConnectionStart, requestStart, and responseStart -- should be all returned as 0 when the value of Timing-Allow-Origin is NOT a case-sensitive match for the value of the origin of the current document and TAO algorithm passes');
}
done();
}
window.setup_iframe = setup_iframe;
</script>
</head>
<body>
<h1>Description</h1>
<p>This test validates that for a cross origin resource, the timing allow check algorithm will fail when the value of Timing-Allow-Origin is NOT a case-sensitive match for the value of the origin of the current document.</p>
<div id="log"></div>
<iframe id="frameContext" src="resources/iframe_TAO_origin_uppercase.html"></iframe>
</body>
</html>

View file

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Resource Timing TAO tests</title>
<link rel="author" title="Google" href="http://www.google.com/" />
<link rel="help" href="https://www.w3.org/TR/resource-timing-2/#timing-allow-origin"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/webperftestharness.js"></script>
<script src="resources/webperftestharnessextension.js"></script>
<script>
setup({explicit_done: true});
// explicitly test the namespace before we start testing
test_namespace("getEntriesByType");
var d;
var iframe;
var iframeBody;
var image;
var random = Math.random();
function setup_iframe() {
iframe = document.getElementById('frameContext');
d = iframe.contentWindow.document;
iframeBody = d.body;
iframe.addEventListener('load', onload_test, false);
}
function onload_test() {
if (window.performance.getEntriesByType === undefined) {
done();
return;
}
var context = new PerformanceContext(iframe.contentWindow.performance);
var entries = context.getEntriesByType('resource');
if(entries.length > 0) {
entry = entries[0];
test_equals((entry.redirectStart + entry.redirectEnd + entry.domainLookupStart + entry.domainLookupEnd + entry.connectStart + entry.connectEnd + entry.secureConnectionStart + entry.requestStart + entry.responseStart), 0, 'redirectStart, redirectEnd, domainLookupStart, domainLookupEnd, connectStart, connectEnd, secureConnectionStart, requestStart, and responseStart -- should be all returned as 0 when the Timing-Allow-Origin header value of the HTTP response is a space separated origin/wildcard list');
}
done();
}
window.setup_iframe = setup_iframe;
</script>
</head>
<body>
<h1>Description</h1>
<p>This test validates that for a cross origin resource, the timing allow check algorithm will fail if the Timing-Allow-Origin header value list contains [origin|*]{2,}, separated by space.</p>
<div id="log"></div>
<iframe id="frameContext" src="resources/iframe_TAO_space.html"></iframe>
</body>
</html>

View file

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Resource Timing TAO tests</title>
<link rel="author" title="Google" href="http://www.google.com/" />
<link rel="help" href="https://www.w3.org/TR/resource-timing-2/#timing-allow-origin"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/webperftestharness.js"></script>
<script src="resources/webperftestharnessextension.js"></script>
<script>
setup({explicit_done: true});
// explicitly test the namespace before we start testing
test_namespace("getEntriesByType");
var d;
var iframe;
var iframeBody;
var image;
var random = Math.random();
function setup_iframe() {
iframe = document.getElementById('frameContext');
d = iframe.contentWindow.document;
iframeBody = d.body;
iframe.addEventListener('load', onload_test, false);
}
function onload_test() {
if (window.performance.getEntriesByType === undefined) {
done();
return;
}
var context = new PerformanceContext(iframe.contentWindow.performance);
var entries = context.getEntriesByType('resource');
if(entries.length > 0) {
entry = entries[0];
test_not_equals((entry.redirectStart + entry.redirectEnd + entry.domainLookupStart + entry.domainLookupEnd + entry.connectStart + entry.connectEnd + entry.secureConnectionStart + entry.requestStart + entry.responseStart), 0, "redirectStart, redirectEnd, domainLookupStart, domainLookupEnd, connectStart, connectEnd, secureConnectionStart, requestStart, and responseStart -- should NOT be all returned as 0 when the Timing-Allow-Origin header value is a wildcard ('*') and TAO algorithm pass");
}
done();
}
window.setup_iframe = setup_iframe;
</script>
</head>
<body>
<h1>Description</h1>
<p>This test validates that for a cross origin resource, the timing allow check algorithm will pass when the Timing-Allow-Origin header value is a wildcard ("*").</p>
<div id="log"></div>
<iframe id="frameContext" src="resources/iframe_TAO_wildcard.html"></iframe>
</body>
</html>

View file

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Resource Timing TAO tests</title>
<link rel="author" title="Google" href="http://www.google.com/" />
<link rel="help" href="https://www.w3.org/TR/resource-timing-2/#timing-allow-origin"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/webperftestharness.js"></script>
<script src="resources/webperftestharnessextension.js"></script>
<script>
setup({explicit_done: true});
// explicitly test the namespace before we start testing
test_namespace("getEntriesByType");
var d;
var iframe;
var iframeBody;
var image;
var random = Math.random();
function setup_iframe() {
iframe = document.getElementById('frameContext');
d = iframe.contentWindow.document;
iframeBody = d.body;
iframe.addEventListener('load', onload_test, false);
}
function onload_test() {
if (window.performance.getEntriesByType === undefined) {
done();
return;
}
var context = new PerformanceContext(iframe.contentWindow.performance);
var entries = context.getEntriesByType('resource');
if(entries.length > 0) {
entry = entries[0];
test_equals((entry.redirectStart + entry.redirectEnd + entry.domainLookupStart + entry.domainLookupEnd + entry.connectStart + entry.connectEnd + entry.secureConnectionStart + entry.requestStart + entry.responseStart), 0, "redirectStart, redirectEnd, domainLookupStart, domainLookupEnd, connectStart, connectEnd, secureConnectionStart, requestStart, and responseStart -- should be all returned as 0 when the HTTP response includes zero Timing-Allow-Origin header value and TAO algorithm fails");
}
done();
}
window.setup_iframe = setup_iframe;
</script>
</head>
<body>
<h1>Description</h1>
<p>This test validates that for a cross origin resource, the timing allow check algorithm will fail when the HTTP response includes zero Timing-Allow-Origin header value.</p>
<div id="log"></div>
<iframe id="frameContext" src="resources/iframe_TAO_zero.html"></iframe>
</body>
</html>

View file

@ -0,0 +1,38 @@
def main(request, response):
origin = request.headers['origin']
response.headers.set('Access-Control-Allow-Origin', origin)
tao = request.GET.first('tao')
if tao == 'zero':
# zero TAO value, fail
pass
elif tao == 'wildcard':
# wildcard, pass
response.headers.set('Timing-Allow-Origin', '*')
elif tao == 'null':
# null, fail
response.headers.set('Timing-Allow-Origin', 'null')
elif tao == 'origin':
# case-sensitive match for origin, pass
response.headers.set('Timing-Allow-Origin', origin)
elif tao == 'space':
# space seperated list of origin and wildcard, fail
response.headers.set('Timing-Allow-Origin', (origin + ' *'))
elif tao == 'multi':
# more than one TAO values, seperated by common, pass
response.headers.set('Timing-Allow-Origin', origin)
response.headers.append('Timing-Allow-Origin', '*')
elif tao == 'match_origin':
# contains a match of origin, seperated by common, pass
response.headers.set('Timing-Allow-Origin', origin)
response.headers.append('Timing-Allow-Origin', "fake")
elif tao == 'match_wildcard':
# contains a wildcard, seperated by common, pass
response.headers.set('Timing-Allow-Origin', "fake")
response.headers.append('Timing-Allow-Origin', '*')
elif tao == 'uppercase':
# non-case-sensitive match for origin, fail
response.headers.set('Timing-Allow-Origin', origin.upper())
else:
pass

View file

@ -0,0 +1,21 @@
<body>
<script>
function dirname(path) {
return path.replace(/\/[^\/]*$/, '/');
}
function request() {
var dirName = dirname(location.href);
var client = new XMLHttpRequest,
// create a cross-origin request
url = dirName.replace('://', '://www.') + 'TAOResponse.py?tao=match_origin';
client.open("GET", url, false);
client.send(null);
}
if(window.parent.setup_iframe) {
window.parent.setup_iframe();
request();
}
</script>
</body>

View file

@ -0,0 +1,21 @@
<body>
<script>
function dirname(path) {
return path.replace(/\/[^\/]*$/, '/');
}
function request() {
var dirName = dirname(location.href);
var client = new XMLHttpRequest,
// create a cross-origin request
url = dirName.replace('://', '://www.') + 'TAOResponse.py?tao=match_wildcard';
client.open("GET", url, false);
client.send(null);
}
if(window.parent.setup_iframe) {
window.parent.setup_iframe();
request();
}
</script>
</body>

View file

@ -0,0 +1,21 @@
<body>
<script>
function dirname(path) {
return path.replace(/\/[^\/]*$/, '/');
}
function request() {
var dirName = dirname(location.href);
var client = new XMLHttpRequest,
// create a cross-origin request
url = dirName.replace('://', '://www.') + 'TAOResponse.py?tao=multi';
client.open("GET", url, false);
client.send(null);
}
if(window.parent.setup_iframe) {
window.parent.setup_iframe();
request();
}
</script>
</body>

View file

@ -0,0 +1,21 @@
<body>
<script>
function dirname(path) {
return path.replace(/\/[^\/]*$/, '/');
}
function request() {
var dirName = dirname(location.href);
var client = new XMLHttpRequest,
// create a cross-origin request
url = dirName.replace('://', '://www.') + 'TAOResponse.py?tao=null';
client.open("GET", url, false);
client.send(null);
}
if(window.parent.setup_iframe) {
window.parent.setup_iframe();
request();
}
</script>
</body>

View file

@ -0,0 +1,21 @@
<body>
<script>
function dirname(path) {
return path.replace(/\/[^\/]*$/, '/');
}
function request() {
var dirName = dirname(location.href);
var client = new XMLHttpRequest,
// create a cross-origin request
url = dirName.replace('://', '://www.') + 'TAOResponse.py?tao=origin';
client.open("GET", url, false);
client.send(null);
}
if(window.parent.setup_iframe) {
window.parent.setup_iframe();
request();
}
</script>
</body>

View file

@ -0,0 +1,21 @@
<body>
<script>
function dirname(path) {
return path.replace(/\/[^\/]*$/, '/');
}
function request() {
var dirName = dirname(location.href);
var client = new XMLHttpRequest,
// create a cross-origin request
url = dirName.replace('://', '://www.') + 'TAOResponse.py?tao=uppercase';
client.open("GET", url, false);
client.send(null);
}
if(window.parent.setup_iframe) {
window.parent.setup_iframe();
request();
}
</script>
</body>

View file

@ -0,0 +1,21 @@
<body>
<script>
function dirname(path) {
return path.replace(/\/[^\/]*$/, '/');
}
function request() {
var dirName = dirname(location.href);
var client = new XMLHttpRequest,
// create a cross-origin request
url = dirName.replace('://', '://www.') + 'TAOResponse.py?tao=space';
client.open("GET", url, false);
client.send(null);
}
if(window.parent.setup_iframe) {
window.parent.setup_iframe();
request();
}
</script>
</body>

View file

@ -0,0 +1,21 @@
<body>
<script>
function dirname(path) {
return path.replace(/\/[^\/]*$/, '/');
}
function request() {
var dirName = dirname(location.href);
var client = new XMLHttpRequest,
// create a cross-origin request
url = dirName.replace('://', '://www.') + 'TAOResponse.py?tao=wildcard';
client.open("GET", url, false);
client.send(null);
}
if(window.parent.setup_iframe) {
window.parent.setup_iframe();
request();
}
</script>
</body>

View file

@ -0,0 +1,21 @@
<body>
<script>
function dirname(path) {
return path.replace(/\/[^\/]*$/, '/');
}
function request() {
var dirName = dirname(location.href);
var client = new XMLHttpRequest,
// create a cross-origin request
url = dirName.replace('://', '://www.') + 'TAOResponse.py?tao=zero';
client.open("GET", url, false);
client.send(null);
}
if(window.parent.setup_iframe) {
window.parent.setup_iframe();
request();
}
</script>
</body>