summaryrefslogtreecommitdiff
path: root/toolkit/devtools/commandline/test/browser_cmd_folder.js
blob: 9ceb3813559359915d80643cb7caf1ec643dff5d (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);
}