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

var gTestTab;
var gContentAPI;

add_task(setup_UITourTest);

add_UITour_task(async function () {
  ok(
    !gBrowser.selectedBrowser.isArticle,
    "Should not be an article when we start"
  );
  ok(
    document.getElementById("reader-mode-button").hidden,
    "Button should be hidden."
  );
  await gContentAPI.forceShowReaderIcon();
  await waitForConditionPromise(() => gBrowser.selectedBrowser.isArticle);
  ok(gBrowser.selectedBrowser.isArticle, "Should suddenly be an article.");
  ok(
    !document.getElementById("reader-mode-button").hidden,
    "Button should now be visible."
  );
});