Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/inspector/tracing/timeline-style/parse-author-style-sheet.html |
| diff --git a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-style/parse-author-style-sheet.html b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-style/parse-author-style-sheet.html |
| index 91c39511ddcadbd2071701bd4a40a4eda2469889..2c09da21d72ef4d29544144aae36cc539a410e12 100644 |
| --- a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-style/parse-author-style-sheet.html |
| +++ b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-style/parse-author-style-sheet.html |
| @@ -5,14 +5,17 @@ |
| <script src="../../tracing-test.js"></script> |
| <script> |
| -function importStyle(onComplete) |
| +function importStyle() |
| { |
| + var callback; |
| + var promies = new Promise((fulfill) => callback = fulfill); |
| var link = document.createElement('link'); |
| link.setAttribute('rel', 'stylesheet'); |
| link.type = 'text/css'; |
| link.href = '../resources/style.css'; |
| - document.head.appendChild(link); |
| - link.onload = onComplete.bind(this, null); |
| + document.head.appendChild(link); |
| + link.onload = callback.bind(this, null); |
|
caseq
2016/08/05 17:56:42
use createLoadPromise()
kozy
2016/08/10 01:21:15
Done.
|
| + return promies; |
| } |
| function test() |