summaryrefslogtreecommitdiffstats
path: root/devtools/client/debugger/new/test/mochitest/browser_dbg-editor-mode.js
blob: 2a23aa09fb6db84bf0fc2ff786e6d749354cbfd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/ */

// Tests that the editor sets the correct mode for different file
// types
add_task(function* () {
  const dbg = yield initDebugger("doc-scripts.html");

  yield selectSource(dbg, "simple1.js");
  is(dbg.win.cm.getOption("mode").name, "javascript", "Mode is correct");

  yield selectSource(dbg, "doc-scripts.html");
  is(dbg.win.cm.getOption("mode").name, "htmlmixed", "Mode is correct");
});