gr-diff-builder: Remove unused function renderSection
This function was introduced, together with test-case in:
* 679fa309 Gr-diff retrofit: diff section state.
It wasn't used in this commit and hasn't been used since.
Change-Id: I3a82fa435fc0b877192fd07a8998c031e06709c3
This commit is contained in:
@@ -115,18 +115,6 @@
|
|||||||
group.element = element;
|
group.element = element;
|
||||||
};
|
};
|
||||||
|
|
||||||
GrDiffBuilder.prototype.renderSection = function(element) {
|
|
||||||
for (let i = 0; i < this.groups.length; i++) {
|
|
||||||
const group = this.groups[i];
|
|
||||||
if (group.element === element) {
|
|
||||||
const newElement = this.buildSectionElement(group);
|
|
||||||
group.element.parentElement.replaceChild(newElement, group.element);
|
|
||||||
group.element = newElement;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
GrDiffBuilder.prototype.getGroupsByLineRange = function(
|
GrDiffBuilder.prototype.getGroupsByLineRange = function(
|
||||||
startLine, endLine, opt_side) {
|
startLine, endLine, opt_side) {
|
||||||
const groups = [];
|
const groups = [];
|
||||||
|
|||||||
@@ -823,15 +823,6 @@ limitations under the License.
|
|||||||
element.render(keyLocations, prefs).then(done);
|
element.render(keyLocations, prefs).then(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('renderSection', () => {
|
|
||||||
let section = outputEl.querySelector('stub:nth-of-type(2)');
|
|
||||||
const prevInnerHTML = section.innerHTML;
|
|
||||||
section.innerHTML = 'wiped';
|
|
||||||
element._builder.renderSection(section);
|
|
||||||
section = outputEl.querySelector('stub:nth-of-type(2)');
|
|
||||||
assert.equal(section.innerHTML, prevInnerHTML);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('addColumns is called', done => {
|
test('addColumns is called', done => {
|
||||||
element.render(keyLocations, {}).then(done);
|
element.render(keyLocations, {}).then(done);
|
||||||
assert.isTrue(element._builder.addColumns.called);
|
assert.isTrue(element._builder.addColumns.called);
|
||||||
|
|||||||
Reference in New Issue
Block a user