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

Unified Diff: third_party/WebKit/LayoutTests/inspector/sources/source-code-diff.html

Issue 2729783002: DevTools: Diff subsystem (Closed)
Patch Set: nullable diff Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
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)

Powered by Google App Engine
This is Rietveld 408576698