Merge "Merge branch 'stable-3.1'"

This commit is contained in:
David Pursehouse
2020-03-03 00:13:59 +00:00
committed by Gerrit Code Review
24 changed files with 191 additions and 885 deletions

View File

@@ -824,15 +824,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);

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

@@ -181,7 +181,7 @@
}
// If we are done, resolve the promise.
if (state.chunkIndex >= chunks.length) {
resolve(this.groups);
resolve();
this._nextStepHandle = null;
return;
}