Closed
Bug 1000894
Opened 10 years ago
Closed 10 years ago
dom/tests/browser/browser_focus_steal_from_chrome{,_during_mousedown}.js destroy the original tab
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: froydnj, Assigned: froydnj)
Details
Attachments
(1 file)
3.30 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
We're trying to make tests not do that, see bug 805068. The test browser_focus_steal_from_chrome.js only cares about two tabs, so I tried the obvious: @@ -8,7 +8,7 @@ function test() { let fm = Components.classes["@mozilla.org/focus-manager;1"] .getService(Components.interfaces.nsIFocusManager); - let tabs = [ gBrowser.selectedTab, gBrowser.addTab() ]; + let tabs = [ gBrowser.addTab(), gBrowser.addTab() ]; let testingList = [ { uri: "data:text/html,<body onload=\"setTimeout(function () { document.getElementById('target').focus(); }, 10);\"><input id='target'></body>", so that the test is using its own newly created tabs, but that causes all sorts of interesting failures like: TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/dom/tests/browser/browser_focus_steal_from_chrome.js | the INPUT element isn't focused by the focus (Test1: content can steal focus) - Got null, expected [object XrayWrapper [object HTMLInputElement]] TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/dom/tests/browser/browser_focus_steal_from_chrome.js | the INPUT element isn't focused by the select (Test1: content can steal focus) - Got [object HTMLInputElement], expected [object XrayWrapper [object HTMLInputElement]] TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/dom/tests/browser/browser_focus_steal_from_chrome.js | the A element isn't focused by the focus (Test1: content can steal focus) - Got [object HTMLInputElement], expected about:blank TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/dom/tests/browser/browser_focus_steal_from_chrome.js | the BUTTON element isn't focused by the focus (Test1: content can steal focus) - Got [object HTMLInputElement], expected [object XrayWrapper [object HTMLButtonElement]] ...and a couple more... I guess because the new tab(s) aren't chrome tabs, but content tabs...or something like that?
Comment 1•10 years ago
|
||
Don't you also have to select the first tab?
Assignee | ||
Comment 2•10 years ago
|
||
(In reply to :Gavin Sharp (email gavin@gavinsharp.com) from comment #1) > Don't you also have to select the first tab? Oh, duh, that would help, wouldn't it...
Assignee | ||
Comment 3•10 years ago
|
||
Thanks for pointing out the problem, Gavin!
Attachment #8412321 -
Flags: review?(ehsan)
Updated•10 years ago
|
Attachment #8412321 -
Flags: review?(ehsan) → review+
Comment 4•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/16a37bafa5c8
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•