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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/scripts-panel.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 <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/workspace-test.js"></script> 5 <script src="../../../http/tests/inspector/workspace-test.js"></script>
6 <script> 6 <script>
7 function test() 7 function test()
8 { 8 {
9 function dumpNavigator(sourcesNavigatorView) 9 function dumpNavigator(sourcesNavigatorView)
10 { 10 {
11 InspectorTest.addResult("Navigator:"); 11 InspectorTest.addResult("Navigator:");
12 InspectorTest.dumpNavigatorView(sourcesNavigatorView); 12 InspectorTest.dumpNavigatorView(sourcesNavigatorView);
13 } 13 }
14 14
15 function createNavigatorView() 15 function createNavigatorView()
16 { 16 {
17 var navigatorView = new WebInspector.SourcesNavigatorView(); 17 var navigatorView = new WebInspector.SourcesNavigatorView();
18 navigatorView.setWorkspace(InspectorTest.testWorkspace); 18 navigatorView.setWorkspace(InspectorTest.testWorkspace);
19 navigatorView.show(WebInspector.inspectorView.element); 19 navigatorView.show(WebInspector.inspectorView.element);
20 return navigatorView; 20 return navigatorView;
21 } 21 }
22 22
23 function createContentProvider(url) 23 function createContentProvider(url)
24 { 24 {
25 var contentProvider = new WebInspector.StaticContentProvider(WebInspecto r.resourceTypes.Script, ""); 25 var contentProvider = new WebInspector.StaticContentProvider(WebInspecto r.resourceTypes.Script, "");
26 contentProvider.requestContent = function(callback) 26 contentProvider.requestContent = function()
27 { 27 {
28 InspectorTest.addResult("Source requested for " + url); 28 InspectorTest.addResult("Source requested for " + url);
29 callback(""); 29 return Promise.resolve("");
30 }; 30 };
31 return contentProvider; 31 return contentProvider;
32 } 32 }
33 33
34 function createMockWorkspace() 34 function createMockWorkspace()
35 { 35 {
36 InspectorTest.createWorkspaceWithTarget(true); 36 InspectorTest.createWorkspaceWithTarget(true);
37 InspectorTest.testDebuggerProject = new WebInspector.ContentProviderBase dProject(InspectorTest.testWorkspace, "", WebInspector.projectTypes.Debugger, "" ); 37 InspectorTest.testDebuggerProject = new WebInspector.ContentProviderBase dProject(InspectorTest.testWorkspace, "", WebInspector.projectTypes.Debugger, "" );
38 return InspectorTest.testWorkspace; 38 return InspectorTest.testWorkspace;
39 } 39 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 next(); 109 next();
110 } 110 }
111 ]); 111 ]);
112 }; 112 };
113 </script> 113 </script>
114 </head> 114 </head>
115 <body onload="runTest()"> 115 <body onload="runTest()">
116 <p>Tests that scripts panel UI elements work as intended.</p> 116 <p>Tests that scripts panel UI elements work as intended.</p>
117 </body> 117 </body>
118 </html> 118 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698