summaryrefslogtreecommitdiffstats
path: root/dom/wifi/test/marionette/test_wifi_tethering_wifi_inactive.js
blob: 2de6ab6670e32e10dbb995a16fccf6cb395e8b0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/ */

MARIONETTE_TIMEOUT = 60000;
MARIONETTE_HEAD_JS = 'head.js';

gTestSuite.doTestTethering(function() {
  return gTestSuite.ensureWifiEnabled(true)
    .then(function() {
      return Promise.all([
        gTestSuite.waitForWifiManagerEventOnce('disabled'),
        gTestSuite.requestTetheringEnabled(true)
      ]);
    })
    .then(function() {
      return Promise.all([
        gTestSuite.waitForWifiManagerEventOnce('enabled'),
        gTestSuite.requestTetheringEnabled(false)
      ]);
    });
});