browser/devtools/commandline/test/browser_gcli_pref1.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /*
     2  * Copyright 2012, Mozilla Foundation and contributors
     3  *
     4  * Licensed under the Apache License, Version 2.0 (the "License");
     5  * you may not use this file except in compliance with the License.
     6  * You may obtain a copy of the License at
     7  *
     8  * http://www.apache.org/licenses/LICENSE-2.0
     9  *
    10  * Unless required by applicable law or agreed to in writing, software
    11  * distributed under the License is distributed on an "AS IS" BASIS,
    12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  * See the License for the specific language governing permissions and
    14  * limitations under the License.
    15  */
    17 'use strict';
    18 // <INJECTED SOURCE:START>
    20 // THIS FILE IS GENERATED FROM SOURCE IN THE GCLI PROJECT
    21 // DO NOT EDIT IT DIRECTLY
    23 var exports = {};
    25 var TEST_URI = "data:text/html;charset=utf-8,<p id='gcli-input'>gcli-testPref1.js</p>";
    27 function test() {
    28   return Task.spawn(function() {
    29     let options = yield helpers.openTab(TEST_URI);
    30     yield helpers.openToolbar(options);
    31     gcli.addItems(mockCommands.items);
    33     yield helpers.runTests(options, exports);
    35     gcli.removeItems(mockCommands.items);
    36     yield helpers.closeToolbar(options);
    37     yield helpers.closeTab(options);
    38   }).then(finish, helpers.handleError);
    39 }
    41 // <INJECTED SOURCE:END>
    43 // var helpers = require('./helpers');
    45 exports.testPrefShowStatus = function(options) {
    46   return helpers.audit(options, [
    47     {
    48       skipRemainingIf: options.requisition.canon.getCommand('pref') == null,
    49       setup:    'pref s',
    50       check: {
    51         typed:  'pref s',
    52         hints:        'et',
    53         markup: 'IIIIVI',
    54         status: 'ERROR'
    55       }
    56     },
    57     {
    58       setup:    'pref show',
    59       check: {
    60         typed:  'pref show',
    61         hints:           ' <setting>',
    62         markup: 'VVVVVVVVV',
    63         status: 'ERROR'
    64       }
    65     },
    66     {
    67       setup:    'pref show ',
    68       check: {
    69         typed:  'pref show ',
    70         hints:            'allowSet',
    71         markup: 'VVVVVVVVVV',
    72         status: 'ERROR'
    73       }
    74     },
    75     {
    76       setup:    'pref show tempTBo',
    77       check: {
    78         typed:  'pref show tempTBo',
    79         hints:                   'ol',
    80         markup: 'VVVVVVVVVVIIIIIII',
    81         status: 'ERROR'
    82       }
    83     },
    84     {
    85       setup:    'pref show tempTBool',
    86       check: {
    87         typed:  'pref show tempTBool',
    88         markup: 'VVVVVVVVVVVVVVVVVVV',
    89         status: 'VALID',
    90         hints:  ''
    91       }
    92     },
    93     {
    94       setup:    'pref show tempTBool 4',
    95       check: {
    96         typed:  'pref show tempTBool 4',
    97         markup: 'VVVVVVVVVVVVVVVVVVVVE',
    98         status: 'ERROR',
    99         hints:  ''
   100       }
   101     },
   102     {
   103       setup:    'pref show tempNumber 4',
   104       check: {
   105         typed:  'pref show tempNumber 4',
   106         markup: 'VVVVVVVVVVVVVVVVVVVVVE',
   107         status: 'ERROR',
   108         hints:  ''
   109       }
   110     }
   111   ]);
   112 };
   114 exports.testPrefSetStatus = function(options) {
   115   return helpers.audit(options, [
   116     {
   117       skipRemainingIf: options.requisition.canon.getCommand('pref') == null,
   118       setup:    'pref s',
   119       check: {
   120         typed:  'pref s',
   121         hints:        'et',
   122         markup: 'IIIIVI',
   123         status: 'ERROR'
   124       }
   125     },
   126     {
   127       setup:    'pref set',
   128       check: {
   129         typed:  'pref set',
   130         hints:          ' <setting> <value>',
   131         markup: 'VVVVVVVV',
   132         status: 'ERROR'
   133       }
   134     },
   135     {
   136       setup:    'pref xxx',
   137       check: {
   138         typed:  'pref xxx',
   139         markup: 'IIIIVIII',
   140         status: 'ERROR'
   141       }
   142     },
   143     {
   144       setup:    'pref set ',
   145       check: {
   146         typed:  'pref set ',
   147         hints:           'allowSet <value>',
   148         markup: 'VVVVVVVVV',
   149         status: 'ERROR'
   150       }
   151     },
   152     {
   153       setup:    'pref set tempTBo',
   154       check: {
   155         typed:  'pref set tempTBo',
   156         hints:                  'ol <value>',
   157         markup: 'VVVVVVVVVIIIIIII',
   158         status: 'ERROR'
   159       }
   160     },
   161     {
   162       setup:    'pref set tempTBool 4',
   163       check: {
   164         typed:  'pref set tempTBool 4',
   165         markup: 'VVVVVVVVVVVVVVVVVVVE',
   166         status: 'ERROR',
   167         hints: ''
   168       }
   169     },
   170     {
   171       setup:    'pref set tempNumber 4',
   172       check: {
   173         typed:  'pref set tempNumber 4',
   174         markup: 'VVVVVVVVVVVVVVVVVVVVV',
   175         status: 'VALID',
   176         hints: ''
   177       }
   178     }
   179   ]);
   180 };

mercurial