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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sass/test-mapping-good.html

Issue 1609973002: DevTools: promisify ContentProvider.requestContent and all its clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaseline Created 4 years, 11 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 3
4 <link rel="stylesheet" href="resources/test-mapping-good.css"> 4 <link rel="stylesheet" href="resources/test-mapping-good.css">
5 5
6 <script src="../../http/tests/inspector/inspector-test.js"></script> 6 <script src="../../http/tests/inspector/inspector-test.js"></script>
7 <script src="../../http/tests/inspector/debugger-test.js"></script> 7 <script src="../../http/tests/inspector/debugger-test.js"></script>
8 <script src="./sass-test.js"></script> 8 <script src="./sass-test.js"></script>
9 <script> 9 <script>
10 10
11 function test() 11 function test()
12 { 12 {
13 var header = InspectorTest.cssModel.styleSheetHeaders().find(header => !!hea der.sourceMapURL) 13 var header = InspectorTest.cssModel.styleSheetHeaders().find(header => !!hea der.sourceMapURL)
14 InspectorTest.loadSourceMap(header, onSourceMapLoaded); 14 InspectorTest.loadSourceMap(header, onSourceMapLoaded);
15 InspectorTest.waitForScriptSource("test-mapping-good.css", onCSSLoaded); 15 InspectorTest.waitForScriptSource("test-mapping-good.css", onCSSLoaded);
16 InspectorTest.waitForScriptSource("test-mapping-good.scss", onSCSSLoaded); 16 InspectorTest.waitForScriptSource("test-mapping-good.scss", onSCSSLoaded);
17 17
18 var cssAST; 18 var cssAST;
19 var sassModels = new Map(); 19 var sassModels = new Map();
20 var sourceMap; 20 var sourceMap;
21 var mapping; 21 var mapping;
22 22
23 function onCSSLoaded(uiSourceCode) 23 function onCSSLoaded(uiSourceCode)
24 { 24 {
25 uiSourceCode.requestContentPromise() 25 uiSourceCode.requestContent()
26 .then(text => InspectorTest.parseCSS(uiSourceCode.url(), text)) 26 .then(text => InspectorTest.parseCSS(uiSourceCode.url(), text))
27 .then(ast => cssAST = ast) 27 .then(ast => cssAST = ast)
28 .then(maybeCreateMapping); 28 .then(maybeCreateMapping);
29 } 29 }
30 30
31 function onSCSSLoaded(uiSourceCode) 31 function onSCSSLoaded(uiSourceCode)
32 { 32 {
33 uiSourceCode.requestContentPromise() 33 uiSourceCode.requestContent()
34 .then(text => InspectorTest.parseSCSS(uiSourceCode.url(), text)) 34 .then(text => InspectorTest.parseSCSS(uiSourceCode.url(), text))
35 .then(ast => sassModels.set(ast.document.url, ast)) 35 .then(ast => sassModels.set(ast.document.url, ast))
36 .then(maybeCreateMapping); 36 .then(maybeCreateMapping);
37 } 37 }
38 38
39 function onSourceMapLoaded(sm) 39 function onSourceMapLoaded(sm)
40 { 40 {
41 sourceMap = sm; 41 sourceMap = sm;
42 maybeCreateMapping(); 42 maybeCreateMapping();
43 } 43 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 </script> 96 </script>
97 97
98 </head> 98 </head>
99 99
100 <body onload="runTest()"> 100 <body onload="runTest()">
101 <p>Verify CSSToSASSMapping rebaselines.</p> 101 <p>Verify CSSToSASSMapping rebaselines.</p>
102 </body> 102 </body>
103 </html> 103 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698