autogen c version of text from js
This commit is contained in:
@@ -238,21 +238,21 @@ var layoutTestUtils = (function() {
|
||||
reduceTest: reduceTest,
|
||||
text: function(text) {
|
||||
var body = iframeText.contentDocument.body;
|
||||
var fn = function(width) {
|
||||
var fn = function(type, width) {
|
||||
// Constants for testing purposes between C/JS and other platforms
|
||||
// Comment this block of code if you want to use the browser to
|
||||
// generate proper sizes
|
||||
if (text === 'small') {
|
||||
if (width === 'grow' || width === 'shrink') {
|
||||
if (type === 'grow' || type === 'shrink') {
|
||||
return {width: 33, height: 18}
|
||||
}
|
||||
return {width: width, height: 18};
|
||||
}
|
||||
if (text === 'loooooooooong with space') {
|
||||
if (width === 'grow') {
|
||||
if (type === 'grow') {
|
||||
return {width: 171, height: 18};
|
||||
}
|
||||
if (width === 'shrink') {
|
||||
if (type === 'shrink') {
|
||||
return {width: 100, height: 36};
|
||||
}
|
||||
return {width: width, height: width >= 171 ? 18 : 36};
|
||||
|
Reference in New Issue
Block a user