Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / harness-tests / special-characters.html
bloba31659dba30069290ed20691219e7f29208ab564
1 <!DOCTYPE html>
2 <title>Harness Test: Special characters in test results shouldn't break harness and tools.</title>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script>
7 var special_characters = ['\\', '\r\n'];
8 for (var i = 0; i < 32; i++) {
9 special_characters.push(String.fromCharCode(i));
12 special_characters.forEach(function(c) {
13 test(function() {
14 assert_true(true);
15 }, 'Unescaped ' + c + ' in test name.');
17 test(function() {
18 assert_true(true);
19 }, 'Escaped ' + format_value(c) + ' in test name.');
21 test(function() {
22 throw new Error('Expected Error: ' + c + ' character.');
23 }, 'Unescaped ' + format_value(c) + ' in test message.');
25 test(function() {
26 throw new Error('Expected Error: ' + format_value(c) + ' character.');
27 }, 'Escaped ' + format_value(c) + ' in test message.');
28 });
30 </script>