The default bug view has changed. See this FAQ.

The API that browser_ext_sessions_getRecentlyClosed_tabs.js tests might be broken

NEW
Assigned to

Status

()

Toolkit
WebExtensions: Untriaged
P3
normal
26 days ago
23 days ago

People

(Reporter: mossop, Assigned: bsilverberg)

Tracking

(Depends on: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [sessions]triaged)

(Reporter)

Description

26 days ago
Over in bug 1337627 I was hitting problems with browser_ext_sessions_getRecentlyClosed_tabs.js loading about:addons and then closing it without waiting for initialization to complete so I was switching it to a different page. A few other pages I tried found errors:

about:buildconfig made the test fail with an unexpected title for the page (Got null, expected about:buildconfig).
http://example.com/ made the test fail with an unexpected favicon (Got http://example.com/favicon.ico, expected null).

I didn't see anything obviously broken in the test but didn't want to dig too deep so I just found another page that works to unblock me, but my suspicion is that the API that this is testing might be broken in some subtle way.
Thanks for reporting this, Dave. I will look into it.
Assignee: nobody → bob.silverberg
Whiteboard: investigate
Priority: -- → P3
Whiteboard: investigate → [sessions]triaged
I have looked into this and there are two problems here.

1. The test is not waiting long enough for the favicon to resolve before storing the information to be used later in an assertion. This didn't matter with the url currently being used in the test, but does manifest when using http://example.com/.  I will fix this in the test and use that url to prove it is fixed.

2. There is an issue with SessionStore that manifests when a page has a title that is the same as the url (e.g., about:buildconfig). The title is not stored by SessionHistory, which means that when the data is returned by SessionStore the title is missing. This _could_ be fixed in the sessions API by using that assumption to populate the title, but I would rather fix this in SessionStore. I am currently discussing the fix for that with Mike deBoer and will open a separate bug for that once we decide what to do about it.
Depends on: 1344857
You need to log in before you can comment on or make changes to this bug.