Closed Bug 666209 Opened 13 years ago Closed 13 years ago

Add method to check if a tab is an AppTab

Categories

(Mozilla QA Graveyard :: Mozmill Tests, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kshriram18, Assigned: whimboo)

References

Details

(Whiteboard: [lib])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows NT 6.0; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier: Mozilla/5.0 (Windows NT 6.0; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

Include a method that returns a boolean value 
for pinned (tab.pinned) 
or unpinned state of Tab (tab.unpinned)


Reproducible: Always

Steps to Reproduce:
1. index = controller.length-1 or index = 0;
2. Use tabBrowser.getTab(index).pinned or tabBrowser.getTab(index).unpinned
3. Place it in controller.assert() or elsewhere

Actual Results:  
Gives an undefined value

Expected Results:  
Should return boolean value false or true 

Instead of accessing it as an attribute directly, 
a method pinned() or unpinned() on a tab will return appropriate boolean value

Should it be tab.pinned(), or tabBrowser.pinned( <indexOfTab> )

If not both, second one's preferable as manually retrieving of getting the Tab to
check the pinned or unpinned state of the tab is unncessary.
Blocks: 648380
No longer blocks: 648380
Whiteboard: [shared module]
Blocks: 648380
Assignee: nobody → hskupin
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Summary: Add a method to get pinned/unpinned state of Tab to the TabbedBrowsingAPI → Add method to check if a tab is an AppTab
Attached patch Patch v1Splinter Review
This patch add the isAppTab method to the tabBrowser class, which simply requires the tab as parameter: tabBrowser.isAppTab(tabBrowser.getTab(0))

Because the whole implementation will change for the API refactoring I haven't created a test for this API addition.
Attachment #541057 - Flags: review?(gmealer)
(In reply to comment #1)
> Because the whole implementation will change for the API refactoring I
> haven't created a test for this API addition.

Could you use the patch on the blocked bug to test this API change?
It's not a change, it's an addition. And I have tested this method, so I can say for sure it works.
Comment on attachment 541057 [details] [diff] [review]
Patch v1

Looks fine. r+
Attachment #541057 - Flags: review?(gmealer) → review+
Component: Mozmill Tests → Mozmill Shared Modules
Component: Mozmill Shared Modules → Mozmill Tests
Whiteboard: [shared module] → [lib]
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: