OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
4 <script src="../../http/tests/inspector/console-test.js"></script> | 4 <script src="../../http/tests/inspector/console-test.js"></script> |
5 <script> | 5 <script> |
6 function onload() | 6 function onload() |
7 { | 7 { |
8 console.log('%cColors are awesome.', 'color: blue;'); | 8 console.log('%cColors are awesome.', 'color: blue;'); |
9 console.log('%cSo are fonts!', 'font: 1em Helvetica;'); | 9 console.log('%cSo are fonts!', 'font: 1em Helvetica;'); |
10 console.log('%cAnd borders and margins and paddings!', 'border: 1px solid re
d; margin: 20px; padding: 10px;'); | 10 console.log('%cAnd borders and margins and paddings!', 'border: 1px solid re
d; margin: 20px; padding: 10px;'); |
11 console.log('%ctext-* is fine by us!', 'text-decoration: none;'); | 11 console.log('%ctext-* is fine by us!', 'text-decoration: none;'); |
12 | 12 |
13 console.log('%cDisplay, on the other hand, is bad news.', 'display: none;'); | 13 console.log('%cDisplay, on the other hand, is bad news.', 'display: none;'); |
14 console.log('%cAnd position too.', 'position: absolute;'); | 14 console.log('%cAnd position too.', 'position: absolute;'); |
15 console.log('%cAnd URL is not allowed as a value .', 'background-image: url(
"http://example.com/cookies")'); | 15 console.log('%cAnd URL is not allowed as a value .', 'background-image: url(
"http://example.com/cookies")'); |
16 runTest(); | 16 runTest(); |
17 } | 17 } |
| 18 //# sourceURL=console-format-style-whitelist.html |
| 19 </script> |
18 | 20 |
| 21 <script> |
19 function test() | 22 function test() |
20 { | 23 { |
21 InspectorTest.expandConsoleMessages(onExpanded); | 24 InspectorTest.expandConsoleMessages(onExpanded); |
22 | 25 |
23 function onExpanded() | 26 function onExpanded() |
24 { | 27 { |
25 InspectorTest.dumpConsoleMessagesWithStyles(); | 28 InspectorTest.dumpConsoleMessagesWithStyles(); |
26 InspectorTest.completeTest(); | 29 InspectorTest.completeTest(); |
27 } | 30 } |
28 } | 31 } |
29 </script> | 32 </script> |
30 </head> | 33 </head> |
31 | 34 |
32 <body onload="onload()"> | 35 <body onload="onload()"> |
33 <p>Tests that console logging dumps properly styled messages, and that | 36 <p>Tests that console logging dumps properly styled messages, and that |
34 the whole message gets the same style, regardless of multiple %c | 37 the whole message gets the same style, regardless of multiple %c |
35 settings.</p> | 38 settings.</p> |
36 </body> | 39 </body> |
37 </html> | 40 </html> |
OLD | NEW |