content/base/test/test_bug368972.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=368972
     5 -->
     6 <head>
     7   <title>Test for Bug 368972</title>
     8   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    10 <style type="text/css">
    11 #embed11, #object11 {
    12   width: 400px;
    13   height: 400px;
    14 }
    15 </style>
    16 </head>
    17 <body>
    18 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=368972">Mozilla Bug 368972</a>
    19 <p id="display"></p>
    20 <div id="content">
    21 Embed without defined width/height:
    22 <embed id="embed1" type="bogus"><br>
    23 Embed width=0 height=0
    24 <embed id="embed2" type="bogus" width="0" height="0"><br>
    25 Embed width=100 height=100
    26 <embed id="embed3" type="bogus" width="100" height="100"><br>
    27 Embed height=100
    28 <embed id="embed4" type="bogus" height="100"><br>
    29 Embed width=100
    30 <embed id="embed5" type="bogus" width="100"><br>
    31 Embed width=100xxx height=100
    32 <embed id="embed6" type="bogus" width="100xxx" height="100"><br>
    33 Embed width=0100 height=100
    34 <embed id="embed7" type="bogus" width="0100" height="100"><br>
    35 Embed width= height=100
    36 <embed id="embed8" type="bogus" width="" height="100"><br>
    37 Embed width=100 height=100 style="width:400px"
    38 <embed id="embed9" type="bogus" width="100" height="100" style="width:400px;"><br>
    39 Embed height=100 style="width:400px"
    40 <embed id="embed10" type="bogus" height="100" style="width:400px;"><br>
    41 Embed height=100 (stylesheet width:400px height:400px)
    42 <embed id="embed11" type="bogus" height="100"><br>
    44 Object without defined width/height:
    45 <object id="object1" type="bogus">
    46 </object><br>
    47 Object width=0 height=0
    48 <object id="object2" type="bogus" width="0" height="0">
    49 </object><br>
    50 Object width=100 height=100
    51 <object id="object3" type="bogus" width="100" height="100">
    52 </object><br>
    53 Object height=100
    54 <object id="object4" type="bogus" height="100">
    55 </object><br>
    56 Object width=100
    57 <object id="object5" type="bogus" width="100">
    58 </object><br>
    59 Object width=100xxx height=100
    60 <object id="object6" type="bogus" width="100xxx" height="100">
    61 </object><br>
    62 Object width=0100 height=100
    63 <object id="object7" type="bogus" width="0100" height="100">
    64 </object><br>
    65 Object width= height=100
    66 <object id="object8" type="bogus" width="" height="100">
    67 </object><br>
    68 Object width=100 height=100 style="width:400px"
    69 <object id="object9" type="bogus" width="100" height="100" style="width:400px;">
    70 </object><br>
    71 Object height=100 style="width:400px"
    72 <object id="object10" type="bogus" height="100" style="width:400px;">
    73 </object><br>
    74 Object height=100 (stylesheet width:400px height:400px)
    75 <object id="object11" type="bogus" height="100">
    76 </object><br>
    77 </div>
    78 <pre id="test">
    79 <script class="testbody" type="text/javascript">
    80 function check_size(id, width, height) {
    81   var element = document.getElementById(id);
    82   ok(element, "Plugin element " + id + " did not exist");
    83   var style = window.getComputedStyle(element, null);
    84   is(style.width, width + "px", "Plugin element " + id + " had an incorrect width");
    85   is(style.height, height + "px", "Plugin element " + id + " had an incorrect height");
    86 }
    88 check_size("embed1", 240, 200);
    89 check_size("embed2", 0, 0);
    90 check_size("embed3", 100, 100);
    91 check_size("embed4", 240, 100);
    92 check_size("embed5", 100, 200);
    93 check_size("embed6", 100, 100);
    94 check_size("embed7", 100, 100);
    95 check_size("embed8", 240, 100);
    96 check_size("embed9", 400, 100);
    97 check_size("embed10", 400, 100);
    98 check_size("embed11", 400, 400);
   100 check_size("object1", 240, 200);
   101 check_size("object2", 0, 0);
   102 check_size("object3", 100, 100);
   103 check_size("object4", 240, 100);
   104 check_size("object5", 100, 200);
   105 check_size("object6", 100, 100);
   106 check_size("object7", 100, 100);
   107 check_size("object8", 240, 100);
   108 check_size("object9", 400, 100);
   109 check_size("object10", 400, 100);
   110 check_size("object11", 400, 400);
   111 </script>
   112 </pre>
   113 </body>
   114 </html>

mercurial