Closed Bug 422050 Opened 13 years ago Closed 13 years ago

position test failure

Categories

(Toolkit :: XUL Widgets, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ajschult784, Assigned: ajschult784)

Details

(Keywords: testcase)

Attachments

(2 files, 1 obsolete file)

1.04 KB, application/vnd.mozilla.xul+xml
Details
1.59 KB, patch
enndeakin
: review+
Details | Diff | Splinter Review
Attached file testcase
I hit test failures with test_position.  I don't see anything wrong with the test, but I'm not sure I understand the failures.  The failures are:

not ok - button1 client rect right got 101, expecting 99
not ok - button1 scrolled client rect right got 101, expecting 99
not ok - button1 scrolled client rect right got 101, expecting 99

Assuming I didn't remove anything important, I've attached a simpler testcase for the first failure (prints "got 100.88333129882812 (fail)").
The tests are not accounting for some margin/border/padding that your theme has. The testcase here for instance isn't accounting for the button's margin.
 
Any pointers for what to look at to identify the problem?  Or... put another way: why should getBoundingClientRect().right be 99?
Er, I just said in the last comment. Are you asking about this testcase or test_position.xul? If the latter, you would need to look in the dom inspector to find out what element had an extra border/margin/padding and change the test to account for it.
Attached patch patch (obsolete) — Splinter Review
default min-width on a button is 6.3em, which works out to 92px for me.
Assignee: nobody → ajschult
Status: NEW → ASSIGNED
Attachment #309604 - Flags: review?(enndeakin)
My other box has an abnormally high line-height and this seems to translate to a minimum height for the button.  Overriding minheight gets the test passing there.
Attachment #309604 - Attachment is obsolete: true
Attachment #310184 - Flags: review?(enndeakin)
Attachment #309604 - Flags: review?(enndeakin)
Attachment #310184 - Flags: review?(enndeakin) → review+
fixed
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.