Prettier the rest of ReactNative

Reviewed By: yungsters

Differential Revision: D7974340

fbshipit-source-id: 5fe457a8a9be4bd360fc3af9acb5c1136b2be0d7
This commit is contained in:
Eli White
2018-05-11 13:32:37 -07:00
committed by Facebook Github Bot
parent aba4ec0c09
commit 36fcbaa56d
170 changed files with 5132 additions and 3995 deletions
@@ -4,6 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
'use strict';
@@ -19,29 +20,29 @@ var assertEquals = require('Asserts').assertEquals;
var styles = StyleSheet.create({
A: {
'width': 500,
'height': 500,
width: 500,
height: 500,
},
B: {
backgroundColor: 'rgb(255, 0, 0)',
'left': 50,
'top': 80,
'width': 200,
'height': 300,
left: 50,
top: 80,
width: 200,
height: 300,
},
C: {
backgroundColor: 'rgb(0, 255, 0)',
'left': 100,
'top': 70,
'width': 50,
'height': 150,
left: 100,
top: 70,
width: 50,
height: 150,
},
D: {
backgroundColor: 'rgb(0, 0, 255)',
'left': 400,
'top': 100,
'width': 50,
'height': 200,
left: 400,
top: 100,
width: 50,
height: 200,
},
});
@@ -90,114 +91,124 @@ var MeasureLayoutTestModule = {
});
},
verifyMeasureLayoutCRelativeToA: function() {
UIManager.measureLayout(
C,
A,
shouldNotCallThisCallback,
function (x, y, width, height) {
assertEquals(50, width);
assertEquals(150, height);
assertEquals(150, x);
assertEquals(150, y);
});
UIManager.measureLayout(C, A, shouldNotCallThisCallback, function(
x,
y,
width,
height,
) {
assertEquals(50, width);
assertEquals(150, height);
assertEquals(150, x);
assertEquals(150, y);
});
},
verifyMeasureLayoutCRelativeToB: function() {
UIManager.measureLayout(
C,
B,
shouldNotCallThisCallback,
function (x, y, width, height) {
assertEquals(50, width);
assertEquals(150, height);
assertEquals(100, x);
assertEquals(70, y);
});
UIManager.measureLayout(C, B, shouldNotCallThisCallback, function(
x,
y,
width,
height,
) {
assertEquals(50, width);
assertEquals(150, height);
assertEquals(100, x);
assertEquals(70, y);
});
},
verifyMeasureLayoutCRelativeToSelf: function() {
UIManager.measureLayout(
C,
C,
shouldNotCallThisCallback,
function (x, y, width, height) {
assertEquals(50, width);
assertEquals(150, height);
assertEquals(0, x);
assertEquals(0, y);
});
UIManager.measureLayout(C, C, shouldNotCallThisCallback, function(
x,
y,
width,
height,
) {
assertEquals(50, width);
assertEquals(150, height);
assertEquals(0, x);
assertEquals(0, y);
});
},
verifyMeasureLayoutRelativeToParentOnViewA: function() {
UIManager.measureLayoutRelativeToParent(
A,
shouldNotCallThisCallback,
function (x, y, width, height) {
function(x, y, width, height) {
assertEquals(500, width);
assertEquals(500, height);
assertEquals(0, x);
assertEquals(0, y);
});
},
);
},
verifyMeasureLayoutRelativeToParentOnViewB: function() {
UIManager.measureLayoutRelativeToParent(
B,
shouldNotCallThisCallback,
function (x, y, width, height) {
function(x, y, width, height) {
assertEquals(200, width);
assertEquals(300, height);
assertEquals(50, x);
assertEquals(80, y);
});
},
);
},
verifyMeasureLayoutRelativeToParentOnViewC: function() {
UIManager.measureLayoutRelativeToParent(
C,
shouldNotCallThisCallback,
function (x, y, width, height) {
function(x, y, width, height) {
assertEquals(50, width);
assertEquals(150, height);
assertEquals(100, x);
assertEquals(70, y);
});
},
);
},
verifyMeasureLayoutDRelativeToB: function() {
UIManager.measureLayout(
D,
B,
function () {
function() {
assertEquals(true, true);
},
shouldNotCallThisCallback);
shouldNotCallThisCallback,
);
},
verifyMeasureLayoutNonExistentTag: function() {
UIManager.measureLayout(
192,
A,
function () {
function() {
assertEquals(true, true);
},
shouldNotCallThisCallback);
shouldNotCallThisCallback,
);
},
verifyMeasureLayoutNonExistentAncestor: function() {
UIManager.measureLayout(
B,
192,
function () {
function() {
assertEquals(true, true);
},
shouldNotCallThisCallback);
shouldNotCallThisCallback,
);
},
verifyMeasureLayoutRelativeToParentNonExistentTag: function() {
UIManager.measureLayoutRelativeToParent(
192,
function () {
function() {
assertEquals(true, true);
},
shouldNotCallThisCallback);
shouldNotCallThisCallback,
);
},
};
BatchedBridge.registerCallableModule(
'MeasureLayoutTestModule',
MeasureLayoutTestModule
MeasureLayoutTestModule,
);
module.exports = MeasureLayoutTestModule;