Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
acusti committed Oct 15, 2016
1 parent 2a24dac commit 881a699
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ describe('ReactInputSelection', () => {

describe('getSelectionInformation/restoreSelection', () => {
it('gets and restores selection for inputs that get remounted', () => {
// Stub out window getSelection
// Mock window getSelection
window.getSelection =
window.getSelection || makeGetSelection(window);
var input = document.createElement('input');
Expand Down Expand Up @@ -189,13 +189,12 @@ describe('ReactInputSelection', () => {
iframe.setAttribute('tabIndex', 0);
document.body.appendChild(iframe);
var iframeDoc = iframe.contentDocument;
// Stub out window and iframe getSelection
// Mock window and iframe getSelection
window.getSelection =
window.getSelection || makeGetSelection(window);
iframeDoc.defaultView.getSelection =
iframeDoc.defaultView.getSelection || makeGetSelection(iframeDoc.defaultView);

iframe.focus();
var input = document.createElement('input');
input.value = textValue;
iframeDoc.body.appendChild(input);
Expand Down

0 comments on commit 881a699

Please sign in to comment.