summaryrefslogtreecommitdiffstats
path: root/browser/components/uitour/test/browser_UITour_toggleReaderMode.js
blob: f3f45cdf276ccd79dea139fcb9a54ebe6b60a11e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"use strict";

var gTestTab;
var gContentAPI;

add_task(setup_UITourTest);

add_UITour_task(async function () {
  ok(
    !gBrowser.selectedBrowser.currentURI.spec.startsWith("about:reader"),
    "Should not be in reader mode at start of test."
  );
  await gContentAPI.toggleReaderMode();
  await waitForConditionPromise(() =>
    gBrowser.selectedBrowser.currentURI.spec.startsWith("about:reader")
  );
  ok(
    gBrowser.selectedBrowser.currentURI.spec.startsWith("about:reader"),
    "Should be in reader mode now."
  );
});