summaryrefslogtreecommitdiffstats
path: root/devtools/client/responsive/test/browser/browser_in_rdm_pane.js
blob: 546e8d5b4afbab98bad0a0ed17b22294bce868c4 (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
25
26
27
28
29
30
31
/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */

"use strict";

// Verify the inRDMPane property is set on a document when that
// document is being viewed in Responsive Design Mode.

const TEST_URL = "http://example.com/";

addRDMTask(TEST_URL, async function ({ ui }) {
  const viewportBrowser = ui.getViewportBrowser();

  const contentURL = await SpecialPowers.spawn(
    viewportBrowser,
    [],
    () => content.document.URL
  );
  info("content URL is " + contentURL);

  const contentInRDMPane = await SpecialPowers.spawn(
    viewportBrowser,
    [],
    () => docShell.browsingContext.inRDMPane
  );

  ok(
    contentInRDMPane,
    "After RDM is opened, document should have inRDMPane set to true."
  );
});