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

var gTestTab;
var gContentAPI;
var gContentWindow;

add_task(setup_UITourTest);

add_UITour_task(function*() {
  ok(!gBrowser.selectedBrowser.isArticle, "Should not be an article when we start");
  ok(document.getElementById("reader-mode-button").hidden, "Button should be hidden.");
  yield gContentAPI.forceShowReaderIcon();
  yield 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.");
});