Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/inspector/sources/source-code-diff.html |
| diff --git a/third_party/WebKit/LayoutTests/inspector/sources/source-code-diff.html b/third_party/WebKit/LayoutTests/inspector/sources/source-code-diff.html |
| index 51fb1e6b17b8f870616117c0e920c2aba56ac692..e65e602403eed1af06a7db8e98d74389dca2eb3a 100644 |
| --- a/third_party/WebKit/LayoutTests/inspector/sources/source-code-diff.html |
| +++ b/third_party/WebKit/LayoutTests/inspector/sources/source-code-diff.html |
| @@ -8,22 +8,23 @@ |
| <script src="../../http/tests/inspector/debugger-test.js"></script> |
| <script src="../../http/tests/inspector/sources-test.js"></script> |
| <script> |
| + |
| function test() |
| { |
| Runtime.experiments.enableForTest("sourceDiff"); |
| var textAfter; |
| - InspectorTest.showScriptSource("diff-after.css", onAfter); |
| + InspectorTest.waitForScriptSource("diff-after.css", uiSourceCode => uiSourceCode.requestContent().then(onAfterContent)); |
| - function onAfter(afterFrame) |
| + function onAfterContent(content) |
| { |
| - textAfter = afterFrame.textEditor.text(); |
| - InspectorTest.showScriptSource("diff-before.css", onBefore); |
| + textAfter = content; |
| + InspectorTest.waitForScriptSource("diff-before.css", onBeforeUISourceCode); |
| } |
| - function onBefore(beforeFrame) |
| - { |
| + function onBeforeUISourceCode(uiSourceCode){ |
| + uiSourceCode.setWorkingCopy(textAfter); |
| InspectorTest.addSniffer(SourceFrame.SourceCodeDiff.prototype, "_decorationsSetForTest", decorationsSet); |
| - beforeFrame.setContent(textAfter); |
| + InspectorTest.showUISourceCode(uiSourceCode, () => undefined); |
|
lushnikov
2017/03/10 01:17:04
showUISourceCodePromise
einbinder
2017/03/13 17:47:57
Done.
|
| } |
| function decorationsSet(decorations) |