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

Side by Side Diff: LayoutTests/http/tests/inspector/styles/resources/stylesheet-tracking-iframe.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 <style type="text/css" media="screen"> 3 <style type="text/css" media="screen">
4 body { background:green; } 4 body { background:green; }
5 </style> 5 </style>
6 <script> 6 <script>
7 var styleElements = []; 7 var styleElements = [];
8 function handleMessage(event) 8 function handleMessage(event)
9 { 9 {
10 function addStyleSheet(styleContent) 10 function addStyleSheet(styleContent)
11 { 11 {
12 var styleElement = document.createElement("style"); 12 var styleElement = document.createElement("style");
13 styleElement.textContent = styleContent; 13 styleElement.textContent = styleContent;
14 document.head.appendChild(styleElement); 14 document.head.appendChild(styleElement);
15 styleElements.push(styleElement); 15 styleElements.push(styleElement);
16 } 16 }
17 17
18 switch (event.data) { 18 switch (event.data) {
19 case "addStyleSheets": 19 case "addStyleSheets":
20 addStyleSheet("body { background-color: yellow; }"); 20 addStyleSheet("body { background-color: yellow; }");
21 addStyleSheet("body { background-color: yellow; }\n/*@ sourceURL=stylesh eet-added-in-iframe.css */"); 21 addStyleSheet("body { background-color: yellow; }\n/*# sourceURL=stylesh eet-added-in-iframe.css */");
22 break; 22 break;
23 case "removeStyleSheets": 23 case "removeStyleSheets":
24 for (var i = 0; i < styleElements.length; ++i) 24 for (var i = 0; i < styleElements.length; ++i)
25 document.head.removeChild(styleElements[i]); 25 document.head.removeChild(styleElements[i]);
26 styleElements = []; 26 styleElements = [];
27 break; 27 break;
28 } 28 }
29 } 29 }
30 30
31 window.addEventListener("message", handleMessage, false); 31 window.addEventListener("message", handleMessage, false);
32 </script> 32 </script>
33 </head> 33 </head>
34 34
35 <body> 35 <body>
36 </body> 36 </body>
37 37
38 </html> 38 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698