Closed Bug 1291854 Opened 8 years ago Closed 3 years ago

dom/plugins/test/mochitest/test_object.html doesn't run the tests you think it runs

Categories

(Core Graveyard :: Plug-ins, defect, P4)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: shu, Unassigned)

References

Details

There's this loop in test_object.html: for (let from_state of testdat['from_states']) { for (let to_state of testdat['to_states']) { for (let mode of testdat['test_modes']) { for (let type of testdat['tag_types']) { runSoon(function () { let obj = document.createElement(type); obj.width = 1; obj.height = 1; let state = {}; state.noChannel = true; state.tagName = type; // Part of the test checks whether a plugin spawned or not, // but touching the object prototype will attempt to // synchronously spawn a plugin! We use this terrible hack to // get a privileged getter for the attributes we want to touch // prior to applying any attributes. // TODO when embed goes away we wont need to check for // QueryInterface any longer. var lookup_on = obj.QueryInterface ? obj.QueryInterface(OBJLC): obj; state.getDisplayedType = SpecialPowers.do_lookupGetter(lookup_on, 'displayedType'); state.getHasRunningPlugin = SpecialPowers.do_lookupGetter(lookup_on, 'hasRunningPlugin'); state.getActualType = SpecialPowers.do_lookupGetter(lookup_on, 'actualType'); test_modes[mode](obj, from_state, to_state, state); }); } } } } Until bug 1263355, for-let-of scoping has been broken: instead of a fresh let being made per iteration, only one is made for the whole loop. So, that loop doesn't correctly loop over all configuration combinations. Bug 1263355 fixes the scoping but breaks this test, because as far as I can tell, it's not running configurations that never ran before and never passed.
Blocks: 1263355
Comment 0 correction: s/it's not running/it's *now* running
Summary: dom/plugins/test/mochitest/test_object.html doesn't run the test you think it runs → dom/plugins/test/mochitest/test_object.html doesn't run the tests you think it runs
Assignee: nobody → kyle
Priority: -- → P4
Assignee: kyle → nobody
Resolving as wont fix, plugin support deprecated in Firefox 85.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.