Closed Bug 136919 Opened 22 years ago Closed 22 years ago

TestColorNames is broken

Categories

(Core Graveyard :: GFX, defect, P4)

x86
All

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

Details

Attachments

(1 file, 1 obsolete file)

i'm running these tests on QNX and FreeBSD hence pc/all
There are two problems, I have a fix for the second problem which is:
bug: can't find ''
bug: name='' id=-1 index=56
###!!! ASSERTION: no lookup table, needs addref: 'gColorTable', file /home/timeless/mozilla/gfx/src/nsColorNames.cpp, line 108
###!!! Break: at file /home/timeless/mozilla/gfx/src/nsColorNames.cpp, line 108
bug: name='' didn't NS_ColorNameToRGB
bug: name='' ColorNameToRGB=28061000 kColors[-13631571]=ff2fffad
bug: rgb=28061000 hexrgb=ff061000
The first problem is:
~/mozilla/obj-xlib-i386-unknown-freebsd4.4/dist/bin: ./r*h ./T*C*mes
###!!! ASSERTION: no lookup table, needs addref: 'gColorTable', file /home/timeless/mozilla/gfx/src/nsColorNames.cpp, line 118
###!!! Break: at file /home/timeless/mozilla/gfx/src/nsColorNames.cpp, line 118
And if you initialize the color table, everything works, i guess
Attachment #78739 - Attachment is obsolete: true
Comment on attachment 78740 [details] [diff] [review]
initialize the color table

Index: TestColorNames.cpp

>     nsCString tagName(nsColorNames::GetStringValue(index));
>+    if (tagName.Length()==0) {
>+      printf("bug: tagName for nsColorNames::GetStringValue(%d) is ''\n", index);
>+      rv = -1;
>+      continue;
>+    }

tagName.IsEmpty() to say what you mean.  you should get pavlov or someone with
more
module ownership than myself to review this.
Attachment #78740 - Flags: superreview+
doh, fixed in tree, I always try to use isEmpty(), have it fail and fallback to 
Length() ... silly case sensitive ...

peterL: you appear to be the only person in log who made real changes who might 
still be alive, can you r?
Priority: -- → P4
Target Milestone: --- → Future
Attachment #78740 - Flags: review?(dbaron)
Comment on attachment 78740 [details] [diff] [review]
initialize the color table

Get this off dbaron's plate. r=roc+moz
Attachment #78740 - Flags: review?(dbaron) → review+
.
Assignee: kmcclusk → timeless
checked in
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Target Milestone: Future → ---
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: