File: xss.js

package info (click to toggle)
libjs-angular-gettext 2.3.8-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 292 kB
  • sloc: javascript: 1,596; python: 87; makefile: 17
file content (20 lines) | stat: -rw-r--r-- 493 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
var tests = {
    "Should not allow XSS": function (file) {
        return function () {
            browser.get("http://localhost:9000/test/fixtures/xss" + file + ".html");
            expect(element(by.css("body")).getText()).not.toBe("fail");
        };
    }
};

describe("XSS", function () {
    for (var key in tests) {
        it(key, tests[key](""));
    }
});

describe("XSS (no jQuery)", function () {
    for (var key in tests) {
        it(key, tests[key]("-nojquery"));
    }
});