1 // Tiny test rig for all security/link-crossorigin-*.html tests,
2 // which exercise <link> + CORS variations.
4 self.jsTestIsAsync = true;
6 if (window.testRunner) {
7 testRunner.dumpAsText();
8 testRunner.waitUntilDone();
11 // The common case is to have four sub-tests. To override
12 // for a test, assign window.test_count.
13 var default_test_count = 4;
16 test_count = window.test_count || default_test_count;
18 function finish(pass, msg) {
20 testPassed(msg || "");
22 testFailed(msg || "");
23 if (++event_count >= test_count)
27 function pass() { finish(true); }
28 function fail() { finish(false); }