2015-06-29 18:24:01 +03:00
<!DOCTYPE HTML>
< html >
<!--
This checks if the right policies are applied from a given string (including whitespace, invalid policy strings, etc). It doesn't do a complete check for all load types; that's done in another test.
https://bugzilla.mozilla.org/show_bug.cgi?id=704320
-->
< head >
< meta charset = "utf-8" >
< title > Test policies for Bug 704320< / title >
2019-04-16 06:53:28 +03:00
< script src = "/tests/SimpleTest/SimpleTest.js" > < / script >
2015-06-29 18:24:01 +03:00
< script type = "application/javascript" src = "referrerHelper.js" > < / script >
< link rel = "stylesheet" type = "text/css" href = "/tests/SimpleTest/test.css" / >
2017-02-23 00:10:07 +03:00
< script type = "application/javascript" >
2015-06-29 18:24:01 +03:00
SimpleTest.waitForExplicitFinish();
var advance = function() { tests.next(); };
/**
* This is the main test routine -- serialized by use of a generator.
* It resets the counter, then performs two tests in sequence using
* the same iframe.
*/
2016-12-01 12:11:32 +03:00
var tests = (function*() {
2015-06-29 18:24:01 +03:00
var iframe = document.getElementById("testframe");
const sjs = "/tests/dom/base/test/bug704320.sjs?action=generate-policy-test";
yield resetCounter();
yield iframe.src = sjs + "& policy=" + escape(' \f\r\n\t ');
yield checkIndividualResults("whitespace only policy", ["full"]);
2016-12-01 12:11:32 +03:00
// complete.
SimpleTest.finish();
2015-06-29 18:24:01 +03:00
})();
< / script >
< / head >
< body onload = "tests.next();" >
< iframe id = "testframe" > < / iframe >
< / body >
< / html >