File: file_CSP_main_spec_compliant.js

package info (click to toggle)
iceweasel 31.8.0esr-1~deb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,373,164 kB
  • sloc: cpp: 3,717,015; ansic: 1,797,386; python: 206,412; java: 180,622; asm: 133,557; xml: 89,501; sh: 72,014; perl: 22,087; makefile: 21,970; objc: 4,014; yacc: 1,995; pascal: 1,292; lex: 950; exp: 449; lisp: 228; awk: 211; php: 113; sed: 43; csh: 31; ada: 16; ruby: 3
file content (16 lines) | stat: -rw-r--r-- 524 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// some javascript for the CSP XHR tests
//

try {
  var xhr_good = new XMLHttpRequest();
  var xhr_good_uri ="http://mochi.test:8888/tests/content/base/test/csp/file_CSP.sjs?testid=xhr_spec_compliant_good";
  xhr_good.open("GET", xhr_good_uri, true);
  xhr_good.send(null);
} catch(e) {}

try {
  var xhr_bad = new XMLHttpRequest();
  var xhr_bad_uri ="http://example.com/tests/content/base/test/csp/file_CSP.sjs?testid=xhr_spec_compliant_bad";
  xhr_bad.open("GET", xhr_bad_uri, true);
  xhr_bad.send(null);
} catch(e) {}