Remove unused gr-diff._getRangeString()
The method is "private" and I could not find any usages except in tests. Change-Id: Iea6ecd90122f27d5e5c44a34d718e7c37838c8d0
This commit is contained in:
@@ -482,20 +482,6 @@
|
|||||||
return contentEl.querySelector('gr-diff-comment-thread-group');
|
return contentEl.querySelector('gr-diff-comment-thread-group');
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {string} commentSide
|
|
||||||
* @param {!Object=} opt_range
|
|
||||||
*/
|
|
||||||
_getRangeString(commentSide, opt_range) {
|
|
||||||
return opt_range ?
|
|
||||||
'range-' +
|
|
||||||
opt_range.startLine + '-' +
|
|
||||||
opt_range.startChar + '-' +
|
|
||||||
opt_range.endLine + '-' +
|
|
||||||
opt_range.endChar + '-' +
|
|
||||||
commentSide : 'line-' + commentSide;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets or creates a comment thread for a specific spot on a diff.
|
* Gets or creates a comment thread for a specific spot on a diff.
|
||||||
* May include a range, if the comment is a range comment.
|
* May include a range, if the comment is a range comment.
|
||||||
|
|||||||
@@ -343,20 +343,6 @@ limitations under the License.
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test('_getRangeString', () => {
|
|
||||||
const side = 'PARENT';
|
|
||||||
const range = {
|
|
||||||
startLine: 1,
|
|
||||||
startChar: 1,
|
|
||||||
endLine: 1,
|
|
||||||
endChar: 2,
|
|
||||||
};
|
|
||||||
assert.equal(element._getRangeString(side, range),
|
|
||||||
'range-1-1-1-2-PARENT');
|
|
||||||
assert.equal(element._getRangeString(side, null),
|
|
||||||
'line-PARENT');
|
|
||||||
}),
|
|
||||||
|
|
||||||
test('thread groups', () => {
|
test('thread groups', () => {
|
||||||
const contentEl = document.createElement('div');
|
const contentEl = document.createElement('div');
|
||||||
const commentSide = 'left';
|
const commentSide = 'left';
|
||||||
|
|||||||
Reference in New Issue
Block a user