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

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

Issue 201363002: DevTools: defer styles delta calculation to until the end of the task. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing 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 | 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
42 function dumpUISourceCodeContents() 36 function dumpUISourceCodeContents()
43 { 37 {
44 InspectorTest.addResult("Dumping uiSourceCode content:"); 38 InspectorTest.addResult("Dumping uiSourceCode content:");
45 InspectorTest.addResult(uiSourceCode.workingCopy()); 39 InspectorTest.addResult(uiSourceCode.workingCopy());
46 } 40 }
47 41
48 var fileSystemPath = "/var/www"; 42 var fileSystemPath = "/var/www";
49 var fileSystemProjectId = WebInspector.FileSystemProjectDelegate.pro jectId(fileSystemPath); 43 var fileSystemProjectId = WebInspector.FileSystemProjectDelegate.pro jectId(fileSystemPath);
50 var files = {"/foo.css": styleText}; 44 var files = {"/foo.css": styleText};
51 createObjects(); 45 createObjects();
52 InspectorTest.addResult("Adding file system."); 46 InspectorTest.addResult("Adding file system.");
53 manager.addMockFileSystem(fileSystemPath); 47 manager.addMockFileSystem(fileSystemPath);
54 InspectorTest.addResult("Adding file system mapping."); 48 InspectorTest.addResult("Adding file system mapping.");
55 InspectorTest.testFileSystemMapping.addFileMapping(fileSystemPath, " http://localhost:8000/inspector/elements/styles/", "/"); 49 InspectorTest.testFileSystemMapping.addFileMapping(fileSystemPath, " http://localhost:8000/inspector/elements/styles/", "/");
56 manager.addFiles(fileSystemPath, files); 50 manager.addFiles(fileSystemPath, files);
57 var uiSourceCode = WebInspector.workspace.uiSourceCode(fileSystemPro jectId, "foo.css"); 51 var uiSourceCode = WebInspector.workspace.uiSourceCode(fileSystemPro jectId, "foo.css");
58 InspectorTest.showUISourceCode(uiSourceCode, didShowScriptSource); 52 InspectorTest.showUISourceCode(uiSourceCode, didShowScriptSource);
59 53
60 function didShowScriptSource(sourceFrame) 54 function didShowScriptSource(sourceFrame)
61 { 55 {
62 dumpUISourceCodeContents(); 56 dumpUISourceCodeContents();
63 loadStylesheet(stylesheetLoaded); 57 InspectorTest.addResult("Loading stylesheet with sourceURL:");
58 WebInspector.cssModel.addEventListener(WebInspector.CSSStyleMode l.Events.StyleSheetAdded, stylesheetLoaded);
59 InspectorTest.evaluateInPage("loadStylesheet()");
64 } 60 }
65 61
66 function stylesheetLoaded() 62 function stylesheetLoaded()
67 { 63 {
64 WebInspector.cssModel.removeEventListener(WebInspector.CSSStyleM odel.Events.StyleSheetAdded, stylesheetLoaded);
68 InspectorTest.addResult("Stylesheet loaded."); 65 InspectorTest.addResult("Stylesheet loaded.");
69 WebInspector.inspectorView.showPanel("elements"); 66 WebInspector.inspectorView.showPanel("elements");
70 InspectorTest.selectNodeAndWaitForStyles("inspected", nodeSelect ed); 67 InspectorTest.selectNodeAndWaitForStyles("inspected", nodeSelect ed);
71 } 68 }
72 69
73 function nodeSelected() 70 function nodeSelected()
74 { 71 {
75 InspectorTest.addResult("Dumping matched rules:"); 72 InspectorTest.addResult("Dumping matched rules:");
76 InspectorTest.dumpSelectedElementStyles(true); 73 InspectorTest.dumpSelectedElementStyles(true);
77 InspectorTest.addResult("Editing styles from elements panel:"); 74 InspectorTest.addResult("Editing styles from elements panel:");
(...skipping 21 matching lines...) Expand all
99 } 96 }
100 ]); 97 ]);
101 }; 98 };
102 </script> 99 </script>
103 </head> 100 </head>
104 <body onload="runTest()"> 101 <body onload="runTest()">
105 <div id="inspected"></div> 102 <div id="inspected"></div>
106 <p>Tests file system project mappings.</p> 103 <p>Tests file system project mappings.</p>
107 </body> 104 </body>
108 </html> 105 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/audits/audits-panel-functional-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698