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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/search/search-in-static.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="../inspector-test.js"></script> 3 <script src="../inspector-test.js"></script>
4 <script src="../resources-test.js"></script> 4 <script src="../resources-test.js"></script>
5 <script src="search-test.js"></script> 5 <script src="search-test.js"></script>
6 <script> 6 <script>
7 function test() 7 function test()
8 { 8 {
9 InspectorTest.runAfterResourcesAreFinished(["search.js"], step2); 9 InspectorTest.runAfterResourcesAreFinished(["search.js"], step2);
10 var resource; 10 var resource;
11 var staticContentProvider; 11 var staticContentProvider;
12 12
13 function step2() 13 function step2()
14 { 14 {
15 resource = WebInspector.resourceForURL("http://127.0.0.1:8000/inspector/ search/resources/search.js"); 15 resource = WebInspector.resourceForURL("http://127.0.0.1:8000/inspector/ search/resources/search.js");
16 resource.requestContent(step3); 16 resource.requestContent().then(step3);
17 } 17 }
18 18
19 function step3() 19 function step3()
20 { 20 {
21 staticContentProvider = new WebInspector.StaticContentProvider(WebInspec tor.resourceTypes.Script, resource.content); 21 staticContentProvider = new WebInspector.StaticContentProvider(WebInspec tor.resourceTypes.Script, resource.content);
22 InspectorTest.addResult(resource.url); 22 InspectorTest.addResult(resource.url);
23 23
24 var text = "searchTestUniqueString"; 24 var text = "searchTestUniqueString";
25 staticContentProvider.searchInContent(text, true, false, step4); 25 staticContentProvider.searchInContent(text, true, false, step4);
26 } 26 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 </script> 59 </script>
60 </head> 60 </head>
61 <body> 61 <body>
62 <p>Tests static content provider search.</p> 62 <p>Tests static content provider search.</p>
63 <a href="https://bugs.webkit.org/show_bug.cgi?id=70354">Bug 70354</a> 63 <a href="https://bugs.webkit.org/show_bug.cgi?id=70354">Bug 70354</a>
64 64
65 <iframe src="resources/search.html" onload="runTest()"> 65 <iframe src="resources/search.html" onload="runTest()">
66 </body> 66 </body>
67 </html> 67 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698