Improve browser_pageInfo.js a little

VERIFIED FIXED in Firefox 13

Status

()

Firefox
Page Info Window
P4
minor
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: sgautherie, Assigned: sgautherie)

Tracking

Trunk
Firefox 13
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Updated

5 years ago
Blocks: 735143
(Assignee)

Comment 1

5 years ago
Created attachment 605294 [details] [diff] [review]
(Av1) Improve browser_pageInfo.js a little
[Checked in: See comment 3+5]
Attachment #605294 - Flags: review?(dao)
Comment on attachment 605294 [details] [diff] [review]
(Av1) Improve browser_pageInfo.js a little
[Checked in: See comment 3+5]

>-    ok(feedRowsNum == 3, "Number of feeds listed: " +
>-                         feedRowsNum + ", should be 3");
>-
>+    is(feedRowsNum, 3, "3 feeds listed");

is(feedRowsNum, 3, "Number of feeds listed");

>     for (var i = 0; i < feedRowsNum; i++) {
>       let feedItem = feedListbox.getItemAtIndex(i);
>-      ok(feedItem.getAttribute("name") == (i+1), 
>-         "Name given: " + feedItem.getAttribute("name") + ", should be " + (i+1));
>+      is(feedItem.getAttribute("name"), i + 1,
>+         "Feed name " + (i + 1) + "/" + feedRowsNum);

is(feedItem.getAttribute("name"), i + 1, "Feed name");

r+ with these changes
Attachment #605294 - Flags: review?(dao) → review+
(Assignee)

Comment 3

5 years ago
Comment on attachment 605294 [details] [diff] [review]
(Av1) Improve browser_pageInfo.js a little
[Checked in: See comment 3+5]

Av1, with comment 2 suggestion(s).


(In reply to Dão Gottwald [:dao] from comment #2)

Ftr,

> >+    is(feedRowsNum, 3, "3 feeds listed");
> 
> is(feedRowsNum, 3, "Number of feeds listed");

My text change was per bug 521263 comment 26, but I'm fine retaining the initial text.

> >-      ok(feedItem.getAttribute("name") == (i+1), 
> >-         "Name given: " + feedItem.getAttribute("name") + ", should be " + (i+1));
> >+      is(feedItem.getAttribute("name"), i + 1,
> >+         "Feed name " + (i + 1) + "/" + feedRowsNum);
> 
> is(feedItem.getAttribute("name"), i + 1, "Feed name");

I'm not totally fine with having no reference to which name is checked (especially without hint at how many they should be) and getting 3 times the same text, but as you wish.
Attachment #605294 - Attachment description: (Av1) Improve browser_pageInfo.js a little → (Av1) Improve browser_pageInfo.js a little [Checked in: See comment 3]
is() will spit out the expected value in case of a failure, which seems sufficient here.
(Assignee)

Comment 5

5 years ago
Comment on attachment 605294 [details] [diff] [review]
(Av1) Improve browser_pageInfo.js a little
[Checked in: See comment 3+5]

https://hg.mozilla.org/mozilla-central/rev/cf4978c2e32c
Attachment #605294 - Attachment description: (Av1) Improve browser_pageInfo.js a little [Checked in: See comment 3] → (Av1) Improve browser_pageInfo.js a little [Checked in: See comment 3+4]
(Assignee)

Updated

5 years ago
Attachment #605294 - Attachment description: (Av1) Improve browser_pageInfo.js a little [Checked in: See comment 3+4] → (Av1) Improve browser_pageInfo.js a little [Checked in: See comment 3+5]
(Assignee)

Updated

5 years ago
Blocks: 724441
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: Firefox 14 → Firefox 13
(Assignee)

Updated

5 years ago
No longer blocks: 724441
(Assignee)

Comment 6

5 years ago
https://tbpl.mozilla.org/php/getParsedLog.php?id=10037139&tree=Firefox&full=1
Rev3 Fedora 12x64 mozilla-central debug test mochitest-other on 2012-03-13 10:17:57 PDT for push cf4978c2e32c
{
TEST-PASS | [...] | Feed tab
TEST-PASS | [...] | Feed list
TEST-PASS | [...] | Number of feeds listed
TEST-PASS | [...] | Feed name
TEST-PASS | [...] | Feed name
TEST-PASS | [...] | Feed name
}

V.Fixed
Status: RESOLVED → VERIFIED
(Assignee)

Updated

5 years ago
No longer blocks: 614320
You need to log in before you can comment on or make changes to this bug.