summaryrefslogtreecommitdiffstats
path: root/devtools/client/commandline/test/browser_cmd_folder.js
blob: 8592d4a78819dbac5a60660c81e40be7de3ce15f (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */

// Tests that the folder commands works as they should

const TEST_URI = "data:text/html;charset=utf-8,cmd-folder";

function test() {
  helpers.addTabWithToolbar(TEST_URI, function (options) {
    return helpers.audit(options, [
      {
        setup: "folder",
        check: {
          input:  "folder",
          hints:  " open",
          markup: "IIIIII",
          status: "ERROR"
        },
      },
      {
        setup: "folder open",
        check: {
          input:  "folder open",
          hints:  " [path]",
          markup: "VVVVVVVVVVV",
          status: "VALID"
        }
      },
      {
        setup: "folder open ~",
        check: {
          input:  "folder open ~",
          hints:  "",
          markup: "VVVVVVVVVVVVV",
          status: "VALID"
        }
      },
      {
        setup: "folder openprofile",
        check: {
          input:  "folder openprofile",
          hints:  "",
          markup: "VVVVVVVVVVVVVVVVVV",
          status: "VALID"
        }
      },
      {
        setup: "folder openprofile WRONG",
        check: {
          input:  "folder openprofile WRONG",
          hints:  "",
          markup: "VVVVVVVVVVVVVVVVVVVEEEEE",
          status: "ERROR"
        }
      }
    ]);
  }).then(finish, helpers.handleError);
}