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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/coverage/reveal-autoformat.html

Issue 2888843002: DevTools: fix race when revealing formatted source code (Closed)
Patch Set: rebased Created 3 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/coverage/CoverageListView.js » ('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="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/debugger-test.js"></script> 4 <script src="../../http/tests/inspector/debugger-test.js"></script>
5 <script src="../../http/tests/inspector/sources-test.js"></script> 5 <script src="../../http/tests/inspector/sources-test.js"></script>
6 <script src="coverage-test.js"></script> 6 <script src="coverage-test.js"></script>
7 7
8 <link rel="stylesheet" type="text/css" href="resources/decorations-after-inplace -formatter.css"> 8 <link rel="stylesheet" type="text/css" href="resources/decorations-after-inplace -formatter.css">
9 <link rel="stylesheet" type="text/css" href="resources/long-mangled.css"> 9 <link rel="stylesheet" type="text/css" href="resources/long-mangled.css">
10 10
11 <script> 11 <script>
12 async function test() 12 async function test()
13 { 13 {
14 InspectorTest.startCoverage(); 14 InspectorTest.startCoverage();
15 await InspectorTest.evaluateInPagePromise("performActions()"); 15 await InspectorTest.evaluateInPagePromise("performActions()");
16 await InspectorTest.stopCoverage(); 16 await InspectorTest.stopCoverage();
17 var node = InspectorTest.findCoverageNodeForURL("long-mangled.css"); 17 var node = InspectorTest.findCoverageNodeForURL("long-mangled.css");
18 var coverageListView = self.runtime.sharedInstance(Coverage.CoverageView)._l istView; 18 var coverageListView = self.runtime.sharedInstance(Coverage.CoverageView)._l istView;
19 var decoratePromise = InspectorTest.addSnifferPromise(Coverage.CoverageView. LineDecorator.prototype, "_innerDecorate"); 19 var decoratePromise = InspectorTest.addSnifferPromise(Coverage.CoverageView. LineDecorator.prototype, "_innerDecorate");
20 coverageListView._revealSourceForNode(node); 20 node.select();
21 coverageListView._revealSourceForSelectedNode();
21 await decoratePromise; 22 await decoratePromise;
22 InspectorTest.addResult("The below should be formatted"); 23 InspectorTest.addResult("The below should be formatted");
23 InspectorTest.dumpDecorationsInSourceFrame(UI.panels.sources.visibleView); 24 InspectorTest.dumpDecorationsInSourceFrame(UI.panels.sources.visibleView);
24 25
25 26
26 node = InspectorTest.findCoverageNodeForURL("decorations-after-inplace-forma tter.css"); 27 node = InspectorTest.findCoverageNodeForURL("decorations-after-inplace-forma tter.css");
28 node.select();
27 decoratePromise = InspectorTest.addSnifferPromise(Coverage.CoverageView.Line Decorator.prototype, "_innerDecorate"); 29 decoratePromise = InspectorTest.addSnifferPromise(Coverage.CoverageView.Line Decorator.prototype, "_innerDecorate");
28 coverageListView._revealSourceForNode(node); 30 coverageListView._revealSourceForSelectedNode();
29 await decoratePromise; 31 await decoratePromise;
30 InspectorTest.addResult("The below should NOT be formatted"); 32 InspectorTest.addResult("The below should NOT be formatted");
31 InspectorTest.dumpDecorationsInSourceFrame(UI.panels.sources.visibleView); 33 InspectorTest.dumpDecorationsInSourceFrame(UI.panels.sources.visibleView);
32 34
33 InspectorTest.completeTest(); 35 InspectorTest.completeTest();
34 } 36 }
35 </script> 37 </script>
36 </head> 38 </head>
37 <p id="id">PASS</p> 39 <p id="id">PASS</p>
38 <body onload="runTest()"> 40 <body onload="runTest()">
39 <p>Tests the CSS highlight in sources after the Pretty print formatting.</p> 41 <p>Tests the CSS highlight in sources after the Pretty print formatting.</p>
40 </body> 42 </body>
41 </html> 43 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/coverage/CoverageListView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698