OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 function testLogText() { | 5 function testLogText() { |
6 var divLogs = document.getElementById('log-entries'); | 6 var divLogs = document.getElementById('log-entries'); |
7 assertNotEquals(null, divLogs, "The <div> with logs not found."); | 7 assertNotEquals(null, divLogs, "The <div> with logs not found."); |
8 assertNotEquals(null, | 8 assertNotEquals(null, |
9 divLogs.innerHTML.match(/text test text/), | 9 divLogs.innerHTML.match(/text for testing/), |
10 "The logged text not found."); | 10 "The logged text not found."); |
| 11 assertEquals(null, |
| 12 divLogs.innerHTML.match(/<script>/), |
| 13 "The logged text was not escaped."); |
11 } | 14 } |
OLD | NEW |