summaryrefslogtreecommitdiffstats
path: root/browser/components/uitour/test/browser_UITour_toggleReaderMode.js
blob: fd3c4d159e988df1a1c4b401b2bc73381828aca7 (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."
  );
});