mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bee9457f0a
--HG-- rename : browser/base/content/test/Makefile.in => browser/base/content/test/general/Makefile.in rename : browser/base/content/test/POSTSearchEngine.xml => browser/base/content/test/general/POSTSearchEngine.xml rename : browser/base/content/test/alltabslistener.html => browser/base/content/test/general/alltabslistener.html rename : browser/base/content/test/app_bug575561.html => browser/base/content/test/general/app_bug575561.html rename : browser/base/content/test/app_subframe_bug575561.html => browser/base/content/test/general/app_subframe_bug575561.html rename : browser/base/content/test/audio.ogg => browser/base/content/test/general/audio.ogg rename : browser/base/content/test/authenticate.sjs => browser/base/content/test/general/authenticate.sjs rename : browser/base/content/test/blockNoPlugins.xml => browser/base/content/test/general/blockNoPlugins.xml rename : browser/base/content/test/blockPluginHard.xml => browser/base/content/test/general/blockPluginHard.xml rename : browser/base/content/test/blockPluginVulnerableNoUpdate.xml => browser/base/content/test/general/blockPluginVulnerableNoUpdate.xml rename : browser/base/content/test/blockPluginVulnerableUpdatable.xml => browser/base/content/test/general/blockPluginVulnerableUpdatable.xml rename : browser/base/content/test/browser_CTP_context_menu.js => browser/base/content/test/general/browser_CTP_context_menu.js rename : browser/base/content/test/browser_CTP_data_urls.js => browser/base/content/test/general/browser_CTP_data_urls.js rename : browser/base/content/test/browser_CTP_drag_drop.js => browser/base/content/test/general/browser_CTP_drag_drop.js rename : browser/base/content/test/browser_URLBarSetURI.js => browser/base/content/test/general/browser_URLBarSetURI.js rename : browser/base/content/test/browser_aboutHealthReport.js => browser/base/content/test/general/browser_aboutHealthReport.js rename : browser/base/content/test/browser_aboutHome.js => browser/base/content/test/general/browser_aboutHome.js rename : browser/base/content/test/browser_aboutSyncProgress.js => browser/base/content/test/general/browser_aboutSyncProgress.js rename : browser/base/content/test/browser_addKeywordSearch.js => browser/base/content/test/general/browser_addKeywordSearch.js rename : browser/base/content/test/browser_addon_bar.js => browser/base/content/test/general/browser_addon_bar.js rename : browser/base/content/test/browser_addon_bar_aomlistener.js => browser/base/content/test/general/browser_addon_bar_aomlistener.js rename : browser/base/content/test/browser_addon_bar_close_button.js => browser/base/content/test/general/browser_addon_bar_close_button.js rename : browser/base/content/test/browser_addon_bar_shortcut.js => browser/base/content/test/general/browser_addon_bar_shortcut.js rename : browser/base/content/test/browser_alltabslistener.js => browser/base/content/test/general/browser_alltabslistener.js rename : browser/base/content/test/browser_blob-channelname.js => browser/base/content/test/general/browser_blob-channelname.js rename : browser/base/content/test/browser_bookmark_titles.js => browser/base/content/test/general/browser_bookmark_titles.js rename : browser/base/content/test/browser_bug304198.js => browser/base/content/test/general/browser_bug304198.js rename : browser/base/content/test/browser_bug321000.js => browser/base/content/test/general/browser_bug321000.js rename : browser/base/content/test/browser_bug329212.js => browser/base/content/test/general/browser_bug329212.js rename : browser/base/content/test/browser_bug356571.js => browser/base/content/test/general/browser_bug356571.js rename : browser/base/content/test/browser_bug380960.js => browser/base/content/test/general/browser_bug380960.js rename : browser/base/content/test/browser_bug386835.js => browser/base/content/test/general/browser_bug386835.js rename : browser/base/content/test/browser_bug405137.js => browser/base/content/test/general/browser_bug405137.js rename : browser/base/content/test/browser_bug406216.js => browser/base/content/test/general/browser_bug406216.js rename : browser/base/content/test/browser_bug409481.js => browser/base/content/test/general/browser_bug409481.js rename : browser/base/content/test/browser_bug409624.js => browser/base/content/test/general/browser_bug409624.js rename : browser/base/content/test/browser_bug413915.js => browser/base/content/test/general/browser_bug413915.js rename : browser/base/content/test/browser_bug416661.js => browser/base/content/test/general/browser_bug416661.js rename : browser/base/content/test/browser_bug417483.js => browser/base/content/test/general/browser_bug417483.js rename : browser/base/content/test/browser_bug419612.js => browser/base/content/test/general/browser_bug419612.js rename : browser/base/content/test/browser_bug422590.js => browser/base/content/test/general/browser_bug422590.js rename : browser/base/content/test/browser_bug423833.js => browser/base/content/test/general/browser_bug423833.js rename : browser/base/content/test/browser_bug424101.js => browser/base/content/test/general/browser_bug424101.js rename : browser/base/content/test/browser_bug427559.js => browser/base/content/test/general/browser_bug427559.js rename : browser/base/content/test/browser_bug432599.js => browser/base/content/test/general/browser_bug432599.js rename : browser/base/content/test/browser_bug435035.js => browser/base/content/test/general/browser_bug435035.js rename : browser/base/content/test/browser_bug435325.js => browser/base/content/test/general/browser_bug435325.js rename : browser/base/content/test/browser_bug441778.js => browser/base/content/test/general/browser_bug441778.js rename : browser/base/content/test/browser_bug455852.js => browser/base/content/test/general/browser_bug455852.js rename : browser/base/content/test/browser_bug460146.js => browser/base/content/test/general/browser_bug460146.js rename : browser/base/content/test/browser_bug462289.js => browser/base/content/test/general/browser_bug462289.js rename : browser/base/content/test/browser_bug462673.js => browser/base/content/test/general/browser_bug462673.js rename : browser/base/content/test/browser_bug477014.js => browser/base/content/test/general/browser_bug477014.js rename : browser/base/content/test/browser_bug479408.js => browser/base/content/test/general/browser_bug479408.js rename : browser/base/content/test/browser_bug479408_sample.html => browser/base/content/test/general/browser_bug479408_sample.html rename : browser/base/content/test/browser_bug481560.js => browser/base/content/test/general/browser_bug481560.js rename : browser/base/content/test/browser_bug484315.js => browser/base/content/test/general/browser_bug484315.js rename : browser/base/content/test/browser_bug491431.js => browser/base/content/test/general/browser_bug491431.js rename : browser/base/content/test/browser_bug495058.js => browser/base/content/test/general/browser_bug495058.js rename : browser/base/content/test/browser_bug517902.js => browser/base/content/test/general/browser_bug517902.js rename : browser/base/content/test/browser_bug519216.js => browser/base/content/test/general/browser_bug519216.js rename : browser/base/content/test/browser_bug520538.js => browser/base/content/test/general/browser_bug520538.js rename : browser/base/content/test/browser_bug521216.js => browser/base/content/test/general/browser_bug521216.js rename : browser/base/content/test/browser_bug533232.js => browser/base/content/test/general/browser_bug533232.js rename : browser/base/content/test/browser_bug537013.js => browser/base/content/test/general/browser_bug537013.js rename : browser/base/content/test/browser_bug537474.js => browser/base/content/test/general/browser_bug537474.js rename : browser/base/content/test/browser_bug550565.js => browser/base/content/test/general/browser_bug550565.js rename : browser/base/content/test/browser_bug553455.js => browser/base/content/test/general/browser_bug553455.js rename : browser/base/content/test/browser_bug555224.js => browser/base/content/test/general/browser_bug555224.js rename : browser/base/content/test/browser_bug555767.js => browser/base/content/test/general/browser_bug555767.js rename : browser/base/content/test/browser_bug556061.js => browser/base/content/test/general/browser_bug556061.js rename : browser/base/content/test/browser_bug559991.js => browser/base/content/test/general/browser_bug559991.js rename : browser/base/content/test/browser_bug561623.js => browser/base/content/test/general/browser_bug561623.js rename : browser/base/content/test/browser_bug561636.js => browser/base/content/test/general/browser_bug561636.js rename : browser/base/content/test/browser_bug562649.js => browser/base/content/test/general/browser_bug562649.js rename : browser/base/content/test/browser_bug563588.js => browser/base/content/test/general/browser_bug563588.js rename : browser/base/content/test/browser_bug565575.js => browser/base/content/test/general/browser_bug565575.js rename : browser/base/content/test/browser_bug565667.js => browser/base/content/test/general/browser_bug565667.js rename : browser/base/content/test/browser_bug567306.js => browser/base/content/test/general/browser_bug567306.js rename : browser/base/content/test/browser_bug575561.js => browser/base/content/test/general/browser_bug575561.js rename : browser/base/content/test/browser_bug575830.js => browser/base/content/test/general/browser_bug575830.js rename : browser/base/content/test/browser_bug577121.js => browser/base/content/test/general/browser_bug577121.js rename : browser/base/content/test/browser_bug578534.js => browser/base/content/test/general/browser_bug578534.js rename : browser/base/content/test/browser_bug579872.js => browser/base/content/test/general/browser_bug579872.js rename : browser/base/content/test/browser_bug580638.js => browser/base/content/test/general/browser_bug580638.js rename : browser/base/content/test/browser_bug580956.js => browser/base/content/test/general/browser_bug580956.js rename : browser/base/content/test/browser_bug581242.js => browser/base/content/test/general/browser_bug581242.js rename : browser/base/content/test/browser_bug581253.js => browser/base/content/test/general/browser_bug581253.js rename : browser/base/content/test/browser_bug581947.js => browser/base/content/test/general/browser_bug581947.js rename : browser/base/content/test/browser_bug585558.js => browser/base/content/test/general/browser_bug585558.js rename : browser/base/content/test/browser_bug585785.js => browser/base/content/test/general/browser_bug585785.js rename : browser/base/content/test/browser_bug585830.js => browser/base/content/test/general/browser_bug585830.js rename : browser/base/content/test/browser_bug590206.js => browser/base/content/test/general/browser_bug590206.js rename : browser/base/content/test/browser_bug592338.js => browser/base/content/test/general/browser_bug592338.js rename : browser/base/content/test/browser_bug594131.js => browser/base/content/test/general/browser_bug594131.js rename : browser/base/content/test/browser_bug595507.js => browser/base/content/test/general/browser_bug595507.js rename : browser/base/content/test/browser_bug596687.js => browser/base/content/test/general/browser_bug596687.js rename : browser/base/content/test/browser_bug597218.js => browser/base/content/test/general/browser_bug597218.js rename : browser/base/content/test/browser_bug598923.js => browser/base/content/test/general/browser_bug598923.js rename : browser/base/content/test/browser_bug599325.js => browser/base/content/test/general/browser_bug599325.js rename : browser/base/content/test/browser_bug609700.js => browser/base/content/test/general/browser_bug609700.js rename : browser/base/content/test/browser_bug616836.js => browser/base/content/test/general/browser_bug616836.js rename : browser/base/content/test/browser_bug623155.js => browser/base/content/test/general/browser_bug623155.js rename : browser/base/content/test/browser_bug623893.js => browser/base/content/test/general/browser_bug623893.js rename : browser/base/content/test/browser_bug624734.js => browser/base/content/test/general/browser_bug624734.js rename : browser/base/content/test/browser_bug647886.js => browser/base/content/test/general/browser_bug647886.js rename : browser/base/content/test/browser_bug655584.js => browser/base/content/test/general/browser_bug655584.js rename : browser/base/content/test/browser_bug664672.js => browser/base/content/test/general/browser_bug664672.js rename : browser/base/content/test/browser_bug676619.js => browser/base/content/test/general/browser_bug676619.js rename : browser/base/content/test/browser_bug678392-1.html => browser/base/content/test/general/browser_bug678392-1.html rename : browser/base/content/test/browser_bug678392-2.html => browser/base/content/test/general/browser_bug678392-2.html rename : browser/base/content/test/browser_bug678392.js => browser/base/content/test/general/browser_bug678392.js rename : browser/base/content/test/browser_bug710878.js => browser/base/content/test/general/browser_bug710878.js rename : browser/base/content/test/browser_bug719271.js => browser/base/content/test/general/browser_bug719271.js rename : browser/base/content/test/browser_bug724239.js => browser/base/content/test/general/browser_bug724239.js rename : browser/base/content/test/browser_bug734076.js => browser/base/content/test/general/browser_bug734076.js rename : browser/base/content/test/browser_bug735471.js => browser/base/content/test/general/browser_bug735471.js rename : browser/base/content/test/browser_bug743421.js => browser/base/content/test/general/browser_bug743421.js rename : browser/base/content/test/browser_bug744745.js => browser/base/content/test/general/browser_bug744745.js rename : browser/base/content/test/browser_bug749738.js => browser/base/content/test/general/browser_bug749738.js rename : browser/base/content/test/browser_bug752516.js => browser/base/content/test/general/browser_bug752516.js rename : browser/base/content/test/browser_bug763468_perwindowpb.js => browser/base/content/test/general/browser_bug763468_perwindowpb.js rename : browser/base/content/test/browser_bug767836_perwindowpb.js => browser/base/content/test/general/browser_bug767836_perwindowpb.js rename : browser/base/content/test/browser_bug771331.js => browser/base/content/test/general/browser_bug771331.js rename : browser/base/content/test/browser_bug783614.js => browser/base/content/test/general/browser_bug783614.js rename : browser/base/content/test/browser_bug787619.js => browser/base/content/test/general/browser_bug787619.js rename : browser/base/content/test/browser_bug797677.js => browser/base/content/test/general/browser_bug797677.js rename : browser/base/content/test/browser_bug812562.js => browser/base/content/test/general/browser_bug812562.js rename : browser/base/content/test/browser_bug816527.js => browser/base/content/test/general/browser_bug816527.js rename : browser/base/content/test/browser_bug817947.js => browser/base/content/test/general/browser_bug817947.js rename : browser/base/content/test/browser_bug818118.js => browser/base/content/test/general/browser_bug818118.js rename : browser/base/content/test/browser_bug820497.js => browser/base/content/test/general/browser_bug820497.js rename : browser/base/content/test/browser_bug822367.js => browser/base/content/test/general/browser_bug822367.js rename : browser/base/content/test/browser_bug832435.js => browser/base/content/test/general/browser_bug832435.js rename : browser/base/content/test/browser_bug839103.js => browser/base/content/test/general/browser_bug839103.js rename : browser/base/content/test/browser_bug880101.js => browser/base/content/test/general/browser_bug880101.js rename : browser/base/content/test/browser_bug882977.js => browser/base/content/test/general/browser_bug882977.js rename : browser/base/content/test/browser_bug887515.js => browser/base/content/test/general/browser_bug887515.js rename : browser/base/content/test/browser_bug902156.js => browser/base/content/test/general/browser_bug902156.js rename : browser/base/content/test/browser_canonizeURL.js => browser/base/content/test/general/browser_canonizeURL.js rename : browser/base/content/test/browser_clearplugindata.html => browser/base/content/test/general/browser_clearplugindata.html rename : browser/base/content/test/browser_clearplugindata.js => browser/base/content/test/general/browser_clearplugindata.js rename : browser/base/content/test/browser_clearplugindata_noage.html => browser/base/content/test/general/browser_clearplugindata_noage.html rename : browser/base/content/test/browser_contentAreaClick.js => browser/base/content/test/general/browser_contentAreaClick.js rename : browser/base/content/test/browser_contextSearchTabPosition.js => browser/base/content/test/general/browser_contextSearchTabPosition.js rename : browser/base/content/test/browser_ctrlTab.js => browser/base/content/test/general/browser_ctrlTab.js rename : browser/base/content/test/browser_customize.js => browser/base/content/test/general/browser_customize.js rename : browser/base/content/test/browser_customize_popupNotification.js => browser/base/content/test/general/browser_customize_popupNotification.js rename : browser/base/content/test/browser_datareporting_notification.js => browser/base/content/test/general/browser_datareporting_notification.js rename : browser/base/content/test/browser_disablechrome.js => browser/base/content/test/general/browser_disablechrome.js rename : browser/base/content/test/browser_discovery.js => browser/base/content/test/general/browser_discovery.js rename : browser/base/content/test/browser_drag.js => browser/base/content/test/general/browser_drag.js rename : browser/base/content/test/browser_duplicateIDs.js => browser/base/content/test/general/browser_duplicateIDs.js rename : browser/base/content/test/browser_findbarClose.js => browser/base/content/test/general/browser_findbarClose.js rename : browser/base/content/test/browser_fullscreen-window-open.js => browser/base/content/test/general/browser_fullscreen-window-open.js rename : browser/base/content/test/browser_gestureSupport.js => browser/base/content/test/general/browser_gestureSupport.js rename : browser/base/content/test/browser_getshortcutoruri.js => browser/base/content/test/general/browser_getshortcutoruri.js rename : browser/base/content/test/browser_hide_removing.js => browser/base/content/test/general/browser_hide_removing.js rename : browser/base/content/test/browser_homeDrop.js => browser/base/content/test/general/browser_homeDrop.js rename : browser/base/content/test/browser_identity_UI.js => browser/base/content/test/general/browser_identity_UI.js rename : browser/base/content/test/browser_keywordBookmarklets.js => browser/base/content/test/general/browser_keywordBookmarklets.js rename : browser/base/content/test/browser_keywordSearch.js => browser/base/content/test/general/browser_keywordSearch.js rename : browser/base/content/test/browser_keywordSearch_postData.js => browser/base/content/test/general/browser_keywordSearch_postData.js rename : browser/base/content/test/browser_lastAccessedTab.js => browser/base/content/test/general/browser_lastAccessedTab.js rename : browser/base/content/test/browser_locationBarCommand.js => browser/base/content/test/general/browser_locationBarCommand.js rename : browser/base/content/test/browser_locationBarExternalLoad.js => browser/base/content/test/general/browser_locationBarExternalLoad.js rename : browser/base/content/test/browser_middleMouse_inherit.js => browser/base/content/test/general/browser_middleMouse_inherit.js rename : browser/base/content/test/browser_minimize.js => browser/base/content/test/general/browser_minimize.js rename : browser/base/content/test/browser_mixedcontent_securityflags.js => browser/base/content/test/general/browser_mixedcontent_securityflags.js rename : browser/base/content/test/browser_offlineQuotaNotification.js => browser/base/content/test/general/browser_offlineQuotaNotification.js rename : browser/base/content/test/browser_overflowScroll.js => browser/base/content/test/general/browser_overflowScroll.js rename : browser/base/content/test/browser_pageInfo.js => browser/base/content/test/general/browser_pageInfo.js rename : browser/base/content/test/browser_pageInfo_plugins.js => browser/base/content/test/general/browser_pageInfo_plugins.js rename : browser/base/content/test/browser_page_style_menu.js => browser/base/content/test/general/browser_page_style_menu.js rename : browser/base/content/test/browser_pinnedTabs.js => browser/base/content/test/general/browser_pinnedTabs.js rename : browser/base/content/test/browser_plainTextLinks.js => browser/base/content/test/general/browser_plainTextLinks.js rename : browser/base/content/test/browser_pluginCrashCommentAndURL.js => browser/base/content/test/general/browser_pluginCrashCommentAndURL.js rename : browser/base/content/test/browser_pluginnotification.js => browser/base/content/test/general/browser_pluginnotification.js rename : browser/base/content/test/browser_pluginplaypreview.js => browser/base/content/test/general/browser_pluginplaypreview.js rename : browser/base/content/test/browser_pluginplaypreview2.js => browser/base/content/test/general/browser_pluginplaypreview2.js rename : browser/base/content/test/browser_plugins_added_dynamically.js => browser/base/content/test/general/browser_plugins_added_dynamically.js rename : browser/base/content/test/browser_popupNotification.js => browser/base/content/test/general/browser_popupNotification.js rename : browser/base/content/test/browser_popupUI.js => browser/base/content/test/general/browser_popupUI.js rename : browser/base/content/test/browser_private_browsing_window.js => browser/base/content/test/general/browser_private_browsing_window.js rename : browser/base/content/test/browser_private_no_prompt.js => browser/base/content/test/general/browser_private_no_prompt.js rename : browser/base/content/test/browser_relatedTabs.js => browser/base/content/test/general/browser_relatedTabs.js rename : browser/base/content/test/browser_removeTabsToTheEnd.js => browser/base/content/test/general/browser_removeTabsToTheEnd.js rename : browser/base/content/test/browser_sanitize-download-history.js => browser/base/content/test/general/browser_sanitize-download-history.js rename : browser/base/content/test/browser_sanitize-passwordDisabledHosts.js => browser/base/content/test/general/browser_sanitize-passwordDisabledHosts.js rename : browser/base/content/test/browser_sanitize-sitepermissions.js => browser/base/content/test/general/browser_sanitize-sitepermissions.js rename : browser/base/content/test/browser_sanitize-timespans.js => browser/base/content/test/general/browser_sanitize-timespans.js rename : browser/base/content/test/browser_sanitizeDialog.js => browser/base/content/test/general/browser_sanitizeDialog.js rename : browser/base/content/test/browser_sanitizeDialog_treeView.js => browser/base/content/test/general/browser_sanitizeDialog_treeView.js rename : browser/base/content/test/browser_save_link-perwindowpb.js => browser/base/content/test/general/browser_save_link-perwindowpb.js rename : browser/base/content/test/browser_save_private_link_perwindowpb.js => browser/base/content/test/general/browser_save_private_link_perwindowpb.js rename : browser/base/content/test/browser_save_video.js => browser/base/content/test/general/browser_save_video.js rename : browser/base/content/test/browser_scope.js => browser/base/content/test/general/browser_scope.js rename : browser/base/content/test/browser_selectTabAtIndex.js => browser/base/content/test/general/browser_selectTabAtIndex.js rename : browser/base/content/test/browser_tabDrop.js => browser/base/content/test/general/browser_tabDrop.js rename : browser/base/content/test/browser_tabMatchesInAwesomebar_perwindowpb.js => browser/base/content/test/general/browser_tabMatchesInAwesomebar_perwindowpb.js rename : browser/base/content/test/browser_tab_drag_drop_perwindow.js => browser/base/content/test/general/browser_tab_drag_drop_perwindow.js rename : browser/base/content/test/browser_tab_dragdrop.js => browser/base/content/test/general/browser_tab_dragdrop.js rename : browser/base/content/test/browser_tab_dragdrop2.js => browser/base/content/test/general/browser_tab_dragdrop2.js rename : browser/base/content/test/browser_tab_dragdrop2_frame1.xul => browser/base/content/test/general/browser_tab_dragdrop2_frame1.xul rename : browser/base/content/test/browser_tabfocus.js => browser/base/content/test/general/browser_tabfocus.js rename : browser/base/content/test/browser_tabopen_reflows.js => browser/base/content/test/general/browser_tabopen_reflows.js rename : browser/base/content/test/browser_tabs_isActive.js => browser/base/content/test/general/browser_tabs_isActive.js rename : browser/base/content/test/browser_tabs_owner.js => browser/base/content/test/general/browser_tabs_owner.js rename : browser/base/content/test/browser_typeAheadFind.js => browser/base/content/test/general/browser_typeAheadFind.js rename : browser/base/content/test/browser_unloaddialogs.js => browser/base/content/test/general/browser_unloaddialogs.js rename : browser/base/content/test/browser_urlHighlight.js => browser/base/content/test/general/browser_urlHighlight.js rename : browser/base/content/test/browser_urlbarAutoFillTrimURLs.js => browser/base/content/test/general/browser_urlbarAutoFillTrimURLs.js rename : browser/base/content/test/browser_urlbarCopying.js => browser/base/content/test/general/browser_urlbarCopying.js rename : browser/base/content/test/browser_urlbarEnter.js => browser/base/content/test/general/browser_urlbarEnter.js rename : browser/base/content/test/browser_urlbarRevert.js => browser/base/content/test/general/browser_urlbarRevert.js rename : browser/base/content/test/browser_urlbarStop.js => browser/base/content/test/general/browser_urlbarStop.js rename : browser/base/content/test/browser_urlbarTrimURLs.js => browser/base/content/test/general/browser_urlbarTrimURLs.js rename : browser/base/content/test/browser_urlbar_search_healthreport.js => browser/base/content/test/general/browser_urlbar_search_healthreport.js rename : browser/base/content/test/browser_utilityOverlay.js => browser/base/content/test/general/browser_utilityOverlay.js rename : browser/base/content/test/browser_visibleFindSelection.js => browser/base/content/test/general/browser_visibleFindSelection.js rename : browser/base/content/test/browser_visibleTabs.js => browser/base/content/test/general/browser_visibleTabs.js rename : browser/base/content/test/browser_visibleTabs_bookmarkAllPages.js => browser/base/content/test/general/browser_visibleTabs_bookmarkAllPages.js rename : browser/base/content/test/browser_visibleTabs_bookmarkAllTabs.js => browser/base/content/test/general/browser_visibleTabs_bookmarkAllTabs.js rename : browser/base/content/test/browser_visibleTabs_contextMenu.js => browser/base/content/test/general/browser_visibleTabs_contextMenu.js rename : browser/base/content/test/browser_visibleTabs_tabPreview.js => browser/base/content/test/general/browser_visibleTabs_tabPreview.js rename : browser/base/content/test/browser_wyciwyg_urlbarCopying.js => browser/base/content/test/general/browser_wyciwyg_urlbarCopying.js rename : browser/base/content/test/browser_zbug569342.js => browser/base/content/test/general/browser_zbug569342.js rename : browser/base/content/test/bug364677-data.xml => browser/base/content/test/general/bug364677-data.xml rename : browser/base/content/test/bug364677-data.xml^headers^ => browser/base/content/test/general/bug364677-data.xml^headers^ rename : browser/base/content/test/bug395533-data.txt => browser/base/content/test/general/bug395533-data.txt rename : browser/base/content/test/bug564387.html => browser/base/content/test/general/bug564387.html rename : browser/base/content/test/bug564387_video1.ogv => browser/base/content/test/general/bug564387_video1.ogv rename : browser/base/content/test/bug564387_video1.ogv^headers^ => browser/base/content/test/general/bug564387_video1.ogv^headers^ rename : browser/base/content/test/bug592338.html => browser/base/content/test/general/bug592338.html rename : browser/base/content/test/bug792517-2.html => browser/base/content/test/general/bug792517-2.html rename : browser/base/content/test/bug792517.html => browser/base/content/test/general/bug792517.html rename : browser/base/content/test/bug792517.sjs => browser/base/content/test/general/bug792517.sjs rename : browser/base/content/test/bug839103.css => browser/base/content/test/general/bug839103.css rename : browser/base/content/test/contextmenu_common.js => browser/base/content/test/general/contextmenu_common.js rename : browser/base/content/test/ctxmenu-image.png => browser/base/content/test/general/ctxmenu-image.png rename : browser/base/content/test/disablechrome.html => browser/base/content/test/general/disablechrome.html rename : browser/base/content/test/discovery.html => browser/base/content/test/general/discovery.html rename : browser/base/content/test/domplate_test.js => browser/base/content/test/general/domplate_test.js rename : browser/base/content/test/download_page.html => browser/base/content/test/general/download_page.html rename : browser/base/content/test/dummy_page.html => browser/base/content/test/general/dummy_page.html rename : browser/base/content/test/feed_discovery.html => browser/base/content/test/general/feed_discovery.html rename : browser/base/content/test/feed_tab.html => browser/base/content/test/general/feed_tab.html rename : browser/base/content/test/file_bug550565_favicon.ico => browser/base/content/test/general/file_bug550565_favicon.ico rename : browser/base/content/test/file_bug550565_popup.html => browser/base/content/test/general/file_bug550565_popup.html rename : browser/base/content/test/file_bug822367_1.html => browser/base/content/test/general/file_bug822367_1.html rename : browser/base/content/test/file_bug822367_1.js => browser/base/content/test/general/file_bug822367_1.js rename : browser/base/content/test/file_bug822367_2.html => browser/base/content/test/general/file_bug822367_2.html rename : browser/base/content/test/file_bug822367_3.html => browser/base/content/test/general/file_bug822367_3.html rename : browser/base/content/test/file_bug822367_4.html => browser/base/content/test/general/file_bug822367_4.html rename : browser/base/content/test/file_bug822367_4.js => browser/base/content/test/general/file_bug822367_4.js rename : browser/base/content/test/file_bug822367_4B.html => browser/base/content/test/general/file_bug822367_4B.html rename : browser/base/content/test/file_bug822367_5.html => browser/base/content/test/general/file_bug822367_5.html rename : browser/base/content/test/file_bug822367_6.html => browser/base/content/test/general/file_bug822367_6.html rename : browser/base/content/test/file_bug902156.js => browser/base/content/test/general/file_bug902156.js rename : browser/base/content/test/file_bug902156_1.html => browser/base/content/test/general/file_bug902156_1.html rename : browser/base/content/test/file_bug902156_2.html => browser/base/content/test/general/file_bug902156_2.html rename : browser/base/content/test/file_bug902156_3.html => browser/base/content/test/general/file_bug902156_3.html rename : browser/base/content/test/file_fullscreen-window-open.html => browser/base/content/test/general/file_fullscreen-window-open.html rename : browser/base/content/test/gZipOfflineChild.cacheManifest => browser/base/content/test/general/gZipOfflineChild.cacheManifest rename : browser/base/content/test/gZipOfflineChild.cacheManifest^headers^ => browser/base/content/test/general/gZipOfflineChild.cacheManifest^headers^ rename : browser/base/content/test/gZipOfflineChild.html => browser/base/content/test/general/gZipOfflineChild.html rename : browser/base/content/test/gZipOfflineChild.html^headers^ => browser/base/content/test/general/gZipOfflineChild.html^headers^ rename : browser/base/content/test/gZipOfflineChild_uncompressed.html => browser/base/content/test/general/gZipOfflineChild_uncompressed.html rename : browser/base/content/test/head.js => browser/base/content/test/general/head.js rename : browser/base/content/test/head_plain.js => browser/base/content/test/general/head_plain.js rename : browser/base/content/test/healthreport_testRemoteCommands.html => browser/base/content/test/general/healthreport_testRemoteCommands.html rename : browser/base/content/test/newtab/moz.build => browser/base/content/test/general/moz.build rename : browser/base/content/test/moz.png => browser/base/content/test/general/moz.png rename : browser/base/content/test/offlineByDefault.js => browser/base/content/test/general/offlineByDefault.js rename : browser/base/content/test/offlineChild.cacheManifest => browser/base/content/test/general/offlineChild.cacheManifest rename : browser/base/content/test/offlineChild.cacheManifest^headers^ => browser/base/content/test/general/offlineChild.cacheManifest^headers^ rename : browser/base/content/test/offlineChild.html => browser/base/content/test/general/offlineChild.html rename : browser/base/content/test/offlineChild2.cacheManifest => browser/base/content/test/general/offlineChild2.cacheManifest rename : browser/base/content/test/offlineChild2.cacheManifest^headers^ => browser/base/content/test/general/offlineChild2.cacheManifest^headers^ rename : browser/base/content/test/offlineChild2.html => browser/base/content/test/general/offlineChild2.html rename : browser/base/content/test/offlineEvent.cacheManifest => browser/base/content/test/general/offlineEvent.cacheManifest rename : browser/base/content/test/offlineEvent.cacheManifest^headers^ => browser/base/content/test/general/offlineEvent.cacheManifest^headers^ rename : browser/base/content/test/offlineEvent.html => browser/base/content/test/general/offlineEvent.html rename : browser/base/content/test/offlineQuotaNotification.cacheManifest => browser/base/content/test/general/offlineQuotaNotification.cacheManifest rename : browser/base/content/test/offlineQuotaNotification.html => browser/base/content/test/general/offlineQuotaNotification.html rename : browser/base/content/test/page_style_sample.html => browser/base/content/test/general/page_style_sample.html rename : browser/base/content/test/pluginCrashCommentAndURL.html => browser/base/content/test/general/pluginCrashCommentAndURL.html rename : browser/base/content/test/plugin_add_dynamically.html => browser/base/content/test/general/plugin_add_dynamically.html rename : browser/base/content/test/plugin_alternate_content.html => browser/base/content/test/general/plugin_alternate_content.html rename : browser/base/content/test/plugin_both.html => browser/base/content/test/general/plugin_both.html rename : browser/base/content/test/plugin_both2.html => browser/base/content/test/general/plugin_both2.html rename : browser/base/content/test/plugin_bug744745.html => browser/base/content/test/general/plugin_bug744745.html rename : browser/base/content/test/plugin_bug749455.html => browser/base/content/test/general/plugin_bug749455.html rename : browser/base/content/test/plugin_bug752516.html => browser/base/content/test/general/plugin_bug752516.html rename : browser/base/content/test/plugin_bug787619.html => browser/base/content/test/general/plugin_bug787619.html rename : browser/base/content/test/plugin_bug797677.html => browser/base/content/test/general/plugin_bug797677.html rename : browser/base/content/test/plugin_bug820497.html => browser/base/content/test/general/plugin_bug820497.html rename : browser/base/content/test/plugin_clickToPlayAllow.html => browser/base/content/test/general/plugin_clickToPlayAllow.html rename : browser/base/content/test/plugin_clickToPlayDeny.html => browser/base/content/test/general/plugin_clickToPlayDeny.html rename : browser/base/content/test/plugin_data_url.html => browser/base/content/test/general/plugin_data_url.html rename : browser/base/content/test/plugin_hidden_to_visible.html => browser/base/content/test/general/plugin_hidden_to_visible.html rename : browser/base/content/test/plugin_test.html => browser/base/content/test/general/plugin_test.html rename : browser/base/content/test/plugin_test2.html => browser/base/content/test/general/plugin_test2.html rename : browser/base/content/test/plugin_test3.html => browser/base/content/test/general/plugin_test3.html rename : browser/base/content/test/plugin_two_types.html => browser/base/content/test/general/plugin_two_types.html rename : browser/base/content/test/plugin_unknown.html => browser/base/content/test/general/plugin_unknown.html rename : browser/base/content/test/print_postdata.sjs => browser/base/content/test/general/print_postdata.sjs rename : browser/base/content/test/privateBrowsingMode.js => browser/base/content/test/general/privateBrowsingMode.js rename : browser/base/content/test/redirect_bug623155.sjs => browser/base/content/test/general/redirect_bug623155.sjs rename : browser/base/content/test/subtst_contextmenu.html => browser/base/content/test/general/subtst_contextmenu.html rename : browser/base/content/test/test-mixedcontent-securityerrors.html => browser/base/content/test/general/test-mixedcontent-securityerrors.html rename : browser/base/content/test/test_bug364677.html => browser/base/content/test/general/test_bug364677.html rename : browser/base/content/test/test_bug395533.html => browser/base/content/test/general/test_bug395533.html rename : browser/base/content/test/test_bug435035.html => browser/base/content/test/general/test_bug435035.html rename : browser/base/content/test/test_bug452451.html => browser/base/content/test/general/test_bug452451.html rename : browser/base/content/test/test_bug462673.html => browser/base/content/test/general/test_bug462673.html rename : browser/base/content/test/test_bug628179.html => browser/base/content/test/general/test_bug628179.html rename : browser/base/content/test/test_bug839103.html => browser/base/content/test/general/test_bug839103.html rename : browser/base/content/test/test_contextmenu.html => browser/base/content/test/general/test_contextmenu.html rename : browser/base/content/test/test_contextmenu_input.html => browser/base/content/test/general/test_contextmenu_input.html rename : browser/base/content/test/test_feed_discovery.html => browser/base/content/test/general/test_feed_discovery.html rename : browser/base/content/test/test_offlineNotification.html => browser/base/content/test/general/test_offlineNotification.html rename : browser/base/content/test/test_offline_gzip.html => browser/base/content/test/general/test_offline_gzip.html rename : browser/base/content/test/test_wyciwyg_copying.html => browser/base/content/test/general/test_wyciwyg_copying.html rename : browser/base/content/test/title_test.svg => browser/base/content/test/general/title_test.svg rename : browser/base/content/test/video.ogg => browser/base/content/test/general/video.ogg rename : browser/base/content/test/zoom_test.html => browser/base/content/test/general/zoom_test.html
992 lines
35 KiB
JavaScript
992 lines
35 KiB
JavaScript
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
function test() {
|
|
waitForExplicitFinish();
|
|
|
|
ok(PopupNotifications, "PopupNotifications object exists");
|
|
ok(PopupNotifications.panel, "PopupNotifications panel exists");
|
|
|
|
registerCleanupFunction(cleanUp);
|
|
|
|
runNextTest();
|
|
}
|
|
|
|
function cleanUp() {
|
|
for (var topic in gActiveObservers)
|
|
Services.obs.removeObserver(gActiveObservers[topic], topic);
|
|
for (var eventName in gActiveListeners)
|
|
PopupNotifications.panel.removeEventListener(eventName, gActiveListeners[eventName], false);
|
|
PopupNotifications.buttonDelay = PREF_SECURITY_DELAY_INITIAL;
|
|
}
|
|
|
|
const PREF_SECURITY_DELAY_INITIAL = Services.prefs.getIntPref("security.notification_enable_delay");
|
|
|
|
var gActiveListeners = {};
|
|
var gActiveObservers = {};
|
|
var gShownState = {};
|
|
|
|
function goNext() {
|
|
if (++gTestIndex == tests.length)
|
|
executeSoon(finish);
|
|
else
|
|
executeSoon(runNextTest);
|
|
}
|
|
|
|
function runNextTest() {
|
|
let nextTest = tests[gTestIndex];
|
|
|
|
function addObserver(topic) {
|
|
function observer() {
|
|
Services.obs.removeObserver(observer, "PopupNotifications-" + topic);
|
|
delete gActiveObservers["PopupNotifications-" + topic];
|
|
|
|
info("[Test #" + gTestIndex + "] observer for " + topic + " called");
|
|
nextTest[topic]();
|
|
goNext();
|
|
}
|
|
Services.obs.addObserver(observer, "PopupNotifications-" + topic, false);
|
|
gActiveObservers["PopupNotifications-" + topic] = observer;
|
|
}
|
|
|
|
if (nextTest.backgroundShow) {
|
|
addObserver("backgroundShow");
|
|
} else if (nextTest.updateNotShowing) {
|
|
addObserver("updateNotShowing");
|
|
} else if (nextTest.onShown) {
|
|
doOnPopupEvent("popupshowing", function () {
|
|
info("[Test #" + gTestIndex + "] popup showing");
|
|
});
|
|
doOnPopupEvent("popupshown", function () {
|
|
gShownState[gTestIndex] = true;
|
|
info("[Test #" + gTestIndex + "] popup shown");
|
|
nextTest.onShown(this);
|
|
});
|
|
|
|
// We allow multiple onHidden functions to be defined in an array. They're
|
|
// called in the order they appear.
|
|
let onHiddenArray = nextTest.onHidden instanceof Array ?
|
|
nextTest.onHidden :
|
|
[nextTest.onHidden];
|
|
doOnPopupEvent("popuphidden", function () {
|
|
if (!gShownState[gTestIndex]) {
|
|
// This is expected to happen for test 9, so let's not treat it as a failure.
|
|
info("Popup from test " + gTestIndex + " was hidden before its popupshown fired");
|
|
}
|
|
|
|
let onHidden = onHiddenArray.shift();
|
|
info("[Test #" + gTestIndex + "] popup hidden (" + onHiddenArray.length + " hides remaining)");
|
|
executeSoon(function () {
|
|
onHidden.call(nextTest, this);
|
|
if (!onHiddenArray.length)
|
|
goNext();
|
|
}.bind(this));
|
|
}, onHiddenArray.length);
|
|
info("[Test #" + gTestIndex + "] added listeners; panel state: " + PopupNotifications.isPanelOpen);
|
|
}
|
|
|
|
info("[Test #" + gTestIndex + "] running test");
|
|
nextTest.run();
|
|
}
|
|
|
|
function doOnPopupEvent(eventName, callback, numExpected) {
|
|
gActiveListeners[eventName] = function (event) {
|
|
if (event.target != PopupNotifications.panel)
|
|
return;
|
|
if (typeof(numExpected) === "number")
|
|
numExpected--;
|
|
if (!numExpected) {
|
|
PopupNotifications.panel.removeEventListener(eventName, gActiveListeners[eventName], false);
|
|
delete gActiveListeners[eventName];
|
|
}
|
|
|
|
callback.call(PopupNotifications.panel);
|
|
}
|
|
PopupNotifications.panel.addEventListener(eventName, gActiveListeners[eventName], false);
|
|
}
|
|
|
|
var gTestIndex = 0;
|
|
var gNewTab;
|
|
|
|
function basicNotification() {
|
|
var self = this;
|
|
this.browser = gBrowser.selectedBrowser;
|
|
this.id = "test-notification-" + gTestIndex;
|
|
this.message = "This is popup notification " + this.id + " from test " + gTestIndex;
|
|
this.anchorID = null;
|
|
this.mainAction = {
|
|
label: "Main Action",
|
|
accessKey: "M",
|
|
callback: function () {
|
|
self.mainActionClicked = true;
|
|
}
|
|
};
|
|
this.secondaryActions = [
|
|
{
|
|
label: "Secondary Action",
|
|
accessKey: "S",
|
|
callback: function () {
|
|
self.secondaryActionClicked = true;
|
|
}
|
|
}
|
|
];
|
|
this.options = {
|
|
eventCallback: function (eventName) {
|
|
switch (eventName) {
|
|
case "dismissed":
|
|
self.dismissalCallbackTriggered = true;
|
|
break;
|
|
case "showing":
|
|
self.showingCallbackTriggered = true;
|
|
break;
|
|
case "shown":
|
|
self.shownCallbackTriggered = true;
|
|
break;
|
|
case "removed":
|
|
self.removedCallbackTriggered = true;
|
|
break;
|
|
}
|
|
}
|
|
};
|
|
this.addOptions = function(options) {
|
|
for (let [name, value] in Iterator(options))
|
|
self.options[name] = value;
|
|
}
|
|
}
|
|
|
|
var wrongBrowserNotificationObject = new basicNotification();
|
|
var wrongBrowserNotification;
|
|
|
|
var tests = [
|
|
{ // Test #0
|
|
run: function () {
|
|
this.notifyObj = new basicNotification();
|
|
showNotification(this.notifyObj);
|
|
},
|
|
onShown: function (popup) {
|
|
checkPopup(popup, this.notifyObj);
|
|
triggerMainCommand(popup);
|
|
},
|
|
onHidden: function (popup) {
|
|
ok(this.notifyObj.mainActionClicked, "mainAction was clicked");
|
|
ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered");
|
|
ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
|
|
}
|
|
},
|
|
{ // Test #1
|
|
run: function () {
|
|
this.notifyObj = new basicNotification();
|
|
showNotification(this.notifyObj);
|
|
},
|
|
onShown: function (popup) {
|
|
checkPopup(popup, this.notifyObj);
|
|
triggerSecondaryCommand(popup, 0);
|
|
},
|
|
onHidden: function (popup) {
|
|
ok(this.notifyObj.secondaryActionClicked, "secondaryAction was clicked");
|
|
ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered");
|
|
ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
|
|
}
|
|
},
|
|
{ // Test #2
|
|
run: function () {
|
|
this.notifyObj = new basicNotification();
|
|
this.notification = showNotification(this.notifyObj);
|
|
},
|
|
onShown: function (popup) {
|
|
checkPopup(popup, this.notifyObj);
|
|
dismissNotification(popup);
|
|
},
|
|
onHidden: function (popup) {
|
|
ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered");
|
|
this.notification.remove();
|
|
ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
|
|
}
|
|
},
|
|
// test opening a notification for a background browser
|
|
{ // Test #3
|
|
run: function () {
|
|
gNewTab = gBrowser.addTab("about:blank");
|
|
isnot(gBrowser.selectedTab, gNewTab, "new tab isn't selected");
|
|
wrongBrowserNotificationObject.browser = gBrowser.getBrowserForTab(gNewTab);
|
|
wrongBrowserNotification = showNotification(wrongBrowserNotificationObject);
|
|
},
|
|
backgroundShow: function () {
|
|
is(PopupNotifications.isPanelOpen, false, "panel isn't open");
|
|
ok(!wrongBrowserNotificationObject.mainActionClicked, "main action wasn't clicked");
|
|
ok(!wrongBrowserNotificationObject.secondaryActionClicked, "secondary action wasn't clicked");
|
|
ok(!wrongBrowserNotificationObject.dismissalCallbackTriggered, "dismissal callback wasn't called");
|
|
}
|
|
},
|
|
// now select that browser and test to see that the notification appeared
|
|
{ // Test #4
|
|
run: function () {
|
|
this.oldSelectedTab = gBrowser.selectedTab;
|
|
gBrowser.selectedTab = gNewTab;
|
|
},
|
|
onShown: function (popup) {
|
|
checkPopup(popup, wrongBrowserNotificationObject);
|
|
is(PopupNotifications.isPanelOpen, true, "isPanelOpen getter doesn't lie");
|
|
|
|
// switch back to the old browser
|
|
gBrowser.selectedTab = this.oldSelectedTab;
|
|
},
|
|
onHidden: function (popup) {
|
|
// actually remove the notification to prevent it from reappearing
|
|
ok(wrongBrowserNotificationObject.dismissalCallbackTriggered, "dismissal callback triggered due to tab switch");
|
|
wrongBrowserNotification.remove();
|
|
ok(wrongBrowserNotificationObject.removedCallbackTriggered, "removed callback triggered");
|
|
wrongBrowserNotification = null;
|
|
}
|
|
},
|
|
// test that the removed notification isn't shown on browser re-select
|
|
{ // Test #5
|
|
run: function () {
|
|
gBrowser.selectedTab = gNewTab;
|
|
},
|
|
updateNotShowing: function () {
|
|
is(PopupNotifications.isPanelOpen, false, "panel isn't open");
|
|
gBrowser.removeTab(gNewTab);
|
|
}
|
|
},
|
|
// Test that two notifications with the same ID result in a single displayed
|
|
// notification.
|
|
{ // Test #6
|
|
run: function () {
|
|
this.notifyObj = new basicNotification();
|
|
// Show the same notification twice
|
|
this.notification1 = showNotification(this.notifyObj);
|
|
this.notification2 = showNotification(this.notifyObj);
|
|
},
|
|
onShown: function (popup) {
|
|
checkPopup(popup, this.notifyObj);
|
|
this.notification2.remove();
|
|
},
|
|
onHidden: function (popup) {
|
|
ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered");
|
|
ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
|
|
}
|
|
},
|
|
// Test that two notifications with different IDs are displayed
|
|
{ // Test #7
|
|
run: function () {
|
|
this.testNotif1 = new basicNotification();
|
|
this.testNotif1.message += " 1";
|
|
showNotification(this.testNotif1);
|
|
this.testNotif2 = new basicNotification();
|
|
this.testNotif2.message += " 2";
|
|
this.testNotif2.id += "-2";
|
|
showNotification(this.testNotif2);
|
|
},
|
|
onShown: function (popup) {
|
|
is(popup.childNodes.length, 2, "two notifications are shown");
|
|
// Trigger the main command for the first notification, and the secondary
|
|
// for the second. Need to do mainCommand first since the secondaryCommand
|
|
// triggering is async.
|
|
triggerMainCommand(popup);
|
|
is(popup.childNodes.length, 1, "only one notification left");
|
|
triggerSecondaryCommand(popup, 0);
|
|
},
|
|
onHidden: function (popup) {
|
|
ok(this.testNotif1.mainActionClicked, "main action #1 was clicked");
|
|
ok(!this.testNotif1.secondaryActionClicked, "secondary action #1 wasn't clicked");
|
|
ok(!this.testNotif1.dismissalCallbackTriggered, "dismissal callback #1 wasn't called");
|
|
|
|
ok(!this.testNotif2.mainActionClicked, "main action #2 wasn't clicked");
|
|
ok(this.testNotif2.secondaryActionClicked, "secondary action #2 was clicked");
|
|
ok(!this.testNotif2.dismissalCallbackTriggered, "dismissal callback #2 wasn't called");
|
|
}
|
|
},
|
|
// Test notification without mainAction
|
|
{ // Test #8
|
|
run: function () {
|
|
this.notifyObj = new basicNotification();
|
|
this.notifyObj.mainAction = null;
|
|
this.notification = showNotification(this.notifyObj);
|
|
},
|
|
onShown: function (popup) {
|
|
checkPopup(popup, this.notifyObj);
|
|
dismissNotification(popup);
|
|
},
|
|
onHidden: function (popup) {
|
|
this.notification.remove();
|
|
}
|
|
},
|
|
// Test two notifications with different anchors
|
|
{ // Test #9
|
|
run: function () {
|
|
this.notifyObj = new basicNotification();
|
|
this.firstNotification = showNotification(this.notifyObj);
|
|
this.notifyObj2 = new basicNotification();
|
|
this.notifyObj2.id += "-2";
|
|
this.notifyObj2.anchorID = "addons-notification-icon";
|
|
// Second showNotification() overrides the first
|
|
this.secondNotification = showNotification(this.notifyObj2);
|
|
},
|
|
onShown: function (popup) {
|
|
// This also checks that only one element is shown.
|
|
checkPopup(popup, this.notifyObj2);
|
|
is(document.getElementById("geo-notification-icon").boxObject.width, 0,
|
|
"geo anchor shouldn't be visible");
|
|
dismissNotification(popup);
|
|
},
|
|
onHidden: [
|
|
// The second showing triggers a popuphidden event that we should ignore.
|
|
function (popup) {},
|
|
function (popup) {
|
|
// Remove the notifications
|
|
this.firstNotification.remove();
|
|
this.secondNotification.remove();
|
|
ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
|
|
ok(this.notifyObj2.removedCallbackTriggered, "removed callback triggered");
|
|
}
|
|
]
|
|
},
|
|
// Test optional params
|
|
{ // Test #10
|
|
run: function () {
|
|
this.notifyObj = new basicNotification();
|
|
this.notifyObj.secondaryActions = undefined;
|
|
this.notification = showNotification(this.notifyObj);
|
|
},
|
|
onShown: function (popup) {
|
|
checkPopup(popup, this.notifyObj);
|
|
dismissNotification(popup);
|
|
},
|
|
onHidden: function (popup) {
|
|
ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered");
|
|
this.notification.remove();
|
|
ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
|
|
}
|
|
},
|
|
// Test that icons appear
|
|
{ // Test #11
|
|
run: function () {
|
|
this.notifyObj = new basicNotification();
|
|
this.notifyObj.id = "geolocation";
|
|
this.notifyObj.anchorID = "geo-notification-icon";
|
|
this.notification = showNotification(this.notifyObj);
|
|
},
|
|
onShown: function (popup) {
|
|
checkPopup(popup, this.notifyObj);
|
|
isnot(document.getElementById("geo-notification-icon").boxObject.width, 0,
|
|
"geo anchor should be visible");
|
|
dismissNotification(popup);
|
|
},
|
|
onHidden: function (popup) {
|
|
let icon = document.getElementById("geo-notification-icon");
|
|
isnot(icon.boxObject.width, 0,
|
|
"geo anchor should be visible after dismissal");
|
|
this.notification.remove();
|
|
is(icon.boxObject.width, 0,
|
|
"geo anchor should not be visible after removal");
|
|
}
|
|
},
|
|
// Test that persistence allows the notification to persist across reloads
|
|
{ // Test #12
|
|
run: function () {
|
|
this.oldSelectedTab = gBrowser.selectedTab;
|
|
gBrowser.selectedTab = gBrowser.addTab("about:blank");
|
|
|
|
let self = this;
|
|
loadURI("http://example.com/", function() {
|
|
self.notifyObj = new basicNotification();
|
|
self.notifyObj.addOptions({
|
|
persistence: 2
|
|
});
|
|
self.notification = showNotification(self.notifyObj);
|
|
});
|
|
},
|
|
onShown: function (popup) {
|
|
this.complete = false;
|
|
|
|
let self = this;
|
|
loadURI("http://example.org/", function() {
|
|
loadURI("http://example.com/", function() {
|
|
|
|
// Next load will remove the notification
|
|
self.complete = true;
|
|
|
|
loadURI("http://example.org/");
|
|
});
|
|
});
|
|
},
|
|
onHidden: function (popup) {
|
|
ok(this.complete, "Should only have hidden the notification after 3 page loads");
|
|
ok(this.notifyObj.removedCallbackTriggered, "removal callback triggered");
|
|
gBrowser.removeTab(gBrowser.selectedTab);
|
|
gBrowser.selectedTab = this.oldSelectedTab;
|
|
}
|
|
},
|
|
// Test that a timeout allows the notification to persist across reloads
|
|
{ // Test #13
|
|
run: function () {
|
|
this.oldSelectedTab = gBrowser.selectedTab;
|
|
gBrowser.selectedTab = gBrowser.addTab("about:blank");
|
|
|
|
let self = this;
|
|
loadURI("http://example.com/", function() {
|
|
self.notifyObj = new basicNotification();
|
|
// Set a timeout of 10 minutes that should never be hit
|
|
self.notifyObj.addOptions({
|
|
timeout: Date.now() + 600000
|
|
});
|
|
self.notification = showNotification(self.notifyObj);
|
|
});
|
|
},
|
|
onShown: function (popup) {
|
|
this.complete = false;
|
|
|
|
let self = this;
|
|
loadURI("http://example.org/", function() {
|
|
loadURI("http://example.com/", function() {
|
|
|
|
// Next load will hide the notification
|
|
self.notification.options.timeout = Date.now() - 1;
|
|
self.complete = true;
|
|
|
|
loadURI("http://example.org/");
|
|
});
|
|
});
|
|
},
|
|
onHidden: function (popup) {
|
|
ok(this.complete, "Should only have hidden the notification after the timeout was passed");
|
|
this.notification.remove();
|
|
gBrowser.removeTab(gBrowser.selectedTab);
|
|
gBrowser.selectedTab = this.oldSelectedTab;
|
|
}
|
|
},
|
|
// Test that setting persistWhileVisible allows a visible notification to
|
|
// persist across location changes
|
|
{ // Test #14
|
|
run: function () {
|
|
this.oldSelectedTab = gBrowser.selectedTab;
|
|
gBrowser.selectedTab = gBrowser.addTab("about:blank");
|
|
|
|
let self = this;
|
|
loadURI("http://example.com/", function() {
|
|
self.notifyObj = new basicNotification();
|
|
self.notifyObj.addOptions({
|
|
persistWhileVisible: true
|
|
});
|
|
self.notification = showNotification(self.notifyObj);
|
|
});
|
|
},
|
|
onShown: function (popup) {
|
|
this.complete = false;
|
|
|
|
let self = this;
|
|
loadURI("http://example.org/", function() {
|
|
loadURI("http://example.com/", function() {
|
|
|
|
// Notification should persist across location changes
|
|
self.complete = true;
|
|
dismissNotification(popup);
|
|
});
|
|
});
|
|
},
|
|
onHidden: function (popup) {
|
|
ok(this.complete, "Should only have hidden the notification after it was dismissed");
|
|
this.notification.remove();
|
|
gBrowser.removeTab(gBrowser.selectedTab);
|
|
gBrowser.selectedTab = this.oldSelectedTab;
|
|
}
|
|
},
|
|
// Test that nested icon nodes correctly activate popups
|
|
{ // Test #15
|
|
run: function() {
|
|
// Add a temporary box as the anchor with a button
|
|
this.box = document.createElement("box");
|
|
PopupNotifications.iconBox.appendChild(this.box);
|
|
|
|
let button = document.createElement("button");
|
|
button.setAttribute("label", "Please click me!");
|
|
this.box.appendChild(button);
|
|
|
|
// The notification should open up on the box
|
|
this.notifyObj = new basicNotification();
|
|
this.notifyObj.anchorID = this.box.id = "nested-box";
|
|
this.notifyObj.addOptions({dismissed: true});
|
|
this.notification = showNotification(this.notifyObj);
|
|
|
|
EventUtils.synthesizeMouse(button, 1, 1, {});
|
|
},
|
|
onShown: function(popup) {
|
|
checkPopup(popup, this.notifyObj);
|
|
dismissNotification(popup);
|
|
},
|
|
onHidden: function(popup) {
|
|
this.notification.remove();
|
|
this.box.parentNode.removeChild(this.box);
|
|
}
|
|
},
|
|
// Test that popupnotifications without popups have anchor icons shown
|
|
{ // Test #16
|
|
run: function() {
|
|
let notifyObj = new basicNotification();
|
|
notifyObj.anchorID = "geo-notification-icon";
|
|
notifyObj.addOptions({neverShow: true});
|
|
showNotification(notifyObj);
|
|
},
|
|
updateNotShowing: function() {
|
|
isnot(document.getElementById("geo-notification-icon").boxObject.width, 0,
|
|
"geo anchor should be visible");
|
|
}
|
|
},
|
|
// Test notification "Not Now" menu item
|
|
{ // Test #17
|
|
run: function () {
|
|
this.notifyObj = new basicNotification();
|
|
this.notification = showNotification(this.notifyObj);
|
|
},
|
|
onShown: function (popup) {
|
|
checkPopup(popup, this.notifyObj);
|
|
triggerSecondaryCommand(popup, 1);
|
|
},
|
|
onHidden: function (popup) {
|
|
ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered");
|
|
this.notification.remove();
|
|
ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
|
|
}
|
|
},
|
|
// Test notification close button
|
|
{ // Test #18
|
|
run: function () {
|
|
this.notifyObj = new basicNotification();
|
|
this.notification = showNotification(this.notifyObj);
|
|
},
|
|
onShown: function (popup) {
|
|
checkPopup(popup, this.notifyObj);
|
|
let notification = popup.childNodes[0];
|
|
EventUtils.synthesizeMouseAtCenter(notification.closebutton, {});
|
|
},
|
|
onHidden: function (popup) {
|
|
ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered");
|
|
this.notification.remove();
|
|
ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
|
|
}
|
|
},
|
|
// Test notification when chrome is hidden
|
|
{ // Test #19
|
|
run: function () {
|
|
window.locationbar.visible = false;
|
|
this.notifyObj = new basicNotification();
|
|
this.notification = showNotification(this.notifyObj);
|
|
window.locationbar.visible = true;
|
|
},
|
|
onShown: function (popup) {
|
|
checkPopup(popup, this.notifyObj);
|
|
is(popup.anchorNode.className, "tabbrowser-tab", "notification anchored to tab");
|
|
dismissNotification(popup);
|
|
},
|
|
onHidden: function (popup) {
|
|
ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered");
|
|
this.notification.remove();
|
|
ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
|
|
}
|
|
},
|
|
// Test notification is removed when dismissed if removeOnDismissal is true
|
|
{ // Test #20
|
|
run: function () {
|
|
this.notifyObj = new basicNotification();
|
|
this.notifyObj.addOptions({
|
|
removeOnDismissal: true
|
|
});
|
|
this.notification = showNotification(this.notifyObj);
|
|
},
|
|
onShown: function (popup) {
|
|
checkPopup(popup, this.notifyObj);
|
|
dismissNotification(popup);
|
|
},
|
|
onHidden: function (popup) {
|
|
ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered");
|
|
ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
|
|
}
|
|
},
|
|
// Test multiple notification icons are shown
|
|
{ // Test #21
|
|
run: function () {
|
|
this.notifyObj1 = new basicNotification();
|
|
this.notifyObj1.id += "_1";
|
|
this.notifyObj1.anchorID = "default-notification-icon";
|
|
this.notification1 = showNotification(this.notifyObj1);
|
|
|
|
this.notifyObj2 = new basicNotification();
|
|
this.notifyObj2.id += "_2";
|
|
this.notifyObj2.anchorID = "geo-notification-icon";
|
|
this.notification2 = showNotification(this.notifyObj2);
|
|
},
|
|
onShown: function (popup) {
|
|
checkPopup(popup, this.notifyObj2);
|
|
|
|
// check notifyObj1 anchor icon is showing
|
|
isnot(document.getElementById("default-notification-icon").boxObject.width, 0,
|
|
"default anchor should be visible");
|
|
// check notifyObj2 anchor icon is showing
|
|
isnot(document.getElementById("geo-notification-icon").boxObject.width, 0,
|
|
"geo anchor should be visible");
|
|
|
|
dismissNotification(popup);
|
|
},
|
|
onHidden: [
|
|
function (popup) {
|
|
},
|
|
function (popup) {
|
|
this.notification1.remove();
|
|
ok(this.notifyObj1.removedCallbackTriggered, "removed callback triggered");
|
|
|
|
this.notification2.remove();
|
|
ok(this.notifyObj2.removedCallbackTriggered, "removed callback triggered");
|
|
}
|
|
]
|
|
},
|
|
// Test that multiple notification icons are removed when switching tabs
|
|
{ // Test #22
|
|
run: function () {
|
|
// show the notification on old tab.
|
|
this.notifyObjOld = new basicNotification();
|
|
this.notifyObjOld.anchorID = "default-notification-icon";
|
|
this.notificationOld = showNotification(this.notifyObjOld);
|
|
|
|
// switch tab
|
|
this.oldSelectedTab = gBrowser.selectedTab;
|
|
gBrowser.selectedTab = gBrowser.addTab("about:blank");
|
|
|
|
// show the notification on new tab.
|
|
this.notifyObjNew = new basicNotification();
|
|
this.notifyObjNew.anchorID = "geo-notification-icon";
|
|
this.notificationNew = showNotification(this.notifyObjNew);
|
|
},
|
|
onShown: function (popup) {
|
|
checkPopup(popup, this.notifyObjNew);
|
|
|
|
// check notifyObjOld anchor icon is removed
|
|
is(document.getElementById("default-notification-icon").boxObject.width, 0,
|
|
"default anchor shouldn't be visible");
|
|
// check notifyObjNew anchor icon is showing
|
|
isnot(document.getElementById("geo-notification-icon").boxObject.width, 0,
|
|
"geo anchor should be visible");
|
|
|
|
dismissNotification(popup);
|
|
},
|
|
onHidden: [
|
|
function (popup) {
|
|
},
|
|
function (popup) {
|
|
this.notificationNew.remove();
|
|
gBrowser.removeTab(gBrowser.selectedTab);
|
|
|
|
gBrowser.selectedTab = this.oldSelectedTab;
|
|
this.notificationOld.remove();
|
|
}
|
|
]
|
|
},
|
|
{ // Test #23 - test security delay - too early
|
|
run: function () {
|
|
// Set the security delay to 100s
|
|
PopupNotifications.buttonDelay = 100000;
|
|
|
|
this.notifyObj = new basicNotification();
|
|
showNotification(this.notifyObj);
|
|
},
|
|
onShown: function (popup) {
|
|
checkPopup(popup, this.notifyObj);
|
|
triggerMainCommand(popup);
|
|
|
|
// Wait to see if the main command worked
|
|
executeSoon(function delayedDismissal() {
|
|
dismissNotification(popup);
|
|
});
|
|
|
|
},
|
|
onHidden: function (popup) {
|
|
ok(!this.notifyObj.mainActionClicked, "mainAction was not clicked because it was too soon");
|
|
ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback was triggered");
|
|
}
|
|
},
|
|
{ // Test #24 - test security delay - after delay
|
|
run: function () {
|
|
// Set the security delay to 10ms
|
|
PopupNotifications.buttonDelay = 10;
|
|
|
|
this.notifyObj = new basicNotification();
|
|
showNotification(this.notifyObj);
|
|
},
|
|
onShown: function (popup) {
|
|
checkPopup(popup, this.notifyObj);
|
|
|
|
// Wait until after the delay to trigger the main action
|
|
setTimeout(function delayedDismissal() {
|
|
triggerMainCommand(popup);
|
|
}, 500);
|
|
|
|
},
|
|
onHidden: function (popup) {
|
|
ok(this.notifyObj.mainActionClicked, "mainAction was clicked after the delay");
|
|
ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback was not triggered");
|
|
PopupNotifications.buttonDelay = PREF_SECURITY_DELAY_INITIAL;
|
|
}
|
|
},
|
|
{ // Test #25 - reload removes notification
|
|
run: function () {
|
|
loadURI("http://example.com/", function() {
|
|
let notifyObj = new basicNotification();
|
|
notifyObj.options.eventCallback = function (eventName) {
|
|
if (eventName == "removed") {
|
|
ok(true, "Notification removed in background tab after reloading");
|
|
executeSoon(function () {
|
|
goNext();
|
|
});
|
|
}
|
|
};
|
|
showNotification(notifyObj);
|
|
executeSoon(function () {
|
|
gBrowser.selectedBrowser.reload();
|
|
});
|
|
});
|
|
}
|
|
},
|
|
{ // Test #26 - location change in background tab removes notification
|
|
run: function () {
|
|
let oldSelectedTab = gBrowser.selectedTab;
|
|
let newTab = gBrowser.addTab("about:blank");
|
|
gBrowser.selectedTab = newTab;
|
|
|
|
loadURI("http://example.com/", function() {
|
|
gBrowser.selectedTab = oldSelectedTab;
|
|
let browser = gBrowser.getBrowserForTab(newTab);
|
|
|
|
let notifyObj = new basicNotification();
|
|
notifyObj.browser = browser;
|
|
notifyObj.options.eventCallback = function (eventName) {
|
|
if (eventName == "removed") {
|
|
ok(true, "Notification removed in background tab after reloading");
|
|
executeSoon(function () {
|
|
gBrowser.removeTab(newTab);
|
|
goNext();
|
|
});
|
|
}
|
|
};
|
|
showNotification(notifyObj);
|
|
executeSoon(function () {
|
|
browser.reload();
|
|
});
|
|
});
|
|
}
|
|
},
|
|
{ // Test #27 - Popup notification anchor shouldn't disappear when a notification with the same ID is re-added in a background tab
|
|
run: function () {
|
|
loadURI("http://example.com/", function () {
|
|
let originalTab = gBrowser.selectedTab;
|
|
let bgTab = gBrowser.addTab("about:blank");
|
|
gBrowser.selectedTab = bgTab;
|
|
loadURI("http://example.com/", function () {
|
|
let anchor = document.createElement("box");
|
|
anchor.id = "test26-anchor";
|
|
anchor.className = "notification-anchor-icon";
|
|
PopupNotifications.iconBox.appendChild(anchor);
|
|
|
|
gBrowser.selectedTab = originalTab;
|
|
|
|
let fgNotifyObj = new basicNotification();
|
|
fgNotifyObj.anchorID = anchor.id;
|
|
fgNotifyObj.options.dismissed = true;
|
|
let fgNotification = showNotification(fgNotifyObj);
|
|
|
|
let bgNotifyObj = new basicNotification();
|
|
bgNotifyObj.anchorID = anchor.id;
|
|
bgNotifyObj.browser = gBrowser.getBrowserForTab(bgTab);
|
|
// show the notification in the background tab ...
|
|
let bgNotification = showNotification(bgNotifyObj);
|
|
// ... and re-show it
|
|
bgNotification = showNotification(bgNotifyObj);
|
|
|
|
ok(fgNotification.id, "notification has id");
|
|
is(fgNotification.id, bgNotification.id, "notification ids are the same");
|
|
is(anchor.getAttribute("showing"), "true", "anchor still showing");
|
|
|
|
fgNotification.remove();
|
|
gBrowser.removeTab(bgTab);
|
|
goNext();
|
|
});
|
|
});
|
|
}
|
|
},
|
|
{ // Test #28 - location change in embedded frame removes notification
|
|
run: function () {
|
|
loadURI("data:text/html,<iframe id='iframe' src='http://example.com/'>", function () {
|
|
let notifyObj = new basicNotification();
|
|
notifyObj.options.eventCallback = function (eventName) {
|
|
if (eventName == "removed") {
|
|
ok(true, "Notification removed in background tab after reloading");
|
|
executeSoon(goNext);
|
|
}
|
|
};
|
|
showNotification(notifyObj);
|
|
executeSoon(function () {
|
|
content.document.getElementById("iframe")
|
|
.setAttribute("src", "http://example.org/");
|
|
});
|
|
});
|
|
}
|
|
},
|
|
{ // Test #29 - Existing popup notification shouldn't disappear when adding a dismissed notification
|
|
run: function () {
|
|
this.notifyObj1 = new basicNotification();
|
|
this.notifyObj1.id += "_1";
|
|
this.notifyObj1.anchorID = "default-notification-icon";
|
|
this.notification1 = showNotification(this.notifyObj1);
|
|
},
|
|
onShown: function (popup) {
|
|
// Now show a dismissed notification, and check that it doesn't clobber
|
|
// the showing one.
|
|
this.notifyObj2 = new basicNotification();
|
|
this.notifyObj2.id += "_2";
|
|
this.notifyObj2.anchorID = "geo-notification-icon";
|
|
this.notifyObj2.options.dismissed = true;
|
|
this.notification2 = showNotification(this.notifyObj2);
|
|
|
|
checkPopup(popup, this.notifyObj1);
|
|
|
|
// check that both anchor icons are showing
|
|
is(document.getElementById("default-notification-icon").getAttribute("showing"), "true",
|
|
"notification1 anchor should be visible");
|
|
is(document.getElementById("geo-notification-icon").getAttribute("showing"), "true",
|
|
"notification2 anchor should be visible");
|
|
|
|
dismissNotification(popup);
|
|
},
|
|
onHidden: function(popup) {
|
|
this.notification1.remove();
|
|
this.notification2.remove();
|
|
}
|
|
},
|
|
{ // Test #30 - Showing should be able to modify the popup data
|
|
run: function() {
|
|
this.notifyObj = new basicNotification();
|
|
var normalCallback = this.notifyObj.options.eventCallback;
|
|
this.notifyObj.options.eventCallback = function (eventName) {
|
|
if (eventName == "showing") {
|
|
this.mainAction.label = "Alternate Label";
|
|
}
|
|
normalCallback.call(this, eventName);
|
|
};
|
|
showNotification(this.notifyObj);
|
|
},
|
|
onShown: function(popup) {
|
|
// checkPopup checks for the matching label. Note that this assumes that
|
|
// this.notifyObj.mainAction is the same as notification.mainAction,
|
|
// which could be a problem if we ever decided to deep-copy.
|
|
checkPopup(popup, this.notifyObj);
|
|
triggerMainCommand(popup);
|
|
},
|
|
onHidden: function() { }
|
|
}
|
|
];
|
|
|
|
function showNotification(notifyObj) {
|
|
return PopupNotifications.show(notifyObj.browser,
|
|
notifyObj.id,
|
|
notifyObj.message,
|
|
notifyObj.anchorID,
|
|
notifyObj.mainAction,
|
|
notifyObj.secondaryActions,
|
|
notifyObj.options);
|
|
}
|
|
|
|
function checkPopup(popup, notificationObj) {
|
|
info("[Test #" + gTestIndex + "] checking popup");
|
|
|
|
ok(notificationObj.showingCallbackTriggered, "showing callback was triggered");
|
|
ok(notificationObj.shownCallbackTriggered, "shown callback was triggered");
|
|
|
|
let notifications = popup.childNodes;
|
|
is(notifications.length, 1, "one notification displayed");
|
|
let notification = notifications[0];
|
|
if (!notification)
|
|
return;
|
|
let icon = document.getAnonymousElementByAttribute(notification, "class", "popup-notification-icon");
|
|
if (notificationObj.id == "geolocation") {
|
|
isnot(icon.boxObject.width, 0, "icon for geo displayed");
|
|
is(popup.anchorNode.className, "notification-anchor-icon", "notification anchored to icon");
|
|
}
|
|
is(notification.getAttribute("label"), notificationObj.message, "message matches");
|
|
is(notification.id, notificationObj.id + "-notification", "id matches");
|
|
if (notificationObj.mainAction) {
|
|
is(notification.getAttribute("buttonlabel"), notificationObj.mainAction.label, "main action label matches");
|
|
is(notification.getAttribute("buttonaccesskey"), notificationObj.mainAction.accessKey, "main action accesskey matches");
|
|
}
|
|
let actualSecondaryActions = Array.filter(notification.childNodes,
|
|
function (child) child.nodeName == "menuitem");
|
|
let secondaryActions = notificationObj.secondaryActions || [];
|
|
let actualSecondaryActionsCount = actualSecondaryActions.length;
|
|
if (secondaryActions.length) {
|
|
is(notification.lastChild.tagName, "menuseparator", "menuseparator exists");
|
|
}
|
|
is(actualSecondaryActionsCount, secondaryActions.length, actualSecondaryActions.length + " secondary actions");
|
|
secondaryActions.forEach(function (a, i) {
|
|
is(actualSecondaryActions[i].getAttribute("label"), a.label, "label for secondary action " + i + " matches");
|
|
is(actualSecondaryActions[i].getAttribute("accesskey"), a.accessKey, "accessKey for secondary action " + i + " matches");
|
|
});
|
|
}
|
|
|
|
function triggerMainCommand(popup) {
|
|
info("[Test #" + gTestIndex + "] triggering main command");
|
|
let notifications = popup.childNodes;
|
|
ok(notifications.length > 0, "at least one notification displayed");
|
|
let notification = notifications[0];
|
|
|
|
// 20, 10 so that the inner button is hit
|
|
EventUtils.synthesizeMouse(notification.button, 20, 10, {});
|
|
}
|
|
|
|
function triggerSecondaryCommand(popup, index) {
|
|
info("[Test #" + gTestIndex + "] triggering secondary command");
|
|
let notifications = popup.childNodes;
|
|
ok(notifications.length > 0, "at least one notification displayed");
|
|
let notification = notifications[0];
|
|
|
|
// Cancel the arrow panel slide-in transition (bug 767133) such that
|
|
// it won't interfere with us interacting with the dropdown.
|
|
document.getAnonymousNodes(popup)[0].style.transition = "none";
|
|
|
|
notification.button.focus();
|
|
|
|
popup.addEventListener("popupshown", function () {
|
|
popup.removeEventListener("popupshown", arguments.callee, false);
|
|
|
|
// Press down until the desired command is selected
|
|
for (let i = 0; i <= index; i++)
|
|
EventUtils.synthesizeKey("VK_DOWN", {});
|
|
|
|
// Activate
|
|
EventUtils.synthesizeKey("VK_ENTER", {});
|
|
}, false);
|
|
|
|
// One down event to open the popup
|
|
EventUtils.synthesizeKey("VK_DOWN", { altKey: !navigator.platform.contains("Mac") });
|
|
}
|
|
|
|
function loadURI(uri, callback) {
|
|
if (callback) {
|
|
gBrowser.addEventListener("load", function() {
|
|
// Ignore the about:blank load
|
|
if (gBrowser.currentURI.spec == "about:blank")
|
|
return;
|
|
|
|
gBrowser.removeEventListener("load", arguments.callee, true);
|
|
|
|
callback();
|
|
}, true);
|
|
}
|
|
gBrowser.loadURI(uri);
|
|
}
|
|
|
|
function dismissNotification(popup) {
|
|
info("[Test #" + gTestIndex + "] dismissing notification");
|
|
executeSoon(function () {
|
|
EventUtils.synthesizeKey("VK_ESCAPE", {});
|
|
});
|
|
}
|