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/elements-test.js"></script> | 4 <script src="../../http/tests/inspector/elements-test.js"></script> |
5 <style> | 5 <style> |
6 /* comment */.inline-style-added-by-parser { | 6 /* comment */.inline-style-added-by-parser { |
7 color: red; | 7 color: red; |
8 } | 8 } |
9 </style> | 9 </style> |
10 <style> | 10 <style> |
11 .inline-style-added-by-parser-with-source-url { | 11 .inline-style-added-by-parser-with-source-url { |
12 color: green; | 12 color: green; |
13 } | 13 } |
14 /*@ sourceURL=inlineStyleAddedByParser.css*/ | 14 /*# sourceURL=inlineStyleAddedByParser.css*/ |
15 </style> | 15 </style> |
16 <script> | 16 <script> |
17 document.write("<style>\n.inline-style-added-by-parser-in-document-write {\n c
olor: blue;\n}\n</style>"); | 17 document.write("<style>\n.inline-style-added-by-parser-in-document-write {\n c
olor: blue;\n}\n</style>"); |
18 document.write("<style>\n.inline-style-added-by-document-write-with-source-url {
\n color: yellow;\n}\n/*@ sourceURL=inlineStyleAddedByDocumentWrite.css*/\n</s
tyle>"); | 18 document.write("<style>\n.inline-style-added-by-document-write-with-source-url {
\n color: yellow;\n}\n/*# sourceURL=inlineStyleAddedByDocumentWrite.css*/\n</s
tyle>"); |
19 addStyleElement(".inline-style-created-by-script {\n color: orange;\n}"); | 19 addStyleElement(".inline-style-created-by-script {\n color: orange;\n}"); |
20 addStyleElement(".inline-style-created-by-script-with-source-url {\n color: gr
ey;\n}\n/*@ sourceURL=inlineStyleCreatedByScript.css*/"); | 20 addStyleElement(".inline-style-created-by-script-with-source-url {\n color: gr
ey;\n}\n/*# sourceURL=inlineStyleCreatedByScript.css*/"); |
21 | 21 |
22 function addStyleElement(styleContent) | 22 function addStyleElement(styleContent) |
23 { | 23 { |
24 var styleElement = document.createElement("style"); | 24 var styleElement = document.createElement("style"); |
25 styleElement.textContent = styleContent; | 25 styleElement.textContent = styleContent; |
26 document.head.appendChild(styleElement); | 26 document.head.appendChild(styleElement); |
27 } | 27 } |
28 | 28 |
29 var test = function() | 29 var test = function() |
30 { | 30 { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 } | 69 } |
70 </script> | 70 </script> |
71 </head> | 71 </head> |
72 <body onload="runTest()"> | 72 <body onload="runTest()"> |
73 <p>Tests that different types of inline styles are correctly disambiguated and t
heir sourceURL is correct. | 73 <p>Tests that different types of inline styles are correctly disambiguated and t
heir sourceURL is correct. |
74 <div id="inspected" style="color:red" class="inline-style-added-by-parser inline
-style-added-by-parser-with-source-url inline-style-added-by-parser-in-document-
write inline-style-added-by-document-write-with-source-url inline-style-created-
by-script inline-style-created-by-script-with-source-url"></div> | 74 <div id="inspected" style="color:red" class="inline-style-added-by-parser inline
-style-added-by-parser-with-source-url inline-style-added-by-parser-in-document-
write inline-style-added-by-document-write-with-source-url inline-style-created-
by-script inline-style-created-by-script-with-source-url"></div> |
75 </body> | 75 </body> |
76 </html> | 76 </html> |
77 | 77 |
78 | 78 |
OLD | NEW |