toolkit/themes/osx/mochitests/test_bug510426.xul

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/themes/osx/mochitests/test_bug510426.xul	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,54 @@
     1.4 +<?xml version="1.0"?>
     1.5 +<!-- This Source Code Form is subject to the terms of the Mozilla Public
     1.6 +   - License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 +   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
     1.8 +
     1.9 +<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
    1.10 +<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
    1.11 +<!--
    1.12 +https://bugzilla.mozilla.org/show_bug.cgi?id=510426
    1.13 +-->
    1.14 +<window title="Mozilla Bug 510426"
    1.15 +  xmlns:html="http://www.w3.org/1999/xhtml"
    1.16 +  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    1.17 +  align="start">
    1.18 +  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
    1.19 +
    1.20 +<body  xmlns="http://www.w3.org/1999/xhtml">
    1.21 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=510426">Mozilla Bug 510426</a>
    1.22 +</body>
    1.23 +
    1.24 +<notificationbox id="nb" width="300" height="100">
    1.25 +  <box width="100" height="100" id="overflowGenerator"/>
    1.26 +</notificationbox>
    1.27 +
    1.28 +<script class="testbody" type="application/javascript">
    1.29 +<![CDATA[
    1.30 +
    1.31 +/** Test for Bug 510426 **/
    1.32 +SimpleTest.waitForExplicitFinish();
    1.33 +
    1.34 +function openNotification() {
    1.35 +  var nb = document.getElementById("nb");
    1.36 +  var n = nb.appendNotification("Notification", "", null,
    1.37 +                                nb.PRIORITY_WARNING_LOW, [{
    1.38 +                                  label: "Button",
    1.39 +                                  accesskey: "u",
    1.40 +                                  callback: null,
    1.41 +                                  popup: null
    1.42 +                                }]);
    1.43 +  n.addEventListener("transitionend", function (event) {
    1.44 +    if (event.propertyName == "margin-top") {
    1.45 +      setTimeout(function () {
    1.46 +        is(n.getBoundingClientRect().height, 27, "notification bar has wrong height");
    1.47 +        SimpleTest.finish();
    1.48 +      }, 0);
    1.49 +    }
    1.50 +  }, false);
    1.51 +}
    1.52 +
    1.53 +window.onload = openNotification;
    1.54 +
    1.55 +]]>
    1.56 +</script>
    1.57 +</window>

mercurial