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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sass/test-mapping-bad.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-bad.css"> 4 <link rel="stylesheet" href="resources/test-mapping-bad.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-bad.css", onCSSLoaded); 15 InspectorTest.waitForScriptSource("test-mapping-bad.css", onCSSLoaded);
16 InspectorTest.waitForScriptSource("test-mapping-bad.scss", onSCSSLoaded); 16 InspectorTest.waitForScriptSource("test-mapping-bad.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 21
22 function onCSSLoaded(uiSourceCode) 22 function onCSSLoaded(uiSourceCode)
23 { 23 {
24 uiSourceCode.requestContentPromise() 24 uiSourceCode.requestContent()
25 .then(text => InspectorTest.parseCSS(uiSourceCode.url(), text)) 25 .then(text => InspectorTest.parseCSS(uiSourceCode.url(), text))
26 .then(ast => cssAST = ast) 26 .then(ast => cssAST = ast)
27 .then(maybeCreateMapping); 27 .then(maybeCreateMapping);
28 } 28 }
29 29
30 function onSCSSLoaded(uiSourceCode) 30 function onSCSSLoaded(uiSourceCode)
31 { 31 {
32 uiSourceCode.requestContentPromise() 32 uiSourceCode.requestContent()
33 .then(text => InspectorTest.parseSCSS(uiSourceCode.url(), text)) 33 .then(text => InspectorTest.parseSCSS(uiSourceCode.url(), text))
34 .then(ast => sassModels.set(ast.document.url, ast)) 34 .then(ast => sassModels.set(ast.document.url, ast))
35 .then(maybeCreateMapping); 35 .then(maybeCreateMapping);
36 } 36 }
37 37
38 function onSourceMapLoaded(sm) 38 function onSourceMapLoaded(sm)
39 { 39 {
40 sourceMap = sm; 40 sourceMap = sm;
41 maybeCreateMapping(); 41 maybeCreateMapping();
42 } 42 }
(...skipping 11 matching lines...) Expand all
54 } 54 }
55 55
56 </script> 56 </script>
57 57
58 </head> 58 </head>
59 59
60 <body onload="runTest()"> 60 <body onload="runTest()">
61 <p>Verify that mapping is not valid for misaligned sources.</p> 61 <p>Verify that mapping is not valid for misaligned sources.</p>
62 </body> 62 </body>
63 </html> 63 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698