browser/devtools/responsivedesign/test/browser_responsive_cmd.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 /* Any copyright is dedicated to the Public Domain.
     2  * http://creativecommons.org/publicdomain/zero/1.0/ */
     4 function test() {
     5   function isOpen() {
     6     return !!gBrowser.selectedTab.__responsiveUI;
     7   }
     9   helpers.addTabWithToolbar("about:blank", function(options) {
    10     return helpers.audit(options, [
    11       {
    12         setup: "resize toggle",
    13         check: {
    14           input:  'resize toggle',
    15           hints:               '',
    16           markup: 'VVVVVVVVVVVVV',
    17           status: 'VALID'
    18         },
    19         exec: {
    20           output: ""
    21         },
    22         post: function() {
    23           ok(isOpen(), "responsive mode is open");
    24         },
    25       },
    26       {
    27         setup: "resize toggle",
    28         check: {
    29           input:  'resize toggle',
    30           hints:               '',
    31           markup: 'VVVVVVVVVVVVV',
    32           status: 'VALID'
    33         },
    34         exec: {
    35           output: ""
    36         },
    37         post: function() {
    38           ok(!isOpen(), "responsive mode is closed");
    39         },
    40       },
    41       {
    42         setup: "resize on",
    43         check: {
    44           input:  'resize on',
    45           hints:           '',
    46           markup: 'VVVVVVVVV',
    47           status: 'VALID'
    48         },
    49         exec: {
    50           output: ""
    51         },
    52         post: function() {
    53           ok(isOpen(), "responsive mode is open");
    54         },
    55       },
    56       {
    57         setup: "resize off",
    58         check: {
    59           input:  'resize off',
    60           hints:            '',
    61           markup: 'VVVVVVVVVV',
    62           status: 'VALID'
    63         },
    64         exec: {
    65           output: ""
    66         },
    67         post: function() {
    68           ok(!isOpen(), "responsive mode is closed");
    69         },
    70       },
    71       {
    72         setup: "resize to 400 400",
    73         check: {
    74           input:  'resize to 400 400',
    75           hints:                   '',
    76           markup: 'VVVVVVVVVVVVVVVVV',
    77           status: 'VALID',
    78           args: {
    79             width: { value: 400 },
    80             height: { value: 400 },
    81           }
    82         },
    83         exec: {
    84           output: ""
    85         },
    86         post: function() {
    87           ok(isOpen(), "responsive mode is open");
    88         },
    89       },
    90       {
    91         setup: "resize off",
    92         check: {
    93           input:  'resize off',
    94           hints:            '',
    95           markup: 'VVVVVVVVVV',
    96           status: 'VALID'
    97         },
    98         exec: {
    99           output: ""
   100         },
   101         post: function() {
   102           ok(!isOpen(), "responsive mode is closed");
   103         },
   104       },
   105     ]);
   106   }).then(finish);
   107 }

mercurial