This repository was archived by the owner on Jul 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ MOCHITEST_BROWSER_FILES := \
2828 page_privatestorageevent.html
2929 $(NULL)
3030
31- ifeq (Linux,$(OS_ARCH ) )
31+ ifeq (, $( filter-out Linux WINNT ,$(OS_ARCH ) ) )
3232MOCHITEST_BROWSER_FILES += \
3333 browser_webapps_permissions.js \
3434 test-webapp.webapp \
@@ -39,7 +39,7 @@ MOCHITEST_BROWSER_FILES += \
3939endif
4040
4141
42- # TODO: Re-enable permissions tests on Mac and Windows , bug 795334
42+ # TODO: Re-enable permissions tests on Mac, bug 795334
4343# TODO: disabled test browser_webapps_perms_reinstall.js, re-enable when bug 794920 is fixed
4444
4545include $(topsrcdir ) /config/rules.mk
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ function log()
1818let scope = { } ;
1919Cu . import ( "resource://gre/modules/PermissionSettings.jsm" , scope ) ;
2020
21+ var windowMediator = Cc [ "@mozilla.org/appshell/window-mediator;1" ]
22+ . getService ( Ci . nsIWindowMediator ) ;
23+
2124const TEST_URL =
2225 "http://mochi.test:8888/browser/dom/tests/browser/test-webapps-permissions.html" ;
2326const TEST_MANIFEST_URL =
@@ -57,6 +60,14 @@ function test() {
5760 registerCleanupFunction ( function ( ) {
5861 gWindow = null ;
5962 gBrowser . removeTab ( tab ) ;
63+
64+ // The installation may have created a XUL alert window
65+ // (see webappsUI.installationSuccessNotification).
66+ // It need to be closed before the test finishes.
67+ var browsers = windowMediator . getEnumerator ( 'alert:alert' ) ;
68+ while ( browsers . hasMoreElements ( ) ) {
69+ browsers . getNext ( ) . close ( ) ;
70+ }
6071 } ) ;
6172
6273 browser . addEventListener ( "DOMContentLoaded" , function onLoad ( event ) {
@@ -91,6 +102,7 @@ function test() {
91102 for ( let permName in installedPermsToTest ) {
92103 testPerm ( permName , installedPermsToTest [ permName ] ) ;
93104 }
105+
94106 // uninstall checks
95107 uninstallApp ( ) ;
96108 } ;
You can’t perform that action at this time.
0 commit comments