2 function createClickHandler(result, str) {
4 console.assert(result, "%s", str);
18 for (var i = 0; i < tests.length; ++i) {
26 var button = document.createElement("button");
27 button.innerText = "console.assert(" + test + "): should" + (result ? " not" : "") + " assert";
28 button.onclick = createClickHandler(result, test);
29 var p = document.createElement("p");
30 p.appendChild(button);
31 document.body.appendChild(p);
35 <body onload="load()">
36 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=19134">Bug 19134: Inspector should support console.assert</a>.</p>
37 <p>To test, click the buttons below and look at the Inspector's Console.</p>