<!DOCTYPEHTML> <!-- Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<head>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript">
function check_styles() { var redText = document.getElementById('red-text'); var greenText = document.getElementById('green-text'); var blueText = document.getElementById('blue-text'); var redTextColor = window.getComputedStyle(redText).getPropertyValue('color'); var greenTextColor = window.getComputedStyle(greenText).getPropertyValue('color'); var blueTextColor = window.getComputedStyle(blueText).getPropertyValue('color');
ok(redTextColor == 'rgb(255, 0, 0)', "The first part should be red.");
ok(greenTextColor == 'rgb(0, 255, 0)', "The second part should be green.");
ok(blueTextColor == 'rgb(0, 0, 255)', "The third part should be blue.");
}
SimpleTest.waitForExplicitFinish();
window.onload = function() {
check_styles();
SimpleTest.finish();
}
</script>
<script>
function good_correctHashCORSLoaded() {
ok(true, "A CORS cross-domain stylesheet with correct hash was correctly loaded.");
}
function bad_correctHashCORSBlocked() {
ok(false, "We should load CORS cross-domain stylesheets with hashes that match!");
}
function good_correctHashBlocked() {
ok(true, "A non-CORS cross-domain stylesheet with correct hash was correctly blocked.");
}
function bad_correctHashLoaded() {
ok(false, "We should block non-CORS cross-domain stylesheets with hashes that match!");
}
function good_incorrectHashBlocked() {
ok(true, "A non-CORS cross-domain stylesheet with incorrect hash was correctly blocked.");
}
function bad_incorrectHashLoaded() {
ok(false, "We should load non-CORS cross-domain stylesheets with incorrect hashes!");
}
function bad_correctDataBlocked() {
ok(false, "We should not block non-CORS cross-domain stylesheets in data: URI!");
}
function good_correctDataLoaded() {
ok(true, "A non-CORS cross-domain stylesheet with data: URI was correctly loaded.");
}
function bad_correctDataCORSBlocked() {
ok(false, "We should not block CORS stylesheets in data: URI!");
}
function good_correctDataCORSLoaded() {
ok(true, "A CORS stylesheet with data: URI was correctly loaded.");
}
function good_correctHashOpaqueBlocked() {
ok(true, "A non-CORS(Opaque) cross-domain stylesheet with correct hash was correctly blocked.");
}
function bad_correctHashOpaqueLoaded() {
ok(false, "We should not load non-CORS(Opaque) cross-domain stylesheets with correct hashes!");
}
</script>
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.