forked from facebook/react
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
daeda44
commit 39d8616
Showing
3 changed files
with
3,624 additions
and
2,303 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
fixtures/dom/src/components/fixtures/selection-events/CrossOriginFrameTestCase.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import TestCase from '../../TestCase'; | ||
const React = window.React; | ||
|
||
export default class CrossOriginFrameTestCase extends React.Component { | ||
state = {count: 0}; | ||
|
||
componentDidMount() { | ||
this.interval = setInterval(() => { | ||
this.setState(state => ({count: state.count + 1})); | ||
}, 2000); | ||
} | ||
|
||
componentWillUnmount() { | ||
clearInterval(this.interval); | ||
} | ||
|
||
render() { | ||
return ( | ||
<TestCase | ||
title="Selection within cross-origin iframes work" | ||
description="" | ||
affectedBrowsers="Safari" | ||
relatedIssues="14002"> | ||
<TestCase.Steps> | ||
This comment has been minimized.
Sorry, something went wrong. |
||
<li>Select text in the iframe below</li> | ||
<li>Open DevTools</li> | ||
<li>Wait for the counter to tick: {this.state.count}</li> | ||
</TestCase.Steps> | ||
<TestCase.ExpectedResult> | ||
No error is logged to the console. | ||
</TestCase.ExpectedResult> | ||
<iframe src="https://example.com/" /> | ||
</TestCase> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Nice 🤘