Change expand diff context shortcut to be a toggle
Also removes this shortcut from the change view because
it was duplicating only the expand part of the
toggleAllInlineDiffs functionality instead of expanding
diff context.
If the user's context preference is already the whole
file, it will collapse to the default 10 line context
when toggled.
Change-Id: I911d5fb57edd427f00543a6eb59e8a684f8a8caf
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_test.js b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_test.js
index 99486ad..01c78f0 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_test.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_test.js
@@ -796,9 +796,9 @@
assert.equal(stub.lastCall.args.length, 0);
});
- test('delegates expandAllContext()', () => {
- const stub = sinon.stub(element.$.diff, 'expandAllContext');
- element.expandAllContext();
+ test('delegates toggleAllContext()', () => {
+ const stub = sinon.stub(element.$.diff, 'toggleAllContext');
+ element.toggleAllContext();
assert.isTrue(stub.calledOnce);
assert.equal(stub.lastCall.args.length, 0);
});