main.js 1015 B

123456789101112131415161718192021222324252627282930
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. 'use strict';
  5. const { merge } = require('sdk/util/object');
  6. const app = require('sdk/system/xul-app');
  7. const { isGlobalPBSupported } = require('sdk/private-browsing/utils');
  8. merge(module.exports,
  9. require('./test-tabs'),
  10. require('./test-page-mod'),
  11. require('./test-private-browsing'),
  12. require('./test-sidebar'),
  13. isGlobalPBSupported ? require('./test-global-private-browsing') : {}
  14. );
  15. // Doesn't make sense to test window-utils and windows on fennec,
  16. // as there is only one window which is never private. Also ignore
  17. // unsupported modules (panel, selection)
  18. if (!app.is('Fennec')) {
  19. merge(module.exports,
  20. require('./test-selection'),
  21. require('./test-panel'),
  22. require('./test-window-tabs'),
  23. require('./test-windows')
  24. );
  25. }
  26. require('sdk/test/runner').runTestsFromModule(module);