blob: a31659dba30069290ed20691219e7f29208ab564 [file] [log] [blame]
<!DOCTYPE html>
<title>Harness Test: Special characters in test results shouldn't break harness and tools.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
var special_characters = ['\\', '\r\n'];
for (var i = 0; i < 32; i++) {
special_characters.push(String.fromCharCode(i));
}
special_characters.forEach(function(c) {
test(function() {
assert_true(true);
}, 'Unescaped ' + c + ' in test name.');
test(function() {
assert_true(true);
}, 'Escaped ' + format_value(c) + ' in test name.');
test(function() {
throw new Error('Expected Error: ' + c + ' character.');
}, 'Unescaped ' + format_value(c) + ' in test message.');
test(function() {
throw new Error('Expected Error: ' + format_value(c) + ' character.');
}, 'Escaped ' + format_value(c) + ' in test message.');
});
</script>