Fixes for several failing tests in Firefox and Safari
Maxi Ferreira committed
Apr 7, 2015 at 01:37 UTC
49745e7bff0d1ad15ab3934bcf1d81b4fe2c6974
6 files changed
+10
-10
src/browser/ui/__tests__/ReactDOMComponent-test.js
+1
-1
@@ -586,7 +586,7 @@ describe('ReactDOMComponent', function() {
586
var ReactMount = require('ReactMount');
587
588
var container = document.createElement('div');
589
- document.documentElement.appendChild(container);
589
+ document.body.appendChild(container);
590
591
var callback = function() {};
592
var instance = <div onClick={callback} />;
src/browser/ui/__tests__/ReactMount-test.js
+1
-1
@@ -76,7 +76,7 @@ describe('ReactMount', function() {
76
77
it('should render different components in same root', function() {
78
var container = document.createElement('container');
79
- document.documentElement.appendChild(container);
79
+ document.body.appendChild(container);
80
81
ReactMount.render(<div></div>, container);
82
expect(container.firstChild.nodeName).toBe('DIV');
src/browser/ui/__tests__/ReactMountDestruction-test.js
+1
-1
@@ -16,7 +16,7 @@ var React = require('React');
16
describe('ReactMount', function() {
17
it("should destroy a react root upon request", function() {
18
var mainContainerDiv = document.createElement('div');
19
- document.documentElement.appendChild(mainContainerDiv);
19
+ document.body.appendChild(mainContainerDiv);
20
21
var instanceOne = (
22
<div className="firstReactDiv">
src/core/__tests__/ReactCompositeComponent-test.js
+5
-5
@@ -271,7 +271,7 @@ describe('ReactCompositeComponent', function() {
271
272
it('should warn about `forceUpdate` on unmounted components', function() {
273
var container = document.createElement('div');
274
- document.documentElement.appendChild(container);
274
+ document.body.appendChild(container);
275
276
var Component = React.createClass({
277
render: function() {
@@ -300,7 +300,7 @@ describe('ReactCompositeComponent', function() {
300
301
it('should warn about `setState` on unmounted components', function() {
302
var container = document.createElement('div');
303
- document.documentElement.appendChild(container);
303
+ document.body.appendChild(container);
304
305
var Component = React.createClass({
306
getInitialState: function() {
@@ -333,7 +333,7 @@ describe('ReactCompositeComponent', function() {
333
function() {
334
var cbCalled = false;
335
var container = document.createElement('div');
336
- document.documentElement.appendChild(container);
336
+ document.body.appendChild(container);
337
338
var Component = React.createClass({
339
getInitialState: function() {
@@ -363,7 +363,7 @@ describe('ReactCompositeComponent', function() {
363
364
it('should not allow `setProps` on unmounted components', function() {
365
var container = document.createElement('div');
366
- document.documentElement.appendChild(container);
366
+ document.body.appendChild(container);
367
368
var Component = React.createClass({
369
render: function() {
@@ -395,7 +395,7 @@ describe('ReactCompositeComponent', function() {
395
396
it('should only allow `setProps` on top-level components', function() {
397
var container = document.createElement('div');
398
- document.documentElement.appendChild(container);
398
+ document.body.appendChild(container);
399
400
var innerInstance;
401
src/core/__tests__/ReactCompositeComponentNestedState-test.js
+1
-1
@@ -84,7 +84,7 @@ describe('ReactCompositeComponentNestedState-state', function() {
84
});
85
86
var container = document.createElement('div');
87
- document.documentElement.appendChild(container);
87
+ document.body.appendChild(container);
88
89
var logger = mocks.getMockFunction();
90
src/core/__tests__/ReactCompositeComponentState-test.js
+1
-1
@@ -134,7 +134,7 @@ describe('ReactCompositeComponent-state', function() {
134
135
it('should support setting state', function() {
136
var container = document.createElement('div');
137
- document.documentElement.appendChild(container);
137
+ document.body.appendChild(container);
138
139
var stateListener = mocks.getMockFunction();
140
var instance = React.render(