Added another relative offset test

This commit is contained in:
Brandon Aaron 2007-12-04 21:29:28 +00:00
parent 4fc2971019
commit c424e79ccb
2 changed files with 5 additions and 6 deletions

View file

@ -21,12 +21,8 @@
</script> </script>
</head> </head>
<body> <body>
<div id="relative-1" class="relative">relative-1 <div id="relative-1" class="relative"><div id="relative-1-1" class="relative"><div id="relative-1-1-1" class="relative"></div></div></div>
<div id="relative-1-1" class="relative">relative-1-1 <div id="relative-2" class="relative"></div>
<div id="relative-1-1-1" class="relative">relative-1-1-1</div>
</div>
</div>
<div id="relative-2" class="relative">relative-2</div>
<div id="marker"></div> <div id="marker"></div>
</body> </body>
</html> </html>

View file

@ -44,6 +44,9 @@ testwin("relative", function() {
equals( $w('#relative-1').offset().top, jQuery.browser.msie ? 6 : 7, "$('#relative-1').offset().top" ); equals( $w('#relative-1').offset().top, jQuery.browser.msie ? 6 : 7, "$('#relative-1').offset().top" );
equals( $w('#relative-1').offset().left, 7, "$('#relative-1').offset().left" ); equals( $w('#relative-1').offset().left, 7, "$('#relative-1').offset().left" );
equals( $w('#relative-1-1').offset().top, jQuery.browser.msie ? 13 : 15, "$('#relative-1-1').offset().top" );
equals( $w('#relative-1-1').offset().left, 15, "$('#relative-1-1').offset().left" );
equals( $w('#relative-2').offset().top, jQuery.browser.msie ? 141 : 142, "$('#relative-2').offset().top" ); equals( $w('#relative-2').offset().top, jQuery.browser.msie ? 141 : 142, "$('#relative-2').offset().top" );
equals( $w('#relative-2').offset().left, 27, "$('#relative-2').offset().left" ); equals( $w('#relative-2').offset().left, 27, "$('#relative-2').offset().left" );