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
3 // found in the LICENSE file.
5 function testLogText() {
6 var divLogs = document.getElementById('log-entries');
7 assertNotEquals(null, divLogs, "The <div> with logs not found.");
9 divLogs.innerHTML.match(/text for testing/),
10 "The logged text not found.");
12 divLogs.innerHTML.match(/<script>/),
13 "The logged text was not escaped.");
16 function testLogTextNotPresent() {
17 var divLogs = document.getElementById('log-entries');
18 assertNotEquals(null, divLogs, "The <div> with logs not found.");
20 divLogs.innerHTML.match(/text for testing/),
21 "The logged text was found, but should not.");