Skip to content

Commit

Permalink
Add Cross-Origin Iframe Fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp-spiess committed Mar 20, 2019
1 parent daeda44 commit 39d8616
Show file tree
Hide file tree
Showing 3 changed files with 3,624 additions and 2,303 deletions.
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.

Copy link
@renanvalentin

renanvalentin Mar 20, 2019

Nice 🤘

<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>
);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import FixtureSet from '../../FixtureSet';
import ReorderedInputsTestCase from './ReorderedInputsTestCase';
import OnSelectEventTestCase from './OnSelectEventTestCase';
import CrossOriginFrameTestCase from './CrossOriginFrameTestCase';
const React = window.React;

export default function SelectionEvents() {
Expand All @@ -14,6 +15,7 @@ export default function SelectionEvents() {
">
<ReorderedInputsTestCase />
<OnSelectEventTestCase />
<CrossOriginFrameTestCase />
</FixtureSet>
);
}
Loading

0 comments on commit 39d8616

Please sign in to comment.