Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / console / console-assert.html
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/console-test.js"></script>
5 <script>
6
7 function b()
8 {
9     console.assert(false, 1);
10     console.assert(false, "a", "b");
11 }
12
13 function a()
14 {
15     b();
16 }
17
18 function test()
19 {
20     var callCount = 0;
21     function callback()
22     {
23         if (++callCount === 2)
24             InspectorTest.expandConsoleMessages(onExpandedMessages);
25     }
26
27     function onExpandedMessages()
28     {
29         InspectorTest.dumpConsoleMessages();
30         InspectorTest.completeTest();
31     }
32
33     InspectorTest.evaluateInPage("setTimeout(a, 0)");
34     InspectorTest.addConsoleSniffer(callback, true);
35 }
36
37 </script>
38 </head>
39
40 <body onload="runTest()">
41 <p>
42 Tests that console.assert() will dump a message and stack trace with source URLs and line numbers.
43 </p>
44
45 </body>
46 </html>