https://github.com/mozilla/gecko-dev
Raw File
Tip revision: 84b8e19fd916a984373e2cceafd3d04144ac8355 authored by B2G Bumper Bot on 13 October 2014, 11:37:03 UTC
Bumping manifests a=b2g-bump
Tip revision: 84b8e19
mochitest-e10s-utils-content.js
// This is the content script for mochitest-e10s-utils

// We hook up some events and forward them back to the parent for the tests
// This is only a partial solution to tests using these events - tests which
// check, eg, event.target is the content window are still likely to be
// confused.
// But it's a good start...
["load", "DOMContentLoaded", "pageshow"].forEach(eventName => {
  addEventListener(eventName, function eventHandler(event) {
    // Some tests also rely on load events from, eg, iframes, so we should see
    // if we can do something sane to support that too.
    if (event.target == content.document) {
      sendAsyncMessage("Test:Event", {name: event.type});
    }
  }, true);
});
back to top