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

Side by Side Diff: trunk/LayoutTests/http/tests/inspector/elements/styles/edit-css-with-source-url.html

Issue 196743008: Revert 169371 "DevTools: defer styles delta calculation to until..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 9 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
« no previous file with comments | « no previous file | trunk/LayoutTests/inspector/audits/audits-panel-functional-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../inspector-test.js"></script> 3 <script src="../../inspector-test.js"></script>
4 <script src="../../debugger-test.js"></script> 4 <script src="../../debugger-test.js"></script>
5 <script src="../../elements-test.js"></script> 5 <script src="../../elements-test.js"></script>
6 <script src="../../isolated-filesystem-test.js"></script> 6 <script src="../../isolated-filesystem-test.js"></script>
7 <script> 7 <script>
8 function loadStylesheet(line0, line1, line2) 8 function loadStylesheet(line0, line1, line2)
9 { 9 {
10 var styleText = "#inspected {\n color: red;\n}\n"; 10 var styleText = "#inspected {\n color: red;\n}\n";
(...skipping 15 matching lines...) Expand all
26 InspectorTest.testFileSystemMapping._fileSystemMappingSetting = new Insp ectorTest.MockSetting({}); 26 InspectorTest.testFileSystemMapping._fileSystemMappingSetting = new Insp ectorTest.MockSetting({});
27 WebInspector.workspace._fileSystemMapping = InspectorTest.testFileSystem Mapping; 27 WebInspector.workspace._fileSystemMapping = InspectorTest.testFileSystem Mapping;
28 manager = InspectorTest.createIsolatedFileSystemManager(WebInspector.wor kspace, InspectorTest.testFileSystemMapping); 28 manager = InspectorTest.createIsolatedFileSystemManager(WebInspector.wor kspace, InspectorTest.testFileSystemMapping);
29 } 29 }
30 30
31 InspectorTest.runTestSuite([ 31 InspectorTest.runTestSuite([
32 function testEditingRulesInElementsPanelDoesNotAddSourceURLToOriginalFil e(next) 32 function testEditingRulesInElementsPanelDoesNotAddSourceURLToOriginalFil e(next)
33 { 33 {
34 var styleText = "#inspected {\n color: red;\n}\n"; 34 var styleText = "#inspected {\n color: red;\n}\n";
35 35
36 function loadStylesheet(callback)
37 {
38 InspectorTest.addResult("Loading stylesheet with sourceURL:");
39 InspectorTest.evaluateInPage("loadStylesheet()", callback);
40 }
41
36 function dumpUISourceCodeContents() 42 function dumpUISourceCodeContents()
37 { 43 {
38 InspectorTest.addResult("Dumping uiSourceCode content:"); 44 InspectorTest.addResult("Dumping uiSourceCode content:");
39 InspectorTest.addResult(uiSourceCode.workingCopy()); 45 InspectorTest.addResult(uiSourceCode.workingCopy());
40 } 46 }
41 47
42 var fileSystemPath = "/var/www"; 48 var fileSystemPath = "/var/www";
43 var fileSystemProjectId = WebInspector.FileSystemProjectDelegate.pro jectId(fileSystemPath); 49 var fileSystemProjectId = WebInspector.FileSystemProjectDelegate.pro jectId(fileSystemPath);
44 var files = {"/foo.css": styleText}; 50 var files = {"/foo.css": styleText};
45 createObjects(); 51 createObjects();
46 InspectorTest.addResult("Adding file system."); 52 InspectorTest.addResult("Adding file system.");
47 manager.addMockFileSystem(fileSystemPath); 53 manager.addMockFileSystem(fileSystemPath);
48 InspectorTest.addResult("Adding file system mapping."); 54 InspectorTest.addResult("Adding file system mapping.");
49 InspectorTest.testFileSystemMapping.addFileMapping(fileSystemPath, " http://localhost:8000/inspector/elements/styles/", "/"); 55 InspectorTest.testFileSystemMapping.addFileMapping(fileSystemPath, " http://localhost:8000/inspector/elements/styles/", "/");
50 manager.addFiles(fileSystemPath, files); 56 manager.addFiles(fileSystemPath, files);
51 var uiSourceCode = WebInspector.workspace.uiSourceCode(fileSystemPro jectId, "foo.css"); 57 var uiSourceCode = WebInspector.workspace.uiSourceCode(fileSystemPro jectId, "foo.css");
52 InspectorTest.showUISourceCode(uiSourceCode, didShowScriptSource); 58 InspectorTest.showUISourceCode(uiSourceCode, didShowScriptSource);
53 59
54 function didShowScriptSource(sourceFrame) 60 function didShowScriptSource(sourceFrame)
55 { 61 {
56 dumpUISourceCodeContents(); 62 dumpUISourceCodeContents();
57 InspectorTest.addResult("Loading stylesheet with sourceURL:"); 63 loadStylesheet(stylesheetLoaded);
58 WebInspector.cssModel.addEventListener(WebInspector.CSSStyleMode l.Events.StyleSheetAdded, stylesheetLoaded);
59 InspectorTest.evaluateInPage("loadStylesheet()");
60 } 64 }
61 65
62 function stylesheetLoaded() 66 function stylesheetLoaded()
63 { 67 {
64 WebInspector.cssModel.removeEventListener(WebInspector.CSSStyleM odel.Events.StyleSheetAdded, stylesheetLoaded);
65 InspectorTest.addResult("Stylesheet loaded."); 68 InspectorTest.addResult("Stylesheet loaded.");
66 WebInspector.inspectorView.showPanel("elements"); 69 WebInspector.inspectorView.showPanel("elements");
67 InspectorTest.selectNodeAndWaitForStyles("inspected", nodeSelect ed); 70 InspectorTest.selectNodeAndWaitForStyles("inspected", nodeSelect ed);
68 } 71 }
69 72
70 function nodeSelected() 73 function nodeSelected()
71 { 74 {
72 InspectorTest.addResult("Dumping matched rules:"); 75 InspectorTest.addResult("Dumping matched rules:");
73 InspectorTest.dumpSelectedElementStyles(true); 76 InspectorTest.dumpSelectedElementStyles(true);
74 InspectorTest.addResult("Editing styles from elements panel:"); 77 InspectorTest.addResult("Editing styles from elements panel:");
(...skipping 21 matching lines...) Expand all
96 } 99 }
97 ]); 100 ]);
98 }; 101 };
99 </script> 102 </script>
100 </head> 103 </head>
101 <body onload="runTest()"> 104 <body onload="runTest()">
102 <div id="inspected"></div> 105 <div id="inspected"></div>
103 <p>Tests file system project mappings.</p> 106 <p>Tests file system project mappings.</p>
104 </body> 107 </body>
105 </html> 108 </html>
OLDNEW
« no previous file with comments | « no previous file | trunk/LayoutTests/inspector/audits/audits-panel-functional-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698