|
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/. --> |
|
5 |
|
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"/> |
|
16 |
|
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> |
|
20 |
|
21 <notificationbox id="nb" width="300" height="100"> |
|
22 <box width="100" height="100" id="overflowGenerator"/> |
|
23 </notificationbox> |
|
24 |
|
25 <script class="testbody" type="application/javascript"> |
|
26 <![CDATA[ |
|
27 |
|
28 /** Test for Bug 510426 **/ |
|
29 SimpleTest.waitForExplicitFinish(); |
|
30 |
|
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 } |
|
49 |
|
50 window.onload = openNotification; |
|
51 |
|
52 ]]> |
|
53 </script> |
|
54 </window> |