Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / console / console-message-format.html
blob1646300ce0d96e3d77b27b48baf34b3f606b857a
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>
7 function onload()
9 console.log('Message format number %i, %d and %f', 1, 2, 3.5);
10 console.log('Message %s for %s', 'format', 'string');
11 console.log('Object %o', {'foo' : 'bar' });
12 console.log("Floating as integers: %d %i", 42.5, 42.5);
13 console.log("Floating as is: %f", 42.5);
14 console.log("Non-numbers as numbers: %d %i %f", document, null, "document");
15 console.log("String as is: %s", "string");
16 console.log("Object as string: %s", document);
18 runTest();
21 function test()
23 InspectorTest.dumpConsoleMessages();
24 InspectorTest.completeTest();
26 </script>
27 </head>
29 <body onload="onload()">
30 <p id="p">Tests that console logging uses proper message formatting.</p>
31 </body>
32 </html>