Skip to content

Commit

Permalink
Add test case for Chrome under 53
Browse files Browse the repository at this point in the history
  • Loading branch information
yesmeck committed Jan 8, 2017
1 parent ae54338 commit 4990965
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
3 changes: 2 additions & 1 deletion scripts/fiber/tests-passing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,8 @@ src/renderers/dom/shared/eventPlugins/__tests__/ChangeEventPlugin-test.js
* should deduplicate input value change events
* should listen for both change and input events when supported
* should only fire events when the value changes for range inputs
* should only fire change once on Webkit
* should only fire change once on Chrome
* should only fire change once on Chrome under 53
* should only fire change once on Firefox
* should only fire change once on IE9
* should only fire change once on IE10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,26 @@ describe('ChangeEventPlugin', () => {
}

var Scenario = {
Webkit: [
ChromeUnder53: [
{ run: setUntrackedValue, args: [ 'n' ] },
{ run: simulateEvent, args: [ 'keyDown' ] },
{ run: simulateEvent, args: [ 'compositionStart' ] },
{ run: simulateEvent, args: [ 'compositionUpdate' ] },
{ run: simulateEvent, args: [ 'input' ] },
{ run: simulateEvent, args: [ 'keyUp' ] },
{ run: setUntrackedValue, args: [ 'ni' ] },
{ run: simulateEvent, args: [ 'keyDown' ] },
{ run: simulateEvent, args: [ 'compositionUpdate' ] },
{ run: simulateEvent, args: [ 'input' ] },
{ run: simulateEvent, args: [ 'keyUp' ] },
{ run: setUntrackedValue, args: [ '你' ] },
{ run: simulateEvent, args: [ 'keyDown' ] },
{ run: simulateEvent, args: [ 'compositionEnd' ] },
{ run: simulateEvent, args: [ 'textInput' ] },
{ run: simulateEvent, args: [ 'input' ] },
{ run: simulateEvent, args: [ 'keyUp' ] },
],
Chrome: [
{ run: setUntrackedValue, args: [ 'n' ] },
{ run: simulateEvent, args: [ 'keyDown' ] },
{ run: simulateEvent, args: [ 'compositionStart' ] },
Expand Down Expand Up @@ -340,8 +359,12 @@ describe('ChangeEventPlugin', () => {
],
};

it('should only fire change once on Webkit', () => {
TestCompositionEvent(Scenario.Webkit);
it('should only fire change once on Chrome', () => {
TestCompositionEvent(Scenario.Chrome);
});

it('should only fire change once on Chrome under 53', () => {
TestCompositionEvent(Scenario.ChromeUnder53);
});

it('should only fire change once on Firefox', () => {
Expand Down

0 comments on commit 4990965

Please sign in to comment.