diff options
Diffstat (limited to 'test/test-csp-inline.html')
-rw-r--r-- | test/test-csp-inline.html | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/test/test-csp-inline.html b/test/test-csp-inline.html deleted file mode 100644 index 4f6dce16e..000000000 --- a/test/test-csp-inline.html +++ /dev/null @@ -1,61 +0,0 @@ -<!doctype html> -<html> - <head> - <link rel="stylesheet" type="text/css" href="../bower_components/qunit/qunit/qunit.css"/> - <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'nonce-abc';"> - </head> - <body> - - <h1 id="qunit-header">SystemJS Test Suite</h1> - - <h2 id="qunit-banner"></h2> - <div id="qunit-testrunner-toolbar"></div> - <h2 id="qunit-userAgent"></h2> - <ol id="qunit-tests"></ol> - <div id="qunit-test-area"></div> - - <script src="../dist/system.src.js" type="text/javascript"></script> - <script src="../bower_components/qunit/qunit/qunit.js"></script> - - <script nonce='abc'> - QUnit.config.testTimeout = 2000; - - QUnit.module("SystemJS nonce"); - - function err(e) { - setTimeout(function() { - throw e.stack || e; - start(); - }); - } - - asyncTest('Importing a script with a good nonce', function() { - System.config({ - meta: { - 'tests/csp/nonce.js': { - nonce: 'abc' - } - } - }); - System['import']('tests/csp/nonce.js').then(function(m) { - ok(m.nonce === 'abc'); - start(); - }); - }); - - asyncTest('Importing a script with a bad nonce', function() { - System.config({ - meta: { - 'tests/csp/nonce2.js': { - nonce: 'asdf' - } - } - }); - System['import']('tests/csp/nonce2.js').then(function(m) { - ok(m.nonce !== 'ab'); - start(); - }); - }); - </script> - </body> -</html> |