ction() {
        if (xhr.readyState != 4 ||
            (xhr.status != 200 && xhr.status != 302 && xhr.status != 0)) {
            return;
        }
        expected = xhr.responseText.split('\n');
        if (expected.length > 0 && expected[expected.length - 1] === '') {
            expected.pop();
        }
        expected.push('--- SUCCESS ---');
        window.addEventListener('test-output', outputReceived, false);
        var s = document.getElementsByTagName('script')[0];
        var st = document.c