Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / harness-tests / escape-bad-characters.html
blobe6e80aac7ffa3a29b5e188bf056988854163af4e
1 <!DOCTYPE html>
2 <title>Harness Test: No unescaped characters that break tools in test output.</title>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script>
7 // Run child test in an iframe so that we can validate the output
8 // generated by testharnessreport.js.
9 var childTest = document.createElement('iframe');
10 childTest.src = './resources/escape-bad-characters-input.html';
12 window.onload = function() {
13 document.body.appendChild(childTest);
16 var crTest =
17 async_test('No unescaped carriage returns in testharnessreport.js output.');
18 var nullTest =
19 async_test('No unescaped null characters in testharnessreport.js output.');
21 // Receive output from child test and make sure it has no problematic characters.
22 window.addEventListener('message', function(event) {
23 if (event.data.type === 'child_test_done') {
24 document.body.removeChild(childTest);
26 crTest.step(function() {
27 assert_equals(event.data.result.indexOf('\r'), -1);
28 });
29 crTest.done();
31 nullTest.step(function() {
32 assert_equals(event.data.result.indexOf('\0'), -1);
33 });
34 nullTest.done();
36 });
38 </script>