OLD | NEW |
---|---|
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 | 3 |
4 <style type="text/css" media="screen"> | 4 <style type="text/css" media="screen"> |
5 #main { background:blue; } | 5 #main { background:blue; } |
6 </style> | 6 </style> |
7 | 7 |
8 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 8 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
9 <script src="../../../http/tests/inspector/elements-test.js"></script> | 9 <script src="../../../http/tests/inspector/elements-test.js"></script> |
10 <script> | 10 <script> |
11 | 11 |
12 function injectStyleSheet(context) | 12 function injectStyleSheet(context) |
13 { | 13 { |
14 var styleSheet = "#main { color: red; -webkit-border-image: url(data:image/p ng;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAiElEQVR42r2RsQrDMAxEBR dl8SDcX8lQPGg1GBI6lvz/h7QyRRXV0qUULwfvwZ1tenw5PxToRPWMC52eA9+WDnlh3HFQ/xBQl86NFY JqeGflkiogrOvVlIFhqURFVho3x1moGAa3deMs+LS30CAhBN5nNxeT5hbJ1zwmji2k+aF6NENIPf/hs5 4f0sZFUVAMigAAAABJRU5ErkJggg==) } #iframeBody { background: red }"; | 14 var styleSheet = "#main { color: red; -webkit-border-image: url(data:image/p ng;base64," + decodeURIComponent("iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAA AAiElEQVR42r2RsQrDMAxEBRdl8SDcX8lQPGg1GBI6lvz/h7QyRRXV0qUULwfvwZ1tenw5PxToRPWMC5 2eA9+WDnlh3HFQ/xBQl86NFYJqeGflkiogrOvVlIFhqURFVho3x1moGAa3deMs+LS30CAhBN5nNxeT5h bJ1zwmji2k+aF6NENIPf/hs54f0sZFUVAMigAAAABJRU5ErkJggg==") + ") } #iframeBody { b ackground: red }"; |
Timothy Loh
2015/09/25 14:22:05
what does decodeURIComponent do here?
nainar
2015/09/28 01:19:18
Done.
| |
15 if (context.testRunner) | 15 if (context.testRunner) |
16 context.testRunner.insertStyleSheet(styleSheet); | 16 context.testRunner.insertStyleSheet(styleSheet); |
17 } | 17 } |
18 | 18 |
19 function preRunTest() { | 19 function preRunTest() { |
20 injectStyleSheet(window); | 20 injectStyleSheet(window); |
21 runTest(); | 21 runTest(); |
22 } | 22 } |
23 | 23 |
24 function loadIframe() | 24 function loadIframe() |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 </head> | 56 </head> |
57 | 57 |
58 <body onload="preRunTest()"> | 58 <body onload="preRunTest()"> |
59 <p> | 59 <p> |
60 Tests that injected user stylesheets are reflected in the Styles pane. | 60 Tests that injected user stylesheets are reflected in the Styles pane. |
61 </p> | 61 </p> |
62 | 62 |
63 <div id="main"></div> | 63 <div id="main"></div> |
64 </body> | 64 </body> |
65 </html> | 65 </html> |
OLD | NEW |