| 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..f099dcee9ffda553d1aa3fd4068d32cafb8c1671 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.showUISourceCodePromise(uiSourceCode);
|
| }
|
|
|
| function decorationsSet(decorations)
|
|
|