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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/styles-2/get-set-stylesheet-text.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 <style> 4 <style>
5 5
6 /* An inline stylesheet */ 6 /* An inline stylesheet */
7 body.mainpage { 7 body.mainpage {
8 text-decoration: none; 8 text-decoration: none;
9 } 9 }
10 </style> 10 </style>
(...skipping 11 matching lines...) Expand all
22 22
23 findStyleSheet(); 23 findStyleSheet();
24 24
25 function findStyleSheet() 25 function findStyleSheet()
26 { 26 {
27 var styleSheetHeaders = InspectorTest.cssModel.styleSheetHeaders(); 27 var styleSheetHeaders = InspectorTest.cssModel.styleSheetHeaders();
28 for (var i = 0; i < styleSheetHeaders.length; ++i) { 28 for (var i = 0; i < styleSheetHeaders.length; ++i) {
29 styleSheetHeader = styleSheetHeaders[i]; 29 styleSheetHeader = styleSheetHeaders[i];
30 if (styleSheetHeader.sourceURL.indexOf("get-set-stylesheet-text.css" ) >= 0) { 30 if (styleSheetHeader.sourceURL.indexOf("get-set-stylesheet-text.css" ) >= 0) {
31 foundStyleSheetHeader = styleSheetHeader; 31 foundStyleSheetHeader = styleSheetHeader;
32 foundStyleSheetHeader.requestContent(callback); 32 foundStyleSheetHeader.requestContent().then(callback);
33 } 33 }
34 if (!foundStyleSheetHeader) 34 if (!foundStyleSheetHeader)
35 InspectorTest.cssModel.addEventListener(WebInspector.CSSStyleMod el.Events.StyleSheetAdded, styleSheetAdded); 35 InspectorTest.cssModel.addEventListener(WebInspector.CSSStyleMod el.Events.StyleSheetAdded, styleSheetAdded);
36 } 36 }
37 37
38 function callback(content) 38 function callback(content)
39 { 39 {
40 foundStyleSheetText = content; 40 foundStyleSheetText = content;
41 InspectorTest.runTestSuite([ testSetText, testNewElementStyles ]); 41 InspectorTest.runTestSuite([ testSetText, testNewElementStyles ]);
42 } 42 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 </script> 112 </script>
113 </head> 113 </head>
114 114
115 <body onload="runTest()"> 115 <body onload="runTest()">
116 <p> 116 <p>
117 Tests that WebInspector.CSSStyleSheet methods work as expected. 117 Tests that WebInspector.CSSStyleSheet methods work as expected.
118 </p> 118 </p>
119 <h1 id="inspected">Inspect Me</h1> 119 <h1 id="inspected">Inspect Me</h1>
120 </body> 120 </body>
121 </html> 121 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698