If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

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

NEW
Assigned to

Status

()

Core
Plug-ins
P4
normal
a year ago
a year ago

People

(Reporter: shu, Assigned: qdot)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
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.
(Reporter)

Updated

a year ago
Blocks: 1263355
(Reporter)

Comment 1

a year ago
Comment 0 correction:

s/it's not running/it's *now* running
(Reporter)

Updated

a year ago
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

Updated

a year ago
Priority: -- → P4
You need to log in before you can comment on or make changes to this bug.