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:
Sven Selberg
2020-02-26 10:20:01 +01:00
parent 86ed9708d2
commit 97f5b25e3e
2 changed files with 0 additions and 21 deletions

View File

@@ -115,18 +115,6 @@
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(
startLine, endLine, opt_side) {
const groups = [];

View File

@@ -823,15 +823,6 @@ limitations under the License.
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 => {
element.render(keyLocations, {}).then(done);
assert.isTrue(element._builder.addColumns.called);