Closed
Bug 1270244
Opened 9 years ago
Closed 9 years ago
WebExtensions: chrome.tabs.create fails to create a new tab with a file URL
Categories
(WebExtensions :: Untriaged, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1266960
People
(Reporter: dw-dev, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Build ID: 20160407164938
Steps to reproduce:
I am migrating my "Print Edit" add-on to the WebExtensions API.
I have the following code that should create a new tab and load a file URL:
chrome.tabs.create({ url: tabs[0].url },
function(tab)
{
.....
});
Note, tabs[0].url could contain any file URL, but in my tests had the value:
"file:///D:/Development/Mozilla%20Firefox/My%20Extensions/Print%20Edit/Line%20Breaks/break2.htm"
This code fails with the error message: "Unchecked lastEror value: Error: URL not allowed: ....."
However, this failure is not consistent with the documentation and at least one other API:
- the "Are we WebExtensions yet?" web page makes no mention that file URLs are not supported.
- the tabs.create documentation web page makes no mention that file URLs are not supported.
- chrome.extension.isAllowedFileSchemeAccess always returns true (as noted in Bug 1253646).
The same code works correctly in Chrome providing the "Allow access to file URLs" checkbox is enabled.
Actual results:
The operation failed with an error message (see above).
A new tab was NOT created and (of course) the file URL was NOT loaded.
Expected results:
A new tab should have been created and the file URL should have been loaded into the new tab.
Summary: WebExtensions: chrome.tabs.create fialsto create a new tab with a file URL → WebExtensions: chrome.tabs.create fails to create a new tab with a file URL
Updated•9 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Updated•7 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•