Changeset 51744 in webkit
- Timestamp:
- Dec 6, 2009 6:45:54 PM (14 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r51743 r51744 1 2009-12-06 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Darin Adler. 4 5 Improve portability and readability of table-percent-height* tests. 6 https://bugs.webkit.org/show_bug.cgi?id=31858 7 8 The purpose of these tests is to confirm that an element with 9 height:N% inside a table cell has non-zero height. We don't need 10 to check concrete pixel sizes of form controls. 11 12 This updates the tests so that they check heights are non-zero and 13 75% heights are same as corresponding 100% heights or actually 75%. 14 15 * fast/replaced/table-percent-height-expected.txt: 16 * fast/replaced/table-percent-height-text-controls-expected.txt: 17 * fast/replaced/table-percent-height-text-controls.html: 18 * fast/replaced/table-percent-height.html: 19 1 20 2009-12-06 Fumitoshi Ukai <ukai@chromium.org> 2 21 -
trunk/LayoutTests/fast/replaced/table-percent-height-expected.txt
r43099 r51744 28 28 29 29 30 PASS getComputedStyleForElement(document.getElementById('canvas-75'), 'width') is '300px' 31 PASS getComputedStyleForElement(document.getElementById('canvas-75'), 'height') is '112px' 32 PASS getComputedStyleForElement(document.getElementById('canvas-100'), 'width') is '300px' 33 PASS getComputedStyleForElement(document.getElementById('canvas-100'), 'height') is '150px' 34 PASS getComputedStyleForElement(document.getElementById('embed-75'), 'width') is '300px' 35 PASS getComputedStyleForElement(document.getElementById('embed-75'), 'height') is '112px' 36 PASS getComputedStyleForElement(document.getElementById('embed-100'), 'width') is '300px' 37 PASS getComputedStyleForElement(document.getElementById('embed-100'), 'height') is '150px' 38 PASS getComputedStyleForElement(document.getElementById('img-75'), 'width') is '75px' 39 PASS getComputedStyleForElement(document.getElementById('img-75'), 'height') is '75px' 40 PASS getComputedStyleForElement(document.getElementById('img-100'), 'width') is '100px' 41 PASS getComputedStyleForElement(document.getElementById('img-100'), 'height') is '100px' 42 PASS getComputedStyleForElement(document.getElementById('object-75'), 'width') is '300px' 43 PASS getComputedStyleForElement(document.getElementById('object-75'), 'height') is '112px' 44 PASS getComputedStyleForElement(document.getElementById('object-100'), 'width') is '300px' 45 PASS getComputedStyleForElement(document.getElementById('object-100'), 'height') is '150px' 46 PASS getComputedStyleForElement(document.getElementById('button-75'), 'width') is '51px' 47 PASS getComputedStyleForElement(document.getElementById('button-75'), 'height') is '15px' 48 PASS getComputedStyleForElement(document.getElementById('button-100'), 'width') is '51px' 49 PASS getComputedStyleForElement(document.getElementById('button-100'), 'height') is '15px' 50 PASS getComputedStyleForElement(document.getElementById('input-button-75'), 'width') is '16px' 51 PASS getComputedStyleForElement(document.getElementById('input-button-75'), 'height') is '18px' 52 PASS getComputedStyleForElement(document.getElementById('input-button-100'), 'width') is '16px' 53 PASS getComputedStyleForElement(document.getElementById('input-button-100'), 'height') is '18px' 54 PASS getComputedStyleForElement(document.getElementById('input-checkbox-75'), 'width') is '12px' 55 PASS getComputedStyleForElement(document.getElementById('input-checkbox-75'), 'height') is '4px' 56 PASS getComputedStyleForElement(document.getElementById('input-checkbox-100'), 'width') is '12px' 57 PASS getComputedStyleForElement(document.getElementById('input-checkbox-100'), 'height') is '6px' 58 PASS getComputedStyleForElement(document.getElementById('input-file-75'), 'width') is '237px' 59 PASS getComputedStyleForElement(document.getElementById('input-file-75'), 'height') is '13px' 60 PASS getComputedStyleForElement(document.getElementById('input-file-100'), 'width') is '237px' 61 PASS getComputedStyleForElement(document.getElementById('input-file-100'), 'height') is '18px' 62 PASS getComputedStyleForElement(document.getElementById('input-image-75'), 'width') is '75px' 63 PASS getComputedStyleForElement(document.getElementById('input-image-75'), 'height') is '75px' 64 PASS getComputedStyleForElement(document.getElementById('input-image-100'), 'width') is '100px' 65 PASS getComputedStyleForElement(document.getElementById('input-image-100'), 'height') is '100px' 66 PASS getComputedStyleForElement(document.getElementById('input-radio-75'), 'width') is '12px' 67 PASS getComputedStyleForElement(document.getElementById('input-radio-75'), 'height') is '4px' 68 PASS getComputedStyleForElement(document.getElementById('input-radio-100'), 'width') is '12px' 69 PASS getComputedStyleForElement(document.getElementById('input-radio-100'), 'height') is '6px' 70 PASS getComputedStyleForElement(document.getElementById('input-reset-75'), 'width') is '45px' 71 PASS getComputedStyleForElement(document.getElementById('input-reset-75'), 'height') is '18px' 72 PASS getComputedStyleForElement(document.getElementById('input-reset-100'), 'width') is '45px' 73 PASS getComputedStyleForElement(document.getElementById('input-reset-100'), 'height') is '18px' 74 PASS getComputedStyleForElement(document.getElementById('input-submit-75'), 'width') is '54px' 75 PASS getComputedStyleForElement(document.getElementById('input-submit-75'), 'height') is '18px' 76 PASS getComputedStyleForElement(document.getElementById('input-submit-100'), 'width') is '54px' 77 PASS getComputedStyleForElement(document.getElementById('input-submit-100'), 'height') is '18px' 78 PASS getComputedStyleForElement(document.getElementById('select-75'), 'width') is '68px' 79 PASS getComputedStyleForElement(document.getElementById('select-75'), 'height') is '18px' 80 PASS getComputedStyleForElement(document.getElementById('select-100'), 'width') is '68px' 81 PASS getComputedStyleForElement(document.getElementById('select-100'), 'height') is '18px' 30 PASS getWidth('canvas-75') is '300px' 31 PASS getHeight('canvas-75') is '112px' 32 PASS getWidth('canvas-100') is '300px' 33 PASS getHeight('canvas-100') is '150px' 34 PASS getWidth('embed-75') is '300px' 35 PASS getHeight('embed-75') is '112px' 36 PASS getWidth('embed-100') is '300px' 37 PASS getHeight('embed-100') is '150px' 38 PASS getWidth('img-75') is '75px' 39 PASS getHeight('img-75') is '75px' 40 PASS getWidth('img-100') is '100px' 41 PASS getHeight('img-100') is '100px' 42 PASS getWidth('object-75') is '300px' 43 PASS getHeight('object-75') is '112px' 44 PASS getWidth('object-100') is '300px' 45 PASS getHeight('object-100') is '150px' 46 PASS getWidth('button-75') is getWidth('button-100') 47 PASS getHeight('button-75') != '0px' is true 48 PASS getHeight('button-75') is getHeight('button-100') 49 PASS getWidth('input-button-75') is getWidth('input-button-100') 50 PASS getHeight('input-button-75') != '0px' is true 51 PASS getHeight('input-button-75') is getHeight('input-button-100') 52 PASS getWidth('input-checkbox-75') is getWidth('input-checkbox-100') 53 PASS getHeight('input-checkbox-75') != '0px' is true 54 PASS getHeight('input-checkbox-75') [4px] is 75% of getHeight('input-checkbox-100') [6px]. 55 PASS getWidth('input-file-75') is getWidth('input-file-100') 56 PASS getHeight('input-file-75') != '0px' is true 57 PASS getHeight('input-file-75') [13px] is 75% of getHeight('input-file-100') [18px]. 58 PASS getWidth('input-image-75') is '75px' 59 PASS getHeight('input-image-75') is '75px' 60 PASS getWidth('input-image-100') is '100px' 61 PASS getHeight('input-image-100') is '100px' 62 PASS getWidth('input-radio-75') is getWidth('input-radio-100') 63 PASS getHeight('input-radio-75') != '0px' is true 64 PASS getHeight('input-radio-75') [4px] is 75% of getHeight('input-radio-100') [6px]. 65 PASS getWidth('input-reset-75') is getWidth('input-reset-100') 66 PASS getHeight('input-reset-75') != '0px' is true 67 PASS getHeight('input-reset-75') is getHeight('input-reset-100') 68 PASS getWidth('input-submit-75') is getWidth('input-submit-100') 69 PASS getHeight('input-submit-75') != '0px' is true 70 PASS getHeight('input-submit-75') is getHeight('input-submit-100') 71 PASS getWidth('select-75') is getWidth('select-100') 72 PASS getHeight('select-75') != '0px' is true 73 PASS getHeight('select-75') is getHeight('select-100') 82 74 PASS successfullyParsed is true 83 75 -
trunk/LayoutTests/fast/replaced/table-percent-height-text-controls-expected.txt
r47528 r51744 12 12 13 13 14 PASS MAC input-password-75 width = 128px. Expects: MAC 128px, WIN 152px 15 PASS MAC/WIN input-password-75 height = 8px. Expects: MAC 8px, WIN 8px 16 PASS MAC input-password-100 width = 128px. Expects: MAC 128px, WIN 152px 17 PASS MAC/WIN input-password-100 height = 13px. Expects: MAC 13px, WIN 13px 18 PASS MAC input-text-75 width = 128px. Expects: MAC 128px, WIN 152px 19 PASS MAC/WIN input-text-75 height = 8px. Expects: MAC 8px, WIN 8px 20 PASS MAC input-text-100 width = 128px. Expects: MAC 128px, WIN 152px 21 PASS MAC/WIN input-text-100 height = 13px. Expects: MAC 13px, WIN 13px 22 PASS MAC isindex-75 width = 122px. Expects: MAC 122px, WIN 146px 23 PASS MAC/WIN isindex-75 height = 13px. Expects: MAC 13px, WIN 13px 24 PASS MAC isindex-100 width = 122px. Expects: MAC 122px, WIN 146px 25 PASS MAC/WIN isindex-100 height = 13px. Expects: MAC 13px, WIN 13px 26 PASS MAC textarea-75 width = 129px. Expects: MAC 129px, WIN 161px 27 FAIL. Doesn't match any platform's results. textarea-75 height = 18px. Expects: MAC 19px, WIN 19px 28 PASS MAC textarea-100 width = 129px. Expects: MAC 129px, WIN 161px 29 FAIL. Doesn't match any platform's results. textarea-100 height = 26px. Expects: MAC 28px, WIN 28px 14 PASS getWidth('input-password-75') is getWidth('input-password-100') 15 PASS getFullHeight('input-password-75') != '0px' is true 16 PASS getFullHeight('input-password-75') [14px] is 75% of getFullHeight('input-password-100') [19px]. 17 PASS getWidth('input-text-75') is getWidth('input-text-100') 18 PASS getFullHeight('input-text-75') != '0px' is true 19 PASS getFullHeight('input-text-75') [14px] is 75% of getFullHeight('input-text-100') [19px]. 20 PASS getWidth('isindex-75') is getWidth('isindex-100') 21 PASS getFullHeight('isindex-75') != '0px' is true 22 PASS getFullHeight('isindex-75') is getFullHeight('isindex-100') 23 PASS getWidth('textarea-75') is getWidth('textarea-100') 24 PASS getFullHeight('textarea-75') != '0px' is true 25 PASS getFullHeight('textarea-75') [24px] is 75% of getFullHeight('textarea-100') [32px]. 30 26 PASS successfullyParsed is true 31 27 -
trunk/LayoutTests/fast/replaced/table-percent-height-text-controls.html
r47528 r51744 11 11 } 12 12 13 function getComputedStyleForElement 13 function getComputedStyleForElement(element, cssPropertyName) 14 14 { 15 15 if (!element) … … 25 25 } 26 26 27 function printMetrics(id, cssPropertyName, expectedMacValue, expectedWinValue) { 28 var value = getComputedStyleForElement(document.getElementById(id), cssPropertyName); 27 function getWidth(id) 28 { 29 return getComputedStyleForElement(document.getElementById(id), 'width'); 30 } 29 31 30 var matchingPlatform; 31 if (expectedMacValue == expectedWinValue && value == expectedMacValue) 32 matchingPlatform = 'PASS MAC/WIN'; 33 else if (value == expectedMacValue) 34 matchingPlatform = 'PASS MAC'; 35 else if (value == expectedWinValue) 36 matchingPlatform = 'PASS WIN'; 37 else 38 matchingPlatform = 'FAIL. Doesn\'t match any platform\'s results.'; 32 function getFullHeight(id) 33 { 34 var element = document.getElementById(id); 35 var h = parseFloat(getComputedStyleForElement(element, 'border-top-width')); 36 h += parseFloat(getComputedStyleForElement(element, 'padding-top')); 37 h += parseFloat(getComputedStyleForElement(element, 'height')); 38 h += parseFloat(getComputedStyleForElement(element, 'padding-bottom')); 39 h += parseFloat(getComputedStyleForElement(element, 'border-bottom-width')); 40 return h + 'px'; 41 } 39 42 40 debug(matchingPlatform + ' ' + id + ' ' + cssPropertyName + ' = ' + value + '. ' + 41 'Expects: MAC ' + expectedMacValue + ', WIN ' + expectedWinValue); 43 function parsePixelValue(str) 44 { 45 if (typeof str != "string" || str.length < 3 || str.substr(str.length - 2) != "px") { 46 testFailed(str + " is unparsable."); 47 return -1; 48 } 49 return parseFloat(str); 50 } 51 52 function is75PercentOf(expression75, expression100) 53 { 54 var str75 = eval(expression75); 55 var str100 = eval(expression100); 56 var num75 = parsePixelValue(str75); 57 var num100 = parsePixelValue(str100); 58 if (num75 < 0 || num100 < 0) 59 return; 60 if (num75 == Math.floor(num100 * 75 / 100)) 61 testPassed(expression75 + " [" + str75 + "] is 75% of " + expression100 + " [" + str100 + "]."); 62 else 63 testFailed(expression75 + " [" + str75 + "] is not 75% of " + expression100 + " [" + str100 + "]."); 42 64 } 43 65 … … 47 69 "Text controls are in a different test than other replaced elements because their metrics are platform-specific."); 48 70 49 printMetrics('input-password-75', 'width', '128px', '152px');50 printMetrics('input-password-75', 'height', '8px', '8px');51 printMetrics('input-password-100', 'width', '128px', '152px');52 printMetrics('input-password-100', 'height', '13px', '13px');71 shouldBe("getWidth('input-password-75')", "getWidth('input-password-100')"); 72 shouldBeTrue("getFullHeight('input-password-75') != '0px'"); 73 // Note: This behavior doesn't match to IE 8, Firefox 3.5 and Opera 10. 74 is75PercentOf("getFullHeight('input-password-75')", "getFullHeight('input-password-100')"); 53 75 54 printMetrics('input-text-75', 'width', '128px', '152px');55 printMetrics('input-text-75', 'height', '8px', '8px');56 printMetrics('input-text-100', 'width', '128px', '152px');57 printMetrics('input-text-100', 'height', '13px', '13px');76 shouldBe("getWidth('input-text-75')", "getWidth('input-text-100')"); 77 shouldBeTrue("getFullHeight('input-text-75') != '0px'"); 78 // Note: This behavior doesn't match to IE 8, Firefox 3.5 and Opera 10. 79 is75PercentOf("getFullHeight('input-text-75')", "getFullHeight('input-text-100')"); 58 80 59 printMetrics('isindex-75', 'width', '122px', '146px'); 60 printMetrics('isindex-75', 'height', '13px', '13px'); 61 printMetrics('isindex-100', 'width', '122px', '146px'); 62 printMetrics('isindex-100', 'height', '13px', '13px'); 81 shouldBe("getWidth('isindex-75')", "getWidth('isindex-100')"); 82 shouldBeTrue("getFullHeight('isindex-75') != '0px'"); 83 shouldBe("getFullHeight('isindex-75')", "getFullHeight('isindex-100')"); 63 84 64 printMetrics('textarea-75', 'width', '129px', '161px');65 printMetrics('textarea-75', 'height', '19px', '19px');66 printMetrics('textarea-100', 'width', '129px', '161px');67 printMetrics('textarea-100', 'height', '28px', '28px');85 shouldBe("getWidth('textarea-75')", "getWidth('textarea-100')"); 86 shouldBeTrue("getFullHeight('textarea-75') != '0px'"); 87 // Note: This behavior doesn't match to IE 8, Firefox 3.5 and Opera 10. 88 is75PercentOf("getFullHeight('textarea-75')", "getFullHeight('textarea-100')"); 68 89 69 90 isSuccessfullyParsed(); -
trunk/LayoutTests/fast/replaced/table-percent-height.html
r43099 r51744 11 11 } 12 12 13 function getComputedStyleForElement 13 function getComputedStyleForElement(element, cssPropertyName) 14 14 { 15 15 if (!element) { … … 25 25 } 26 26 27 function getWidth(id) 28 { 29 return getComputedStyleForElement(document.getElementById(id), 'width'); 30 } 31 32 function getHeight(id) 33 { 34 return getComputedStyleForElement(document.getElementById(id), 'height'); 35 } 36 37 function parsePixelValue(str) 38 { 39 if (typeof str != "string" || str.length < 3 || str.substr(str.length - 2) != "px") { 40 testFailed(str + " is unparsable."); 41 return -1; 42 } 43 return parseFloat(str); 44 } 45 46 function is75PercentOf(expression75, expression100) 47 { 48 var str75 = eval(expression75); 49 var str100 = eval(expression100); 50 var num75 = parsePixelValue(str75); 51 var num100 = parsePixelValue(str100); 52 if (num75 < 0 || num100 < 0) 53 return; 54 if (num75 == Math.floor(num100 * 75 / 100)) 55 testPassed(expression75 + " [" + str75 + "] is 75% of " + expression100 + " [" + str100 + "]."); 56 else 57 testFailed(expression75 + " [" + str75 + "] is not 75% of " + expression100 + " [" + str100 + "]."); 58 } 59 27 60 function test() 28 61 { 29 62 description("This test checks that replaced elements with percentage heights within table cells have the correct height."); 30 63 31 shouldBe("get ComputedStyleForElement(document.getElementById('canvas-75'), 'width')", "'300px'");32 shouldBe("get ComputedStyleForElement(document.getElementById('canvas-75'), 'height')", "'112px'");33 shouldBe("get ComputedStyleForElement(document.getElementById('canvas-100'), 'width')", "'300px'");34 shouldBe("get ComputedStyleForElement(document.getElementById('canvas-100'), 'height')", "'150px'");64 shouldBe("getWidth('canvas-75')", "'300px'"); 65 shouldBe("getHeight('canvas-75')", "'112px'"); 66 shouldBe("getWidth('canvas-100')", "'300px'"); 67 shouldBe("getHeight('canvas-100')", "'150px'"); 35 68 36 shouldBe("get ComputedStyleForElement(document.getElementById('embed-75'), 'width')", "'300px'");37 shouldBe("get ComputedStyleForElement(document.getElementById('embed-75'), 'height')", "'112px'");38 shouldBe("get ComputedStyleForElement(document.getElementById('embed-100'), 'width')", "'300px'");39 shouldBe("get ComputedStyleForElement(document.getElementById('embed-100'), 'height')", "'150px'");69 shouldBe("getWidth('embed-75')", "'300px'"); 70 shouldBe("getHeight('embed-75')", "'112px'"); 71 shouldBe("getWidth('embed-100')", "'300px'"); 72 shouldBe("getHeight('embed-100')", "'150px'"); 40 73 41 shouldBe("get ComputedStyleForElement(document.getElementById('img-75'), 'width')", "'75px'");42 shouldBe("get ComputedStyleForElement(document.getElementById('img-75'), 'height')", "'75px'");43 shouldBe("get ComputedStyleForElement(document.getElementById('img-100'), 'width')", "'100px'");44 shouldBe("get ComputedStyleForElement(document.getElementById('img-100'), 'height')", "'100px'");74 shouldBe("getWidth('img-75')", "'75px'"); 75 shouldBe("getHeight('img-75')", "'75px'"); 76 shouldBe("getWidth('img-100')", "'100px'"); 77 shouldBe("getHeight('img-100')", "'100px'"); 45 78 46 shouldBe("get ComputedStyleForElement(document.getElementById('object-75'), 'width')", "'300px'");47 shouldBe("get ComputedStyleForElement(document.getElementById('object-75'), 'height')", "'112px'");48 shouldBe("get ComputedStyleForElement(document.getElementById('object-100'), 'width')", "'300px'");49 shouldBe("get ComputedStyleForElement(document.getElementById('object-100'), 'height')", "'150px'");79 shouldBe("getWidth('object-75')", "'300px'"); 80 shouldBe("getHeight('object-75')", "'112px'"); 81 shouldBe("getWidth('object-100')", "'300px'"); 82 shouldBe("getHeight('object-100')", "'150px'"); 50 83 51 shouldBe("getComputedStyleForElement(document.getElementById('button-75'), 'width')", "'51px'"); 52 shouldBe("getComputedStyleForElement(document.getElementById('button-75'), 'height')", "'15px'"); 53 shouldBe("getComputedStyleForElement(document.getElementById('button-100'), 'width')", "'51px'"); 54 shouldBe("getComputedStyleForElement(document.getElementById('button-100'), 'height')", "'15px'"); 84 shouldBe("getWidth('button-75')", "getWidth('button-100')"); 85 shouldBeTrue("getHeight('button-75') != '0px'"); 86 shouldBe("getHeight('button-75')", "getHeight('button-100')"); 55 87 56 shouldBe("getComputedStyleForElement(document.getElementById('input-button-75'), 'width')", "'16px'"); 57 shouldBe("getComputedStyleForElement(document.getElementById('input-button-75'), 'height')", "'18px'"); 58 shouldBe("getComputedStyleForElement(document.getElementById('input-button-100'), 'width')", "'16px'"); 59 shouldBe("getComputedStyleForElement(document.getElementById('input-button-100'), 'height')", "'18px'"); 88 shouldBe("getWidth('input-button-75')", "getWidth('input-button-100')"); 89 shouldBeTrue("getHeight('input-button-75') != '0px'"); 90 shouldBe("getHeight('input-button-75')", "getHeight('input-button-100')"); 60 91 61 shouldBe("get ComputedStyleForElement(document.getElementById('input-checkbox-75'), 'width')", "'12px'");62 shouldBe ("getComputedStyleForElement(document.getElementById('input-checkbox-75'), 'height')", "'4px'");63 shouldBe("getComputedStyleForElement(document.getElementById('input-checkbox-100'), 'width')", "'12px'");64 shouldBe("getComputedStyleForElement(document.getElementById('input-checkbox-100'), 'height')", "'6px'");92 shouldBe("getWidth('input-checkbox-75')", "getWidth('input-checkbox-100')"); 93 shouldBeTrue("getHeight('input-checkbox-75') != '0px'"); 94 // Note: This behavior doesn't match to Firefox 3.5 and Opera 10. 95 is75PercentOf("getHeight('input-checkbox-75')", "getHeight('input-checkbox-100')"); 65 96 66 shouldBe("get ComputedStyleForElement(document.getElementById('input-file-75'), 'width')", "'237px'");67 shouldBe ("getComputedStyleForElement(document.getElementById('input-file-75'), 'height')", "'13px'");68 shouldBe("getComputedStyleForElement(document.getElementById('input-file-100'), 'width')", "'237px'");69 shouldBe("getComputedStyleForElement(document.getElementById('input-file-100'), 'height')", "'18px'");97 shouldBe("getWidth('input-file-75')", "getWidth('input-file-100')"); 98 shouldBeTrue("getHeight('input-file-75') != '0px'"); 99 // Note: This behavior doesn't match to Firefox 3.5 and Opera 10. 100 is75PercentOf("getHeight('input-file-75')", "getHeight('input-file-100')"); 70 101 71 shouldBe("getComputedStyleForElement(document.getElementById('input-image-75'), 'width')", "'75px'"); 72 shouldBe("getComputedStyleForElement(document.getElementById('input-image-75'), 'height')", "'75px'"); 73 shouldBe("getComputedStyleForElement(document.getElementById('input-image-100'), 'width')", "'100px'"); 74 shouldBe("getComputedStyleForElement(document.getElementById('input-image-100'), 'height')", "'100px'"); 102 // Note: This behavior doesn't match to Firefox 3.5 and Opera 10. 103 shouldBe("getWidth('input-image-75')", "'75px'"); 104 shouldBe("getHeight('input-image-75')", "'75px'"); 105 shouldBe("getWidth('input-image-100')", "'100px'"); 106 shouldBe("getHeight('input-image-100')", "'100px'"); 75 107 76 shouldBe("get ComputedStyleForElement(document.getElementById('input-radio-75'), 'width')", "'12px'");77 shouldBe ("getComputedStyleForElement(document.getElementById('input-radio-75'), 'height')", "'4px'");78 shouldBe("getComputedStyleForElement(document.getElementById('input-radio-100'), 'width')", "'12px'");79 shouldBe("getComputedStyleForElement(document.getElementById('input-radio-100'), 'height')", "'6px'");108 shouldBe("getWidth('input-radio-75')", "getWidth('input-radio-100')"); 109 shouldBeTrue("getHeight('input-radio-75') != '0px'"); 110 // Note: This behavior doesn't match to Firefox 3.5 and Opera 10. 111 is75PercentOf("getHeight('input-radio-75')", "getHeight('input-radio-100')"); 80 112 81 shouldBe("getComputedStyleForElement(document.getElementById('input-reset-75'), 'width')", "'45px'"); 82 shouldBe("getComputedStyleForElement(document.getElementById('input-reset-75'), 'height')", "'18px'"); 83 shouldBe("getComputedStyleForElement(document.getElementById('input-reset-100'), 'width')", "'45px'"); 84 shouldBe("getComputedStyleForElement(document.getElementById('input-reset-100'), 'height')", "'18px'"); 113 shouldBe("getWidth('input-reset-75')", "getWidth('input-reset-100')"); 114 shouldBeTrue("getHeight('input-reset-75') != '0px'"); 115 shouldBe("getHeight('input-reset-75')", "getHeight('input-reset-100')"); 85 116 86 shouldBe("getComputedStyleForElement(document.getElementById('input-submit-75'), 'width')", "'54px'"); 87 shouldBe("getComputedStyleForElement(document.getElementById('input-submit-75'), 'height')", "'18px'"); 88 shouldBe("getComputedStyleForElement(document.getElementById('input-submit-100'), 'width')", "'54px'"); 89 shouldBe("getComputedStyleForElement(document.getElementById('input-submit-100'), 'height')", "'18px'"); 117 shouldBe("getWidth('input-submit-75')", "getWidth('input-submit-100')"); 118 shouldBeTrue("getHeight('input-submit-75') != '0px'"); 119 shouldBe("getHeight('input-submit-75')", "getHeight('input-submit-100')"); 90 120 91 shouldBe("getComputedStyleForElement(document.getElementById('select-75'), 'width')", "'68px'"); 92 shouldBe("getComputedStyleForElement(document.getElementById('select-75'), 'height')", "'18px'"); 93 shouldBe("getComputedStyleForElement(document.getElementById('select-100'), 'width')", "'68px'"); 94 shouldBe("getComputedStyleForElement(document.getElementById('select-100'), 'height')", "'18px'"); 121 shouldBe("getWidth('select-75')", "getWidth('select-100')"); 122 shouldBeTrue("getHeight('select-75') != '0px'"); 123 shouldBe("getHeight('select-75')", "getHeight('select-100')"); 95 124 96 125 isSuccessfullyParsed();
Note: See TracChangeset
for help on using the changeset viewer.