Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: LayoutTests/inspector/styles/dynamic-style-tag.html

Issue 15832007: DevTools: Add support for //# sourceURL (sourceMappingURL) comments and deprecate //@ ones (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698