toolkit/themes/osx/mochitests/test_bug510426.xul

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 <?xml version="1.0"?>
     2 <!-- This Source Code Form is subject to the terms of the Mozilla Public
     3    - License, v. 2.0. If a copy of the MPL was not distributed with this
     4    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
     6 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
     7 <?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
     8 <!--
     9 https://bugzilla.mozilla.org/show_bug.cgi?id=510426
    10 -->
    11 <window title="Mozilla Bug 510426"
    12   xmlns:html="http://www.w3.org/1999/xhtml"
    13   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    14   align="start">
    15   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
    17 <body  xmlns="http://www.w3.org/1999/xhtml">
    18 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=510426">Mozilla Bug 510426</a>
    19 </body>
    21 <notificationbox id="nb" width="300" height="100">
    22   <box width="100" height="100" id="overflowGenerator"/>
    23 </notificationbox>
    25 <script class="testbody" type="application/javascript">
    26 <![CDATA[
    28 /** Test for Bug 510426 **/
    29 SimpleTest.waitForExplicitFinish();
    31 function openNotification() {
    32   var nb = document.getElementById("nb");
    33   var n = nb.appendNotification("Notification", "", null,
    34                                 nb.PRIORITY_WARNING_LOW, [{
    35                                   label: "Button",
    36                                   accesskey: "u",
    37                                   callback: null,
    38                                   popup: null
    39                                 }]);
    40   n.addEventListener("transitionend", function (event) {
    41     if (event.propertyName == "margin-top") {
    42       setTimeout(function () {
    43         is(n.getBoundingClientRect().height, 27, "notification bar has wrong height");
    44         SimpleTest.finish();
    45       }, 0);
    46     }
    47   }, false);
    48 }
    50 window.onload = openNotification;
    52 ]]>
    53 </script>
    54 </window>

mercurial