Closed Bug 1146647 Opened 9 years ago Closed 7 years ago

[e10s] test-tabs-common.js causes unsafe CPOW usage warnings

Categories

(Add-on SDK Graveyard :: General, defect, P4)

defect

Tracking

(e10s+)

RESOLVED INCOMPLETE
Tracking Status
e10s + ---

People

(Reporter: Kwan, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [unsafe-cpow-usage] triaged)

Mined from test logs

In addon-sdk/source/test/test-tabs-common.js:

exports.testAttachStyleToTab = function(assert, done) {
   let style = Style({
    source: "div { height: 100px; }",
    uri: fixtures.url("include-file.css")
  });

  tabs.open({
    url: "data:text/html;charset=utf-8,<div style='background: silver'>css test</div>",
    onReady: (tab) => {
      let xulTab = viewFor(tab);

      attach(style, tab)

      let { document } = getTabContentWindow(xulTab); <- Causes CPOW warning
      let div = document.querySelector("div"); <- Causes CPOW warning

      assert.equal(div.clientHeight, 100, <- Causes CPOW warning
        "Style.source properly attached to tab");

      assert.equal(div.offsetHeight, 120, <- Causes CPOW warning
        "Style.uri properly attached to tab");

      detach(style, tab);

      assert.notEqual(div.clientHeight, 100, <- Causes CPOW warning
        "Style.source properly detached from tab");

      assert.notEqual(div.offsetHeight, 120, <- Causes CPOW warning
        "Style.uri properly detached from tab");

      attach(style, xulTab);

      assert.equal(div.clientHeight, 100, <- Causes CPOW warning
        "Style.source properly attached to xul tab");

      assert.equal(div.offsetHeight, 120, <- Causes CPOW warning
        "Style.uri properly attached to xul tab");

      detach(style, tab);

      assert.notEqual(div.clientHeight, 100, <- Causes CPOW warning
        "Style.source properly detached from xul tab");

      assert.notEqual(div.offsetHeight, 120, <- Causes CPOW warning
        "Style.uri properly detached from xul tab");

      tab.close(done);
    }
  });
};
Blocks: sdk/tabs
Priority: -- → P1
tracking-e10s: m8+ → ---
Whiteboard: [unsafe-cpow-usage]
This is test only.
tracking-e10s: --- → +
we are going to check which tests pass - and then disable all that do not to detect breakages from this point on.  correcting the test suite issue across the board is a months long effort - that doesn't align with 2017 plans.
Priority: P1 → P4
Whiteboard: [unsafe-cpow-usage] → [unsafe-cpow-usage] triaged
https://bugzilla.mozilla.org/show_bug.cgi?id=1399562
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.