From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- browser/components/BrowserComponents.manifest | 44 + browser/components/about/AboutRedirector.cpp | 235 + browser/components/about/AboutRedirector.h | 32 + browser/components/about/moz.build | 19 + browser/components/build/Makefile.in | 8 + browser/components/build/moz.build | 24 + browser/components/build/nsBrowserCompsCID.h | 43 + browser/components/build/nsModule.cpp | 131 + .../contextualidentity/content/usercontext.css | 91 + browser/components/contextualidentity/jar.mn | 6 + browser/components/contextualidentity/moz.build | 14 + .../contextualidentity/test/browser/.eslintrc.js | 11 + .../contextualidentity/test/browser/browser.ini | 30 + .../test/browser/browser_aboutURLs.js | 49 + .../test/browser/browser_blobUrl.js | 78 + .../test/browser/browser_broadcastchannel.js | 80 + .../test/browser/browser_count_and_remove.js | 34 + .../contextualidentity/test/browser/browser_eme.js | 186 + .../test/browser/browser_favicon.js | 140 + .../browser_forgetAPI_EME_forgetThisSite.js | 219 + ...getAPI_cookie_getCookiesWithOriginAttributes.js | 86 + ...er_forgetAPI_quota_clearStoragesForPrincipal.js | 147 + .../test/browser/browser_forgetaboutsite.js | 352 + .../test/browser/browser_imageCache.js | 59 + .../test/browser/browser_middleClick.js | 41 + .../test/browser/browser_newtabButton.js | 35 + .../test/browser/browser_serviceworkers.js | 108 + .../test/browser/browser_usercontext.js | 86 + .../test/browser/browser_usercontextid_tabdrop.js | 134 + .../test/browser/browser_windowName.js | 74 + .../test/browser/browser_windowOpen.js | 41 + .../test/browser/empty_file.html | 5 + .../test/browser/favicon-normal32.png | Bin 0 -> 344 bytes .../browser/file_reflect_cookie_into_title.html | 23 + .../test/browser/file_set_storages.html | 41 + .../test/browser/serviceworker.html | 12 + .../contextualidentity/test/browser/worker.js | 1 + .../components/controlcenter/content/panel.inc.xul | 189 + .../components/customizableui/CustomizableUI.jsm | 4420 ++ .../customizableui/CustomizableWidgets.jsm | 1281 + .../components/customizableui/CustomizeMode.jsm | 2341 + .../customizableui/DragPositionManager.jsm | 420 + .../customizableui/PanelWideWidgetTracker.jsm | 172 + .../components/customizableui/ScrollbarSampler.jsm | 65 + .../customizableui/content/customizeMode.inc.xul | 82 + browser/components/customizableui/content/jar.mn | 10 + .../components/customizableui/content/moz.build | 7 + .../components/customizableui/content/panelUI.css | 31 + .../customizableui/content/panelUI.inc.xul | 407 + .../components/customizableui/content/panelUI.js | 558 + .../components/customizableui/content/panelUI.xml | 509 + .../components/customizableui/content/toolbar.xml | 618 + browser/components/customizableui/moz.build | 26 + .../components/customizableui/test/.eslintrc.js | 7 + browser/components/customizableui/test/browser.ini | 154 + .../test/browser_1003588_no_specials_in_panel.js | 107 + .../browser_1007336_lwthemes_in_customize_mode.js | 108 + .../test/browser_1008559_anchor_undo_restore.js | 71 + .../browser_1042100_default_placements_update.js | 107 + .../test/browser_1058573_showToolbarsDropdown.js | 25 + .../test/browser_1087303_button_fullscreen.js | 46 + .../test/browser_1087303_button_preferences.js | 50 + ...owser_1089591_still_customizable_after_reset.js | 24 + .../browser_1096763_seen_widgets_post_reset.js | 31 + ...browser_1161838_inserted_new_default_buttons.js | 78 + .../test/browser_873501_handle_specials.js | 79 + .../test/browser_876926_customize_mode_wrapping.js | 185 + ...browser_876944_customize_mode_create_destroy.js | 61 + .../test/browser_877006_missing_view.js | 41 + .../test/browser_877178_unregisterArea.js | 50 + .../test/browser_877447_skip_missing_ids.js | 25 + .../test/browser_878452_drag_to_panel.js | 65 + .../browser_880164_customization_context_menus.js | 414 + .../browser_880382_drag_wide_widgets_in_panel.js | 497 + .../test/browser_884402_customize_from_overflow.js | 81 + ...wser_885052_customize_mode_observers_disabed.js | 45 + .../test/browser_885530_showInPrivateBrowsing.js | 134 + .../browser_886323_buildArea_removable_nodes.js | 46 + .../test/browser_887438_currentset_shim.js | 75 + .../test/browser_888817_currentset_updating.js | 57 + .../test/browser_890140_orphaned_placeholders.js | 210 + ...wser_890262_destroyWidget_after_add_to_panel.js | 68 + ...892955_isWidgetRemovable_for_removed_widgets.js | 30 + ...owser_892956_destroyWidget_defaultPlacements.js | 24 + .../test/browser_901207_searchbar_in_panel.js | 113 + .../browser_909779_overflow_toolbars_new_window.js | 31 + .../test/browser_913972_currentset_overflow.js | 55 + ...owser_914138_widget_API_overflowable_toolbar.js | 131 + .../browser_914863_disabled_help_quit_buttons.js | 16 + .../test/browser_918049_skipintoolbarset_dnd.js | 38 + ...7_customize_mode_event_wrapping_during_reset.js | 24 + .../browser_927717_customize_drag_empty_toolbar.js | 26 + ...rowser_932928_show_notice_when_palette_empty.js | 35 + .../test/browser_934113_menubar_removable.js | 30 + .../test/browser_934951_zoom_in_toolbar.js | 89 + .../test/browser_938980_navbar_collapsed.js | 121 + .../browser_938995_indefaultstate_nonremovable.js | 25 + ...40013_registerToolbarNode_calls_registerArea.js | 70 + .../browser_940307_panel_click_closure_handling.js | 136 + ...r_940946_removable_from_navbar_customizemode.js | 22 + ...941083_invalidate_wrapper_cache_createWidget.js | 31 + ...owser_942581_unregisterArea_keeps_placements.js | 106 + .../test/browser_943683_migration_test.js | 50 + ...4887_destroyWidget_should_destroy_in_palette.js | 17 + ..._945739_showInPrivateBrowsing_customize_mode.js | 35 + .../test/browser_947914_button_addons.js | 33 + .../test/browser_947914_button_copy.js | 59 + .../test/browser_947914_button_cut.js | 57 + .../test/browser_947914_button_find.js | 22 + .../test/browser_947914_button_history.js | 24 + .../test/browser_947914_button_newPrivateWindow.js | 48 + .../test/browser_947914_button_newWindow.js | 47 + .../test/browser_947914_button_paste.js | 41 + .../test/browser_947914_button_print.js | 45 + .../test/browser_947914_button_savePage.js | 20 + .../test/browser_947914_button_zoomIn.js | 37 + .../test/browser_947914_button_zoomOut.js | 38 + .../test/browser_947914_button_zoomReset.js | 40 + .../test/browser_947987_removable_default.js | 68 + .../browser_948985_non_removable_defaultArea.js | 32 + .../test/browser_952963_areaType_getter_no_area.js | 52 + .../test/browser_956602_remove_special_widget.js | 31 + .../browser_962069_drag_to_overflow_chevron.js | 54 + .../test/browser_962884_opt_in_disable_hyphens.js | 67 + ...stomizing_attribute_non_customizable_toolbar.js | 34 + .../test/browser_967000_button_charEncoding.js | 62 + .../test/browser_967000_button_feeds.js | 60 + .../test/browser_967000_button_sync.js | 335 + ...wser_968447_bookmarks_toolbar_items_in_panel.js | 65 + .../browser_968565_insert_before_hidden_items.js | 56 + ...969427_recreate_destroyed_widget_after_reset.js | 34 + ...er_969661_character_encoding_navbar_disabled.js | 26 + .../test/browser_970511_undo_restore_default.js | 128 + .../browser_972267_customizationchange_events.js | 46 + .../test/browser_973641_button_addon.js | 71 + .../test/browser_973932_addonbar_currentset.js | 30 + .../browser_975719_customtoolbars_behaviour.js | 145 + .../test/browser_976792_insertNodeInWindow.js | 414 + .../test/browser_978084_dragEnd_after_move.js | 46 + .../test/browser_980155_add_overflow_toolbar.js | 51 + .../test/browser_981305_separator_insertion.js | 73 + ...rowser_981418-widget-onbeforecreated-handler.js | 93 + ...wser_982656_restore_defaults_builtin_widgets.js | 57 + .../browser_984455_bookmarks_items_reparenting.js | 267 + ...rowser_985815_propagate_setToolbarVisibility.js | 45 + .../test/browser_987177_destroyWidget_xul.js | 33 + .../test/browser_987177_xul_wrapper_updating.js | 74 + .../test/browser_987185_syncButton.js | 77 + .../test/browser_987492_window_api.js | 54 + .../test/browser_987640_charEncoding.js | 60 + .../test/browser_988072_sidebar_events.js | 392 + .../browser_989338_saved_placements_not_resaved.js | 56 + .../test/browser_989751_subviewbutton_class.js | 62 + ...rowser_992747_toggle_noncustomizable_toolbar.js | 26 + .../test/browser_993322_widget_notoolbar.js | 36 + ...er_995164_registerArea_during_customize_mode.js | 149 + ...ser_996364_registerArea_different_properties.js | 112 + .../test/browser_996635_remove_non_widgets.js | 43 + .../test/browser_bootstrapped_custom_toolbar.js | 81 + .../test/browser_check_tooltips_in_navbar.js | 14 + ...er_customizemode_contextmenu_menubuttonstate.js | 24 + .../customizableui/test/browser_panel_toggle.js | 43 + .../test/browser_switch_to_customize_mode.js | 34 + browser/components/customizableui/test/head.js | 499 + .../test/support/feeds_test_page.html | 10 + .../customizableui/test/support/test-feed.xml | 23 + .../support/test_967000_charEncoding_page.html | 11 + .../components/dirprovider/DirectoryProvider.cpp | 286 + browser/components/dirprovider/DirectoryProvider.h | 51 + browser/components/dirprovider/moz.build | 19 + .../components/dirprovider/tests/unit/.eslintrc.js | 7 + browser/components/distribution.js | 504 + browser/components/downloads/DownloadsCommon.jsm | 1553 + browser/components/downloads/DownloadsTaskbar.jsm | 177 + browser/components/downloads/DownloadsViewUI.jsm | 395 + .../downloads/content/allDownloadsViewOverlay.js | 1439 + .../downloads/content/allDownloadsViewOverlay.xul | 131 + .../downloads/content/contentAreaDownloadsView.css | 11 + .../downloads/content/contentAreaDownloadsView.js | 17 + .../downloads/content/contentAreaDownloadsView.xul | 46 + browser/components/downloads/content/download.xml | 99 + browser/components/downloads/content/downloads.css | 267 + browser/components/downloads/content/downloads.js | 1732 + .../downloads/content/downloadsOverlay.xul | 210 + browser/components/downloads/content/indicator.js | 606 + .../downloads/content/indicatorOverlay.xul | 36 + browser/components/downloads/jar.mn | 16 + browser/components/downloads/moz.build | 22 + .../components/downloads/test/browser/.eslintrc.js | 7 + .../components/downloads/test/browser/browser.ini | 15 + .../test/browser/browser_basic_functionality.js | 56 + .../browser/browser_confirm_unblock_download.js | 92 + .../test/browser/browser_downloads_panel_block.js | 183 + .../test/browser/browser_downloads_panel_footer.js | 95 + .../test/browser/browser_downloads_panel_height.js | 29 + .../test/browser/browser_first_download_panel.js | 57 + .../browser/browser_iframe_gone_mid_download.js | 62 + .../test/browser/browser_indicatorDrop.js | 67 + .../downloads/test/browser/browser_libraryDrop.js | 72 + .../test/browser/browser_overflow_anchor.js | 115 + browser/components/downloads/test/browser/head.js | 300 + .../components/downloads/test/unit/.eslintrc.js | 7 + browser/components/downloads/test/unit/head.js | 18 + .../downloads/test/unit/test_DownloadsCommon.js | 37 + .../components/downloads/test/unit/xpcshell.ini | 7 + browser/components/extensions/.eslintrc.js | 22 + browser/components/extensions/ext-bookmarks.js | 374 + browser/components/extensions/ext-browserAction.js | 528 + .../components/extensions/ext-c-contextMenus.js | 158 + browser/components/extensions/ext-c-omnibox.js | 32 + browser/components/extensions/ext-c-tabs.js | 35 + browser/components/extensions/ext-commands.js | 259 + browser/components/extensions/ext-contextMenus.js | 537 + .../components/extensions/ext-desktop-runtime.js | 26 + browser/components/extensions/ext-history.js | 246 + browser/components/extensions/ext-omnibox.js | 104 + browser/components/extensions/ext-pageAction.js | 287 + browser/components/extensions/ext-sessions.js | 92 + browser/components/extensions/ext-tabs.js | 1093 + browser/components/extensions/ext-utils.js | 1243 + browser/components/extensions/ext-windows.js | 231 + .../components/extensions/extension-mac-panel.css | 3 + browser/components/extensions/extension-mac.css | 11 + .../components/extensions/extension-win-panel.css | 7 + browser/components/extensions/extension.css | 572 + browser/components/extensions/extension.svg | 19 + .../extensions/extensions-browser.manifest | 31 + browser/components/extensions/jar.mn | 29 + browser/components/extensions/moz.build | 17 + browser/components/extensions/schemas/LICENSE | 27 + .../components/extensions/schemas/bookmarks.json | 568 + .../extensions/schemas/browser_action.json | 430 + .../components/extensions/schemas/commands.json | 148 + .../extensions/schemas/context_menus.json | 424 + .../extensions/schemas/context_menus_internal.json | 78 + browser/components/extensions/schemas/history.json | 316 + browser/components/extensions/schemas/jar.mn | 16 + browser/components/extensions/schemas/moz.build | 7 + browser/components/extensions/schemas/omnibox.json | 248 + .../components/extensions/schemas/page_action.json | 234 + .../components/extensions/schemas/sessions.json | 146 + browser/components/extensions/schemas/tabs.json | 1295 + browser/components/extensions/schemas/windows.json | 508 + .../extensions/test/browser/.eslintrc.js | 36 + .../components/extensions/test/browser/browser.ini | 115 + .../browser/browser_ext_browserAction_context.js | 398 + .../browser/browser_ext_browserAction_disabled.js | 68 + .../browser_ext_browserAction_pageAction_icon.js | 321 + ...xt_browserAction_pageAction_icon_permissions.js | 210 + .../browser/browser_ext_browserAction_popup.js | 413 + .../browser_ext_browserAction_popup_resize.js | 304 + .../browser/browser_ext_browserAction_simple.js | 59 + .../browser_ext_commands_execute_browser_action.js | 113 + .../browser_ext_commands_execute_page_action.js | 133 + .../test/browser/browser_ext_commands_getAll.js | 81 + .../test/browser/browser_ext_commands_onCommand.js | 229 + .../browser/browser_ext_contentscript_connect.js | 67 + .../test/browser/browser_ext_contextMenus.js | 342 + .../browser/browser_ext_contextMenus_checkboxes.js | 96 + .../test/browser/browser_ext_contextMenus_icons.js | 76 + .../browser/browser_ext_contextMenus_onclick.js | 196 + .../browser_ext_contextMenus_radioGroups.js | 100 + .../browser/browser_ext_contextMenus_uninstall.js | 84 + .../browser_ext_contextMenus_urlPatterns.js | 254 + .../test/browser/browser_ext_currentWindow.js | 149 + .../test/browser/browser_ext_getViews.js | 198 + .../test/browser/browser_ext_incognito_popup.js | 108 + .../test/browser/browser_ext_incognito_views.js | 121 + .../test/browser/browser_ext_lastError.js | 55 + ...r_ext_legacy_extension_context_contentscript.js | 173 + .../extensions/test/browser/browser_ext_omnibox.js | 286 + .../browser/browser_ext_optionsPage_privileges.js | 66 + .../test/browser/browser_ext_pageAction_context.js | 178 + .../test/browser/browser_ext_pageAction_popup.js | 238 + .../browser/browser_ext_pageAction_popup_resize.js | 169 + .../test/browser/browser_ext_pageAction_simple.js | 60 + .../test/browser/browser_ext_pageAction_title.js | 226 + .../browser/browser_ext_popup_api_injection.js | 101 + .../test/browser/browser_ext_popup_background.js | 133 + .../test/browser/browser_ext_popup_corners.js | 98 + .../test/browser/browser_ext_popup_sendMessage.js | 93 + .../test/browser/browser_ext_popup_shutdown.js | 77 + .../browser/browser_ext_runtime_openOptionsPage.js | 276 + ...rowser_ext_runtime_openOptionsPage_uninstall.js | 101 + .../browser/browser_ext_runtime_setUninstallURL.js | 94 + .../browser_ext_sessions_getRecentlyClosed.js | 97 + ...owser_ext_sessions_getRecentlyClosed_private.js | 61 + .../browser_ext_sessions_getRecentlyClosed_tabs.js | 96 + .../test/browser/browser_ext_sessions_restore.js | 134 + .../extensions/test/browser/browser_ext_simple.js | 57 + .../test/browser/browser_ext_tab_runtimeConnect.js | 74 + .../test/browser/browser_ext_tabs_audio.js | 203 + .../browser/browser_ext_tabs_captureVisibleTab.js | 155 + .../test/browser/browser_ext_tabs_cookieStoreId.js | 156 + .../test/browser/browser_ext_tabs_create.js | 166 + .../browser/browser_ext_tabs_create_invalid_url.js | 66 + .../browser/browser_ext_tabs_detectLanguage.js | 47 + .../test/browser/browser_ext_tabs_duplicate.js | 146 + .../test/browser/browser_ext_tabs_events.js | 280 + .../test/browser/browser_ext_tabs_executeScript.js | 234 + .../browser/browser_ext_tabs_executeScript_bad.js | 217 + .../browser/browser_ext_tabs_executeScript_good.js | 189 + .../browser_ext_tabs_executeScript_no_create.js | 67 + .../browser_ext_tabs_executeScript_runAt.js | 107 + .../test/browser/browser_ext_tabs_getCurrent.js | 70 + .../test/browser/browser_ext_tabs_insertCSS.js | 86 + .../test/browser/browser_ext_tabs_move.js | 103 + .../test/browser/browser_ext_tabs_move_window.js | 98 + .../browser_ext_tabs_move_window_multiple.js | 43 + .../browser/browser_ext_tabs_move_window_pinned.js | 42 + .../test/browser/browser_ext_tabs_onHighlighted.js | 126 + .../test/browser/browser_ext_tabs_onUpdated.js | 198 + .../test/browser/browser_ext_tabs_query.js | 224 + .../test/browser/browser_ext_tabs_reload.js | 54 + .../browser_ext_tabs_reload_bypass_cache.js | 58 + .../test/browser/browser_ext_tabs_removeCSS.js | 95 + .../test/browser/browser_ext_tabs_sendMessage.js | 227 + .../test/browser/browser_ext_tabs_update.js | 45 + .../test/browser/browser_ext_tabs_update_url.js | 110 + .../test/browser/browser_ext_tabs_zoom.js | 222 + .../test/browser/browser_ext_topwindowid.js | 23 + .../browser/browser_ext_webNavigation_frameId0.js | 45 + .../browser/browser_ext_webNavigation_getFrames.js | 168 + ...browser_ext_webNavigation_urlbar_transitions.js | 251 + .../test/browser/browser_ext_webRequest.js | 95 + .../extensions/test/browser/browser_ext_windows.js | 33 + .../browser_ext_windows_allowScriptsToClose.js | 61 + .../test/browser/browser_ext_windows_create.js | 142 + .../browser/browser_ext_windows_create_params.js | 33 + .../browser/browser_ext_windows_create_tabId.js | 140 + .../test/browser/browser_ext_windows_create_url.js | 84 + .../test/browser/browser_ext_windows_events.js | 115 + .../test/browser/browser_ext_windows_size.js | 114 + .../test/browser/browser_ext_windows_update.js | 189 + .../extensions/test/browser/context.html | 23 + .../browser/context_tabs_onUpdated_iframe.html | 19 + .../test/browser/context_tabs_onUpdated_page.html | 18 + .../extensions/test/browser/ctxmenu-image.png | Bin 0 -> 5401 bytes .../extensions/test/browser/file_bypass_cache.sjs | 11 + .../extensions/test/browser/file_dummy.html | 9 + .../test/browser/file_iframe_document.html | 10 + .../test/browser/file_iframe_document.sjs | 41 + .../test/browser/file_language_fr_en.html | 14 + .../extensions/test/browser/file_language_ja.html | 10 + .../extensions/test/browser/file_language_tlh.html | 12 + .../test/browser/file_popup_api_injection_a.html | 10 + .../test/browser/file_popup_api_injection_b.html | 10 + browser/components/extensions/test/browser/head.js | 263 + .../extensions/test/browser/head_pageAction.js | 157 + .../extensions/test/browser/head_sessions.js | 47 + .../test/browser/searchSuggestionEngine.sjs | 9 + .../test/browser/searchSuggestionEngine.xml | 9 + .../extensions/test/mochitest/mochitest.ini | 6 + .../test/mochitest/test_ext_all_apis.html | 75 + .../extensions/test/xpcshell/.eslintrc.js | 9 + .../components/extensions/test/xpcshell/head.js | 55 + .../extensions/test/xpcshell/test_ext_bookmarks.js | 601 + .../extensions/test/xpcshell/test_ext_history.js | 487 + .../test/xpcshell/test_ext_manifest_commands.js | 24 + .../test/xpcshell/test_ext_manifest_omnibox.js | 61 + .../test/xpcshell/test_ext_manifest_permissions.js | 57 + .../extensions/test/xpcshell/xpcshell.ini | 11 + browser/components/feeds/BrowserFeeds.manifest | 25 + browser/components/feeds/FeedConverter.js | 568 + browser/components/feeds/FeedWriter.js | 1007 + browser/components/feeds/WebContentConverter.js | 1071 + browser/components/feeds/content/subscribe.js | 25 + browser/components/feeds/content/subscribe.xhtml | 74 + browser/components/feeds/jar.mn | 7 + browser/components/feeds/moz.build | 41 + browser/components/feeds/nsFeedSniffer.cpp | 370 + browser/components/feeds/nsFeedSniffer.h | 37 + browser/components/feeds/nsIFeedResultService.idl | 70 + .../feeds/nsIWebContentConverterRegistrar.idl | 117 + browser/components/feeds/test/.eslintrc.js | 7 + browser/components/feeds/test/bug368464-data.xml | 18 + browser/components/feeds/test/bug408328-data.xml | 63 + browser/components/feeds/test/bug436801-data.xml | 44 + browser/components/feeds/test/bug494328-data.xml | 24 + browser/components/feeds/test/bug589543-data.xml | 23 + browser/components/feeds/test/chrome/.eslintrc.js | 7 + browser/components/feeds/test/chrome/chrome.ini | 10 + .../components/feeds/test/chrome/sample_feed.atom | 23 + .../components/feeds/test/chrome/test_423060.xul | 56 + .../feeds/test/chrome/test_bug368464.html | 32 + .../feeds/test/chrome/test_bug408328.html | 37 + .../feeds/test/chrome/test_maxSniffing.html | 37 + browser/components/feeds/test/mochitest.ini | 14 + browser/components/feeds/test/test_bug436801.html | 118 + browser/components/feeds/test/test_bug494328.html | 36 + browser/components/feeds/test/test_bug589543.html | 32 + .../feeds/test/test_registerHandler.html | 85 + browser/components/feeds/test/unit/.eslintrc.js | 7 + browser/components/feeds/test/unit/head_feeds.js | 5 + browser/components/feeds/test/unit/test_355473.js | 43 + browser/components/feeds/test/unit/test_758990.js | 42 + browser/components/feeds/test/unit/xpcshell.ini | 8 + browser/components/feeds/test/valid-feed.xml | 23 + .../feeds/test/valid-unsniffable-feed.xml | 32 + browser/components/migration/.eslintrc.js | 82 + .../components/migration/360seProfileMigrator.js | 328 + browser/components/migration/AutoMigrate.jsm | 670 + .../migration/BrowserProfileMigrators.manifest | 33 + .../components/migration/ChromeProfileMigrator.js | 557 + browser/components/migration/ESEDBReader.jsm | 590 + .../components/migration/EdgeProfileMigrator.js | 450 + .../components/migration/FirefoxProfileMigrator.js | 255 + browser/components/migration/IEProfileMigrator.js | 542 + browser/components/migration/MSMigrationUtils.jsm | 889 + browser/components/migration/MigrationUtils.jsm | 1117 + browser/components/migration/ProfileMigrator.js | 21 + .../components/migration/SafariProfileMigrator.js | 650 + .../migration/content/aboutWelcomeBack.xhtml | 82 + .../content/extra-migration-strings.properties | 14 + browser/components/migration/content/migration.js | 549 + browser/components/migration/content/migration.xul | 109 + browser/components/migration/jar.mn | 9 + browser/components/migration/moz.build | 62 + .../migration/nsIBrowserProfileMigrator.idl | 77 + .../components/migration/nsIEHistoryEnumerator.cpp | 120 + .../components/migration/nsIEHistoryEnumerator.h | 37 + .../components/migration/nsWindowsMigrationUtils.h | 36 + .../migration/tests/browser/.eslintrc.js | 9 + .../components/migration/tests/browser/browser.ini | 3 + .../tests/browser/browser_undo_notification.js | 67 + ...browser_undo_notification_multiple_dismissal.js | 122 + .../browser/browser_undo_notification_wording.js | 67 + .../migration/tests/marionette/manifest.ini | 5 + .../tests/marionette/test_refresh_firefox.py | 416 + .../components/migration/tests/unit/.eslintrc.js | 7 + .../Google/Chrome/User Data/Default/Login Data | Bin 0 -> 22528 bytes .../Google/Chrome/Default/Cookies | Bin 0 -> 10240 bytes .../Application Support/Google/Chrome/Local State | 22 + .../tests/unit/Library/Safari/Bookmarks.plist | Bin 0 -> 1860 bytes .../migration/tests/unit/head_migration.js | 69 + .../migration/tests/unit/test_Chrome_cookies.js | 51 + .../migration/tests/unit/test_Chrome_passwords.js | 219 + .../migration/tests/unit/test_Edge_availability.js | 20 + .../migration/tests/unit/test_Edge_db_migration.js | 471 + .../migration/tests/unit/test_IE7_passwords.js | 397 + .../migration/tests/unit/test_IE_bookmarks.js | 44 + .../migration/tests/unit/test_IE_cookies.js | 111 + .../migration/tests/unit/test_Safari_bookmarks.js | 46 + .../migration/tests/unit/test_automigration.js | 695 + .../migration/tests/unit/test_fx_telemetry.js | 288 + .../components/migration/tests/unit/xpcshell.ini | 26 + browser/components/moz.build | 65 + .../components/newtab/NewTabComponents.manifest | 2 + browser/components/newtab/NewTabMessages.jsm | 242 + browser/components/newtab/NewTabPrefsProvider.jsm | 114 + .../components/newtab/NewTabRemoteResources.jsm | 15 + browser/components/newtab/NewTabSearchProvider.jsm | 103 + browser/components/newtab/NewTabURL.jsm | 36 + browser/components/newtab/NewTabWebChannel.jsm | 299 + browser/components/newtab/PlacesProvider.jsm | 211 + browser/components/newtab/PreviewProvider.jsm | 49 + browser/components/newtab/aboutNewTabService.js | 289 + browser/components/newtab/moz.build | 33 + .../components/newtab/nsIAboutNewTabService.idl | 63 + .../components/newtab/tests/browser/.eslintrc.js | 7 + .../components/newtab/tests/browser/blue_page.html | 9 + .../components/newtab/tests/browser/browser.ini | 16 + .../tests/browser/browser_PreviewProvider.js | 90 + .../tests/browser/browser_newtab_overrides.js | 139 + .../newtab/tests/browser/browser_newtabmessages.js | 222 + .../tests/browser/browser_newtabwebchannel.js | 251 + .../browser/browser_remotenewtab_pageloads.js | 52 + .../newtab/tests/browser/dummy_page.html | 10 + .../tests/browser/newtabmessages_places.html | 49 + .../newtab/tests/browser/newtabmessages_prefs.html | 32 + .../tests/browser/newtabmessages_preview.html | 37 + .../tests/browser/newtabmessages_search.html | 113 + .../tests/browser/newtabwebchannel_basic.html | 36 + .../components/newtab/tests/xpcshell/.eslintrc.js | 7 + .../tests/xpcshell/test_AboutNewTabService.js | 236 + .../tests/xpcshell/test_NewTabPrefsProvider.js | 50 + .../tests/xpcshell/test_NewTabSearchProvider.js | 82 + .../newtab/tests/xpcshell/test_NewTabURL.js | 52 + .../newtab/tests/xpcshell/test_PlacesProvider.js | 358 + .../components/newtab/tests/xpcshell/xpcshell.ini | 11 + browser/components/nsBrowserContentHandler.js | 805 + browser/components/nsBrowserGlue.js | 2867 + browser/components/nsIBrowserGlue.idl | 37 + browser/components/nsIBrowserHandler.idl | 20 + browser/components/originattributes/moz.build | 16 + .../originattributes/test/browser/.eslintrc.js | 7 + .../originattributes/test/browser/browser.ini | 64 + .../test/browser/browser_blobURLIsolation.js | 97 + .../test/browser/browser_broadcastChannel.js | 47 + .../originattributes/test/browser/browser_cache.js | 259 + .../test/browser/browser_clientAuth.js | 44 + .../test/browser/browser_cookieIsolation.js | 31 + .../test/browser/browser_favicon_firstParty.js | 343 + .../test/browser/browser_favicon_userContextId.js | 257 + .../test/browser/browser_firstPartyIsolation.js | 174 + .../test/browser/browser_httpauth.js | 54 + .../test/browser/browser_imageCacheIsolation.js | 80 + .../test/browser/browser_localStorageIsolation.js | 24 + .../test/browser/browser_sharedworker.js | 26 + .../originattributes/test/browser/dummy.html | 9 + .../test/browser/file_broadcastChannel.html | 16 + .../test/browser/file_broadcastChanneliFrame.html | 15 + .../originattributes/test/browser/file_cache.html | 25 + .../test/browser/file_favicon.html | 11 + .../originattributes/test/browser/file_favicon.png | Bin 0 -> 344 bytes .../test/browser/file_favicon.png^headers^ | 1 + .../test/browser/file_favicon_cache.html | 11 + .../test/browser/file_favicon_cache.png | Bin 0 -> 344 bytes .../test/browser/file_favicon_thirdParty.html | 11 + .../test/browser/file_firstPartyBasic.html | 8 + .../test/browser/file_sharedworker.html | 10 + .../test/browser/file_sharedworker.js | 9 + .../test/browser/file_thirdPartyChild.audio.ogg | Bin 0 -> 2603 bytes .../test/browser/file_thirdPartyChild.embed.png | Bin 0 -> 95 bytes .../test/browser/file_thirdPartyChild.fetch.html | 8 + .../test/browser/file_thirdPartyChild.iframe.html | 18 + .../test/browser/file_thirdPartyChild.img.png | Bin 0 -> 95 bytes .../test/browser/file_thirdPartyChild.import.js | 1 + .../test/browser/file_thirdPartyChild.link.css | 1 + .../test/browser/file_thirdPartyChild.object.png | Bin 0 -> 95 bytes .../test/browser/file_thirdPartyChild.request.html | 8 + .../test/browser/file_thirdPartyChild.script.js | 1 + .../browser/file_thirdPartyChild.sharedworker.js | 1 + .../test/browser/file_thirdPartyChild.track.vtt | 13 + .../test/browser/file_thirdPartyChild.video.ogv | Bin 0 -> 16049 bytes .../browser/file_thirdPartyChild.worker.fetch.html | 8 + .../test/browser/file_thirdPartyChild.worker.js | 9 + .../file_thirdPartyChild.worker.request.html | 8 + .../browser/file_thirdPartyChild.worker.xhr.html | 8 + .../test/browser/file_thirdPartyChild.xhr.html | 8 + .../originattributes/test/browser/head.js | 365 + .../originattributes/test/browser/test.html | 20 + .../originattributes/test/browser/test.js | 1 + .../originattributes/test/browser/test.js^headers^ | 1 + .../originattributes/test/browser/test2.html | 12 + .../originattributes/test/browser/test2.js | 1 + .../test/browser/test2.js^headers^ | 1 + .../test/browser/test_firstParty.html | 15 + .../test/browser/test_firstParty_cookie.html | 13 + .../browser/test_firstParty_html_redirect.html | 9 + .../browser/test_firstParty_http_redirect.html | 9 + .../test_firstParty_http_redirect.html^headers^ | 2 + .../test_firstParty_iframe_http_redirect.html | 13 + .../test/browser/test_firstParty_postMessage.html | 28 + .../originattributes/test/browser/window.html | 13 + .../test/browser/worker_blobify.js | 11 + .../test/browser/worker_deblobify.js | 31 + .../test/mochitest/file_empty.html | 2 + .../originattributes/test/mochitest/mochitest.ini | 5 + .../test/mochitest/test_permissions_api.html | 207 + browser/components/places/PlacesUIUtils.jsm | 1774 + .../places/content/bookmarkProperties.js | 693 + .../places/content/bookmarkProperties.xul | 43 + .../components/places/content/bookmarksPanel.js | 24 + .../components/places/content/bookmarksPanel.xul | 54 + .../places/content/browserPlacesViews.js | 1996 + browser/components/places/content/controller.js | 1742 + .../places/content/downloadsViewOverlay.xul | 47 + .../places/content/editBookmarkOverlay.js | 1168 + .../places/content/editBookmarkOverlay.xul | 188 + browser/components/places/content/history-panel.js | 98 + .../components/places/content/history-panel.xul | 95 + browser/components/places/content/menu.xml | 633 + browser/components/places/content/moveBookmarks.js | 65 + .../components/places/content/moveBookmarks.xul | 53 + browser/components/places/content/organizer.css | 7 + browser/components/places/content/places.css | 25 + browser/components/places/content/places.js | 1405 + browser/components/places/content/places.xul | 438 + .../components/places/content/placesOverlay.xul | 233 + browser/components/places/content/sidebarUtils.js | 106 + browser/components/places/content/tree.xml | 801 + browser/components/places/content/treeView.js | 1726 + browser/components/places/jar.mn | 34 + browser/components/places/moz.build | 18 + .../components/places/tests/browser/.eslintrc.js | 7 + .../places/tests/browser/bookmark_dummy_1.html | 9 + .../places/tests/browser/bookmark_dummy_2.html | 9 + .../components/places/tests/browser/browser.ini | 58 + .../browser_0_library_left_pane_migration.js | 90 + .../browser/browser_410196_paste_into_tags.js | 114 + .../places/tests/browser/browser_416459_cut.js | 83 + .../places/tests/browser/browser_423515.js | 173 + .../places/tests/browser/browser_425884.js | 127 + .../tests/browser/browser_435851_copy_query.js | 59 + .../places/tests/browser/browser_475045.js | 65 + .../places/tests/browser/browser_555547.js | 66 + ...er_bookmarkProperties_addFolderDefaultButton.js | 53 + ...r_bookmarkProperties_addKeywordForThisSearch.js | 110 + .../browser_bookmarkProperties_addLivemark.js | 39 + .../browser_bookmarkProperties_editTagContainer.js | 71 + .../browser_bookmarkProperties_readOnlyRoot.js | 42 + .../tests/browser/browser_bookmark_all_tabs.js | 37 + .../browser/browser_bookmarklet_windowOpen.js | 61 + .../tests/browser/browser_bookmarksProperties.js | 450 + .../browser/browser_drag_bookmarks_on_toolbar.js | 256 + .../tests/browser/browser_forgetthissite_single.js | 78 + .../browser/browser_history_sidebar_search.js | 64 + .../tests/browser/browser_library_batch_delete.js | 114 + .../tests/browser/browser_library_commands.js | 235 + .../tests/browser/browser_library_downloads.js | 70 + .../tests/browser/browser_library_infoBox.js | 197 + .../browser/browser_library_left_pane_fixnames.js | 94 + .../browser_library_left_pane_select_hierarchy.js | 41 + .../tests/browser/browser_library_middleclick.js | 279 + .../browser/browser_library_openFlatContainer.js | 42 + .../tests/browser/browser_library_open_leak.js | 23 + .../tests/browser/browser_library_panel_leak.js | 54 + .../places/tests/browser/browser_library_search.js | 182 + .../browser/browser_library_views_liveupdate.js | 300 + .../browser/browser_markPageAsFollowedLink.js | 68 + .../tests/browser/browser_sidebarpanels_click.js | 157 + .../tests/browser/browser_sort_in_library.js | 249 + .../browser/browser_toolbarbutton_menu_context.js | 53 + .../tests/browser/browser_views_liveupdate.js | 475 + .../components/places/tests/browser/frameLeft.html | 8 + .../places/tests/browser/frameRight.html | 8 + .../places/tests/browser/framedPage.html | 9 + browser/components/places/tests/browser/head.js | 460 + .../places/tests/browser/keyword_form.html | 17 + .../places/tests/browser/pageopeningwindow.html | 9 + .../browser/sidebarpanels_click_test_page.html | 7 + .../components/places/tests/chrome/.eslintrc.js | 7 + browser/components/places/tests/chrome/chrome.ini | 15 + browser/components/places/tests/chrome/head.js | 7 + .../places/tests/chrome/test_0_bug510634.xul | 99 + .../tests/chrome/test_0_multiple_left_pane.xul | 85 + ...est_bug1163447_selectItems_through_shortcut.xul | 89 + .../chrome/test_bug427633_no_newfolder_if_noip.xul | 91 + .../test_bug485100-change-case-loses-tag.xul | 83 + .../places/tests/chrome/test_bug549192.xul | 120 + .../places/tests/chrome/test_bug549491.xul | 78 + .../chrome/test_bug631374_tags_selector_scroll.xul | 170 + .../chrome/test_editBookmarkOverlay_keywords.xul | 99 + .../test_editBookmarkOverlay_tags_liveUpdate.xul | 204 + .../chrome/test_selectItems_on_nested_tree.xul | 86 + .../places/tests/chrome/test_treeview_date.xul | 159 + browser/components/places/tests/unit/.eslintrc.js | 7 + .../places/tests/unit/bookmarks.glue.html | 16 + .../places/tests/unit/bookmarks.glue.json | 1 + .../components/places/tests/unit/corruptDB.sqlite | Bin 0 -> 32772 bytes .../components/places/tests/unit/distribution.ini | 27 + .../components/places/tests/unit/head_bookmarks.js | 133 + .../components/places/tests/unit/test_421483.js | 103 + .../places/tests/unit/test_PUIU_makeTransaction.js | 361 + .../tests/unit/test_browserGlue_bookmarkshtml.js | 33 + .../places/tests/unit/test_browserGlue_corrupt.js | 59 + .../unit/test_browserGlue_corrupt_nobackup.js | 52 + .../test_browserGlue_corrupt_nobackup_default.js | 55 + .../tests/unit/test_browserGlue_distribution.js | 125 + .../places/tests/unit/test_browserGlue_migrate.js | 70 + .../places/tests/unit/test_browserGlue_prefs.js | 240 + .../places/tests/unit/test_browserGlue_restore.js | 62 + .../tests/unit/test_browserGlue_smartBookmarks.js | 285 + ...browserGlue_urlbar_defaultbehavior_migration.js | 150 + .../tests/unit/test_clearHistory_shutdown.js | 181 + .../unit/test_leftpane_corruption_handling.js | 174 + browser/components/places/tests/unit/xpcshell.ini | 25 + .../components/preferences/applicationManager.js | 102 + .../components/preferences/applicationManager.xul | 59 + browser/components/preferences/blocklists.js | 209 + browser/components/preferences/blocklists.xul | 56 + browser/components/preferences/colors.xul | 102 + browser/components/preferences/connection.js | 213 + browser/components/preferences/connection.xul | 173 + browser/components/preferences/containers.js | 176 + browser/components/preferences/containers.xul | 52 + browser/components/preferences/cookies.js | 948 + browser/components/preferences/cookies.xul | 111 + browser/components/preferences/donottrack.xul | 43 + browser/components/preferences/fonts.js | 105 + browser/components/preferences/fonts.xul | 279 + browser/components/preferences/handlers.css | 37 + browser/components/preferences/handlers.xml | 105 + .../components/preferences/in-content/advanced.js | 770 + .../components/preferences/in-content/advanced.xul | 421 + .../preferences/in-content/applications.js | 1900 + .../preferences/in-content/applications.xul | 95 + .../preferences/in-content/containers.js | 73 + .../preferences/in-content/containers.xul | 54 + .../components/preferences/in-content/content.js | 294 + .../components/preferences/in-content/content.xul | 209 + browser/components/preferences/in-content/jar.mn | 18 + browser/components/preferences/in-content/main.js | 721 + browser/components/preferences/in-content/main.xul | 301 + .../components/preferences/in-content/moz.build | 13 + .../preferences/in-content/preferences.js | 315 + .../preferences/in-content/preferences.xul | 224 + .../components/preferences/in-content/privacy.js | 712 + .../components/preferences/in-content/privacy.xul | 308 + .../components/preferences/in-content/search.js | 604 + .../components/preferences/in-content/search.xul | 86 + .../components/preferences/in-content/security.js | 302 + .../components/preferences/in-content/security.xul | 131 + .../preferences/in-content/subdialogs.js | 434 + browser/components/preferences/in-content/sync.js | 673 + browser/components/preferences/in-content/sync.xul | 359 + .../preferences/in-content/tests/.eslintrc.js | 7 + .../preferences/in-content/tests/browser.ini | 43 + .../in-content/tests/browser_advanced_update.js | 158 + .../tests/browser_basic_rebuild_fonts_test.js | 76 + .../browser_bug1018066_resetScrollPosition.js | 24 + ...er_bug1020245_openPreferences_to_paneContent.js | 43 + ...9_prevent_scrolling_when_preferences_flipped.js | 92 + ..._prevent_scrolling_when_preferences_flipped.xul | 33 + .../in-content/tests/browser_bug410900.js | 46 + .../in-content/tests/browser_bug705422.js | 144 + .../in-content/tests/browser_bug731866.js | 52 + .../tests/browser_bug795764_cachedisabled.js | 52 + .../in-content/tests/browser_change_app_handler.js | 98 + .../in-content/tests/browser_connection.js | 99 + .../tests/browser_connection_bug388287.js | 125 + .../in-content/tests/browser_cookies_exceptions.js | 348 + .../tests/browser_defaultbrowser_alwayscheck.js | 103 + .../in-content/tests/browser_healthreport.js | 62 + .../browser_homepages_filter_aboutpreferences.js | 20 + .../tests/browser_notifications_do_not_disturb.js | 44 + .../tests/browser_permissions_urlFieldHidden.js | 45 + .../in-content/tests/browser_privacypane_1.js | 18 + .../in-content/tests/browser_privacypane_3.js | 17 + .../in-content/tests/browser_privacypane_4.js | 25 + .../in-content/tests/browser_privacypane_5.js | 17 + .../in-content/tests/browser_privacypane_8.js | 26 + .../in-content/tests/browser_proxy_backup.js | 65 + .../tests/browser_sanitizeOnShutdown_prefLocked.js | 37 + .../in-content/tests/browser_searchsuggestions.js | 43 + .../in-content/tests/browser_security.js | 130 + .../in-content/tests/browser_subdialogs.js | 293 + .../in-content/tests/browser_telemetry.js | 52 + .../preferences/in-content/tests/head.js | 165 + .../tests/privacypane_tests_perwindow.js | 330 + .../preferences/in-content/tests/subdialog.xul | 27 + .../preferences/in-content/tests/subdialog2.xul | 27 + browser/components/preferences/jar.mn | 31 + browser/components/preferences/languages.js | 312 + browser/components/preferences/languages.xul | 101 + browser/components/preferences/moz.build | 22 + browser/components/preferences/permissions.js | 462 + browser/components/preferences/permissions.xul | 83 + browser/components/preferences/sanitize.js | 21 + browser/components/preferences/sanitize.xul | 101 + browser/components/preferences/selectBookmark.js | 83 + browser/components/preferences/selectBookmark.xul | 44 + browser/components/preferences/translation.js | 255 + browser/components/preferences/translation.xul | 88 + .../content/aboutPrivateBrowsing.css | 10 + .../content/aboutPrivateBrowsing.js | 98 + .../content/aboutPrivateBrowsing.xhtml | 85 + browser/components/privatebrowsing/jar.mn | 8 + browser/components/privatebrowsing/moz.build | 14 + .../privatebrowsing/test/browser/.eslintrc.js | 7 + .../privatebrowsing/test/browser/browser.ini | 54 + ...owser_privatebrowsing_DownloadLastDirWithCPS.js | 282 + .../test/browser/browser_privatebrowsing_about.js | 115 + ...vatebrowsing_aboutHomeButtonAfterWindowClose.js | 24 + .../browser_privatebrowsing_aboutSessionRestore.js | 23 + .../browser/browser_privatebrowsing_blobUrl.js | 45 + .../test/browser/browser_privatebrowsing_cache.js | 138 + .../browser_privatebrowsing_certexceptionsui.js | 53 + .../browser/browser_privatebrowsing_concurrent.js | 88 + .../browser_privatebrowsing_concurrent_page.html | 33 + ...wser_privatebrowsing_context_and_chromeFlags.js | 60 + .../test/browser/browser_privatebrowsing_crh.js | 42 + .../browser_privatebrowsing_downloadLastDir.js | 93 + .../browser_privatebrowsing_downloadLastDir_c.js | 95 + ...owser_privatebrowsing_downloadLastDir_toggle.js | 105 + .../browser/browser_privatebrowsing_favicon.js | 293 + .../browser/browser_privatebrowsing_geoprompt.js | 54 + .../browser_privatebrowsing_geoprompt_page.html | 13 + .../browser_privatebrowsing_lastpbcontextexited.js | 49 + .../browser_privatebrowsing_localStorage.js | 25 + ...er_privatebrowsing_localStorage_before_after.js | 36 + ...atebrowsing_localStorage_before_after_page.html | 11 + ...tebrowsing_localStorage_before_after_page2.html | 10 + ...browser_privatebrowsing_localStorage_page1.html | 10 + ...browser_privatebrowsing_localStorage_page2.html | 10 + .../browser_privatebrowsing_newtab_from_popup.js | 61 + ...r_privatebrowsing_noSessionRestoreMenuOption.js | 23 + .../browser/browser_privatebrowsing_nonbrowser.js | 19 + .../browser/browser_privatebrowsing_opendir.js | 133 + ...rowser_privatebrowsing_placesTitleNoUpdate.html | 8 + .../browser_privatebrowsing_placesTitleNoUpdate.js | 72 + .../browser/browser_privatebrowsing_placestitle.js | 95 + .../browser_privatebrowsing_popupblocker.js | 70 + .../browser_privatebrowsing_protocolhandler.js | 47 + ...owser_privatebrowsing_protocolhandler_page.html | 13 + .../browser/browser_privatebrowsing_sidebar.js | 92 + .../browser/browser_privatebrowsing_theming.js | 38 + .../test/browser/browser_privatebrowsing_ui.js | 82 + .../browser/browser_privatebrowsing_urlbarfocus.js | 43 + .../browser/browser_privatebrowsing_windowtitle.js | 77 + .../browser_privatebrowsing_windowtitle_page.html | 9 + .../test/browser/browser_privatebrowsing_zoom.js | 37 + .../browser/browser_privatebrowsing_zoomrestore.js | 64 + .../privatebrowsing/test/browser/empty_file.html | 1 + .../privatebrowsing/test/browser/file_favicon.html | 11 + .../privatebrowsing/test/browser/file_favicon.png | Bin 0 -> 344 bytes .../test/browser/file_favicon.png^headers^ | 1 + .../privatebrowsing/test/browser/head.js | 63 + .../privatebrowsing/test/browser/popup.html | 12 + .../privatebrowsing/test/browser/title.sjs | 22 + .../safebrowsing/content/test/.eslintrc.js | 7 + .../safebrowsing/content/test/browser.ini | 8 + .../safebrowsing/content/test/browser_bug400731.js | 58 + .../safebrowsing/content/test/browser_bug415846.js | 86 + .../content/test/browser_whitelisted.js | 41 + .../components/safebrowsing/content/test/head.js | 55 + browser/components/search/content/search.xml | 2090 + browser/components/search/content/searchReset.js | 90 + .../components/search/content/searchReset.xhtml | 61 + .../search/content/searchbarBindings.css | 18 + browser/components/search/jar.mn | 9 + browser/components/search/moz.build | 14 + browser/components/search/test/.eslintrc.js | 7 + browser/components/search/test/426329.xml | 11 + browser/components/search/test/483086-1.xml | 10 + browser/components/search/test/483086-2.xml | 10 + browser/components/search/test/browser.ini | 44 + browser/components/search/test/browser_426329.js | 250 + browser/components/search/test/browser_483086.js | 49 + .../search/test/browser_aboutSearchReset.js | 159 + .../search/test/browser_abouthome_behavior.js | 144 + .../components/search/test/browser_addEngine.js | 105 + browser/components/search/test/browser_amazon.js | 82 + .../search/test/browser_amazon_behavior.js | 166 + browser/components/search/test/browser_bing.js | 118 + .../search/test/browser_bing_behavior.js | 166 + .../test/browser_contextSearchTabPosition.js | 62 + .../components/search/test/browser_contextmenu.js | 101 + browser/components/search/test/browser_google.js | 100 + .../search/test/browser_google_behavior.js | 165 + .../components/search/test/browser_google_codes.js | 161 + .../components/search/test/browser_healthreport.js | 82 + .../search/test/browser_hiddenOneOffs_cleanup.js | 99 + .../test/browser_hiddenOneOffs_diacritics.js | 59 + .../search/test/browser_oneOffContextMenu.js | 105 + .../test/browser_oneOffContextMenu_setDefault.js | 195 + .../components/search/test/browser_oneOffHeader.js | 142 + .../test/browser_private_search_perwindowpb.js | 76 + .../test/browser_searchbar_keyboard_navigation.js | 425 + .../search/test/browser_searchbar_openpopup.js | 521 + ...ser_searchbar_smallpanel_keyboard_navigation.js | 354 + browser/components/search/test/browser_webapi.js | 92 + browser/components/search/test/browser_yahoo.js | 132 + .../search/test/browser_yahoo_behavior.js | 166 + browser/components/search/test/head.js | 156 + browser/components/search/test/opensearch.html | 9 + browser/components/search/test/test.html | 8 + browser/components/search/test/testEngine.xml | 12 + .../search/test/testEngine_diacritics.xml | 12 + browser/components/search/test/testEngine_dupe.xml | 12 + .../search/test/testEngine_mozsearch.xml | 14 + browser/components/search/test/webapi.html | 16 + .../components/selfsupport/SelfSupportService.js | 78 + .../selfsupport/SelfSupportService.manifest | 2 + browser/components/selfsupport/moz.build | 14 + browser/components/selfsupport/test/.eslintrc.js | 7 + browser/components/selfsupport/test/browser.ini | 3 + .../selfsupport/test/browser_selfsupportAPI.js | 88 + browser/components/sessionstore/ContentRestore.jsm | 431 + .../sessionstore/DocShellCapabilities.jsm | 50 + browser/components/sessionstore/FrameTree.jsm | 254 + browser/components/sessionstore/GlobalState.jsm | 84 + browser/components/sessionstore/PageStyle.jsm | 100 + browser/components/sessionstore/PrivacyFilter.jsm | 135 + browser/components/sessionstore/PrivacyLevel.jsm | 64 + .../RecentlyClosedTabsAndWindowsMenuUtils.jsm | 214 + browser/components/sessionstore/RunState.jsm | 96 + browser/components/sessionstore/SessionCookies.jsm | 476 + browser/components/sessionstore/SessionFile.jsm | 399 + browser/components/sessionstore/SessionHistory.jsm | 428 + .../components/sessionstore/SessionMigration.jsm | 100 + browser/components/sessionstore/SessionSaver.jsm | 264 + browser/components/sessionstore/SessionStorage.jsm | 173 + browser/components/sessionstore/SessionStore.jsm | 4719 ++ browser/components/sessionstore/SessionWorker.js | 381 + browser/components/sessionstore/SessionWorker.jsm | 25 + .../components/sessionstore/StartupPerformance.jsm | 234 + browser/components/sessionstore/TabAttributes.jsm | 74 + browser/components/sessionstore/TabState.jsm | 196 + browser/components/sessionstore/TabStateCache.jsm | 163 + .../components/sessionstore/TabStateFlusher.jsm | 184 + .../sessionstore/content/aboutSessionRestore.js | 362 + .../sessionstore/content/aboutSessionRestore.xhtml | 86 + .../sessionstore/content/content-sessionStore.js | 897 + browser/components/sessionstore/jar.mn | 8 + browser/components/sessionstore/moz.build | 52 + .../components/sessionstore/nsISessionStartup.idl | 66 + .../components/sessionstore/nsISessionStore.idl | 220 + .../components/sessionstore/nsSessionStartup.js | 353 + browser/components/sessionstore/nsSessionStore.js | 39 + .../sessionstore/nsSessionStore.manifest | 15 + browser/components/sessionstore/test/.eslintrc.js | 7 + browser/components/sessionstore/test/browser.ini | 242 + .../sessionstore/test/browser_1234021.js | 18 + .../sessionstore/test/browser_1234021_page.html | 6 + .../test/browser_248970_b_perwindowpb.js | 166 + .../sessionstore/test/browser_248970_b_sample.html | 37 + .../components/sessionstore/test/browser_339445.js | 32 + .../sessionstore/test/browser_339445_sample.html | 18 + .../components/sessionstore/test/browser_345898.js | 44 + .../components/sessionstore/test/browser_350525.js | 102 + .../test/browser_354894_perwindowpb.js | 474 + .../components/sessionstore/test/browser_367052.js | 41 + .../components/sessionstore/test/browser_393716.js | 71 + .../sessionstore/test/browser_394759_basic.js | 92 + .../sessionstore/test/browser_394759_behavior.js | 76 + .../test/browser_394759_perwindowpb.js | 55 + .../sessionstore/test/browser_394759_purge.js | 130 + .../components/sessionstore/test/browser_423132.js | 59 + .../sessionstore/test/browser_423132_sample.html | 14 + .../components/sessionstore/test/browser_447951.js | 65 + .../sessionstore/test/browser_447951_sample.html | 5 + .../components/sessionstore/test/browser_454908.js | 47 + .../sessionstore/test/browser_454908_sample.html | 8 + .../components/sessionstore/test/browser_456342.js | 49 + .../sessionstore/test/browser_456342_sample.xhtml | 36 + .../components/sessionstore/test/browser_459906.js | 62 + .../sessionstore/test/browser_459906_empty.html | 3 + .../sessionstore/test/browser_459906_sample.html | 41 + .../components/sessionstore/test/browser_461634.js | 85 + .../components/sessionstore/test/browser_461743.js | 39 + .../sessionstore/test/browser_461743_sample.html | 56 + .../components/sessionstore/test/browser_463205.js | 40 + .../sessionstore/test/browser_463205_sample.html | 7 + .../components/sessionstore/test/browser_463206.js | 53 + .../sessionstore/test/browser_463206_sample.html | 11 + .../components/sessionstore/test/browser_464199.js | 85 + .../sessionstore/test/browser_464620_a.html | 54 + .../sessionstore/test/browser_464620_a.js | 48 + .../sessionstore/test/browser_464620_b.html | 58 + .../sessionstore/test/browser_464620_b.js | 48 + .../sessionstore/test/browser_464620_xd.html | 5 + .../components/sessionstore/test/browser_465215.js | 28 + .../components/sessionstore/test/browser_465223.js | 45 + .../components/sessionstore/test/browser_466937.js | 42 + .../sessionstore/test/browser_466937_sample.html | 22 + .../test/browser_467409-backslashplosion.js | 74 + .../components/sessionstore/test/browser_477657.js | 60 + .../components/sessionstore/test/browser_480893.js | 47 + .../components/sessionstore/test/browser_485482.js | 37 + .../sessionstore/test/browser_485482_sample.html | 12 + .../components/sessionstore/test/browser_485563.js | 26 + .../components/sessionstore/test/browser_490040.js | 65 + .../components/sessionstore/test/browser_491168.js | 42 + .../components/sessionstore/test/browser_491577.js | 120 + .../components/sessionstore/test/browser_495495.js | 46 + .../components/sessionstore/test/browser_500328.js | 120 + .../components/sessionstore/test/browser_506482.js | 73 + .../components/sessionstore/test/browser_514751.js | 38 + .../components/sessionstore/test/browser_522375.js | 21 + .../components/sessionstore/test/browser_522545.js | 269 + .../components/sessionstore/test/browser_524745.js | 42 + .../components/sessionstore/test/browser_526613.js | 72 + .../components/sessionstore/test/browser_528776.js | 21 + .../components/sessionstore/test/browser_579868.js | 30 + .../components/sessionstore/test/browser_579879.js | 20 + .../components/sessionstore/test/browser_580512.js | 81 + .../components/sessionstore/test/browser_581937.js | 19 + .../sessionstore/test/browser_586068-apptabs.js | 58 + .../test/browser_586068-apptabs_ondemand.js | 53 + .../browser_586068-browser_state_interrupted.js | 113 + .../sessionstore/test/browser_586068-cascade.js | 54 + .../test/browser_586068-multi_window.js | 70 + .../sessionstore/test/browser_586068-reload.js | 54 + .../sessionstore/test/browser_586068-select.js | 69 + .../test/browser_586068-window_state.js | 59 + .../test/browser_586068-window_state_override.js | 59 + .../components/sessionstore/test/browser_586147.js | 52 + .../components/sessionstore/test/browser_588426.js | 41 + .../components/sessionstore/test/browser_589246.js | 242 + .../components/sessionstore/test/browser_590268.js | 137 + .../components/sessionstore/test/browser_590563.js | 74 + .../test/browser_595601-restore_hidden.js | 112 + .../components/sessionstore/test/browser_597071.js | 36 + .../components/sessionstore/test/browser_599909.js | 120 + .../components/sessionstore/test/browser_600545.js | 89 + .../components/sessionstore/test/browser_601955.js | 54 + .../components/sessionstore/test/browser_607016.js | 98 + .../test/browser_615394-SSWindowState_events.js | 361 + .../components/sessionstore/test/browser_618151.js | 65 + .../components/sessionstore/test/browser_623779.js | 13 + .../components/sessionstore/test/browser_624727.js | 35 + .../components/sessionstore/test/browser_625016.js | 82 + .../components/sessionstore/test/browser_628270.js | 52 + .../components/sessionstore/test/browser_635418.js | 55 + .../components/sessionstore/test/browser_636279.js | 101 + .../components/sessionstore/test/browser_637020.js | 66 + .../sessionstore/test/browser_637020_slow.sjs | 21 + .../test/browser_644409-scratchpads.js | 68 + .../components/sessionstore/test/browser_645428.js | 22 + .../components/sessionstore/test/browser_659591.js | 33 + .../components/sessionstore/test/browser_662743.js | 110 + .../sessionstore/test/browser_662743_sample.html | 15 + .../components/sessionstore/test/browser_662812.js | 36 + .../test/browser_665702-state_session.js | 24 + .../components/sessionstore/test/browser_682507.js | 16 + .../components/sessionstore/test/browser_687710.js | 44 + .../sessionstore/test/browser_687710_2.js | 64 + .../components/sessionstore/test/browser_694378.js | 33 + .../components/sessionstore/test/browser_701377.js | 41 + .../components/sessionstore/test/browser_705597.js | 58 + .../components/sessionstore/test/browser_707862.js | 61 + .../components/sessionstore/test/browser_739531.js | 47 + .../sessionstore/test/browser_739531_sample.html | 25 + .../components/sessionstore/test/browser_739805.js | 41 + .../test/browser_819510_perwindowpb.js | 120 + .../components/sessionstore/test/browser_911547.js | 63 + .../sessionstore/test/browser_911547_sample.html | 19 + .../test/browser_911547_sample.html^headers^ | 1 + .../test/browser_aboutPrivateBrowsing.js | 21 + .../test/browser_aboutSessionRestore.js | 55 + .../test/browser_async_duplicate_tab.js | 78 + .../sessionstore/test/browser_async_flushes.js | 113 + .../sessionstore/test/browser_async_remove_tab.js | 242 + .../test/browser_async_window_flushing.js | 178 + .../sessionstore/test/browser_attributes.js | 73 + .../test/browser_background_tab_crash.js | 221 + .../sessionstore/test/browser_backup_recovery.js | 206 + .../sessionstore/test/browser_broadcast.js | 131 + .../sessionstore/test/browser_capabilities.js | 76 + .../sessionstore/test/browser_cleaner.js | 157 + .../sessionstore/test/browser_cookies.js | 173 + .../sessionstore/test/browser_cookies.sjs | 21 + .../sessionstore/test/browser_crashedTabs.js | 462 + .../sessionstore/test/browser_dying_cache.js | 66 + .../sessionstore/test/browser_dynamic_frames.js | 87 + .../test/browser_forget_async_closings.js | 144 + .../test/browser_form_restore_events.js | 63 + .../test/browser_form_restore_events_sample.html | 99 + .../sessionstore/test/browser_formdata.js | 194 + .../sessionstore/test/browser_formdata_cc.js | 79 + .../sessionstore/test/browser_formdata_format.js | 113 + .../test/browser_formdata_format_sample.html | 7 + .../sessionstore/test/browser_formdata_sample.html | 20 + .../sessionstore/test/browser_formdata_xpath.js | 151 + .../test/browser_formdata_xpath_sample.html | 37 + .../sessionstore/test/browser_frame_history.js | 170 + .../sessionstore/test/browser_frame_history_a.html | 5 + .../sessionstore/test/browser_frame_history_b.html | 10 + .../sessionstore/test/browser_frame_history_c.html | 5 + .../test/browser_frame_history_c1.html | 5 + .../test/browser_frame_history_c2.html | 5 + .../test/browser_frame_history_index.html | 10 + .../test/browser_frame_history_index2.html | 4 + .../test/browser_frame_history_index_blank.html | 5 + .../sessionstore/test/browser_frametree.js | 131 + .../test/browser_frametree_sample.html | 8 + .../test/browser_frametree_sample_frameset.html | 11 + .../sessionstore/test/browser_global_store.js | 45 + .../sessionstore/test/browser_history_persist.js | 93 + .../sessionstore/test/browser_label_and_icon.js | 53 + .../sessionstore/test/browser_merge_closed_tabs.js | 71 + .../test/browser_multiple_navigateAndRestore.js | 36 + .../test/browser_newtab_userTypedValue.js | 72 + .../sessionstore/test/browser_pageStyle.js | 89 + .../test/browser_pageStyle_sample.html | 16 + .../test/browser_pageStyle_sample_nested.html | 9 + .../sessionstore/test/browser_page_title.js | 45 + .../test/browser_parentProcessRestoreHash.js | 95 + .../sessionstore/test/browser_pending_tabs.js | 35 + .../sessionstore/test/browser_privatetabs.js | 133 + .../sessionstore/test/browser_purge_shistory.js | 59 + .../test/browser_remoteness_flip_on_restore.js | 342 + .../sessionstore/test/browser_replace_load.js | 52 + .../browser_restore_cookies_noOriginAttributes.js | 171 + .../sessionstore/test/browser_restore_redirect.js | 69 + .../test/browser_revive_crashed_bg_tabs.js | 56 + .../sessionstore/test/browser_scrollPositions.js | 153 + .../test/browser_scrollPositionsReaderMode.js | 67 + .../browser_scrollPositions_readerModeArticle.html | 26 + .../test/browser_scrollPositions_sample.html | 8 + .../browser_scrollPositions_sample_frameset.html | 11 + .../test/browser_send_async_message_oom.js | 75 + .../sessionstore/test/browser_sessionHistory.js | 240 + .../test/browser_sessionHistory_slow.sjs | 21 + .../sessionstore/test/browser_sessionStorage.html | 27 + .../sessionstore/test/browser_sessionStorage.js | 188 + .../test/browser_sessionStorage_size.js | 51 + .../test/browser_sessionStoreContainer.js | 141 + .../sessionstore/test/browser_swapDocShells.js | 35 + .../sessionstore/test/browser_switch_remoteness.js | 49 + .../sessionstore/test/browser_undoCloseById.js | 118 + .../test/browser_unrestored_crashedTabs.js | 69 + .../sessionstore/test/browser_upgrade_backup.js | 134 + .../test/browser_windowRestore_perwindowpb.js | 26 + .../test/browser_windowStateContainer.js | 122 + .../components/sessionstore/test/content-forms.js | 133 + browser/components/sessionstore/test/content.js | 222 + browser/components/sessionstore/test/head.js | 564 + .../sessionstore/test/restore_redirect_http.html | 0 .../test/restore_redirect_http.html^headers^ | 2 + .../sessionstore/test/restore_redirect_js.html | 10 + .../sessionstore/test/restore_redirect_target.html | 8 + .../components/sessionstore/test/unit/.eslintrc.js | 7 + .../test/unit/data/sessionCheckpoints_all.json | 1 + .../test/unit/data/sessionstore_invalid.js | 3 + .../test/unit/data/sessionstore_valid.js | 3 + browser/components/sessionstore/test/unit/head.js | 32 + .../sessionstore/test/unit/test_backup_once.js | 130 + .../test/unit/test_histogram_corrupt_files.js | 114 + .../test/unit/test_shutdown_cleanup.js | 127 + .../test/unit/test_startup_invalid_session.js | 21 + .../test/unit/test_startup_nosession_async.js | 22 + .../test/unit/test_startup_session_async.js | 27 + .../components/sessionstore/test/unit/xpcshell.ini | 16 + browser/components/shell/ShellService.jsm | 114 + .../shell/content/setDesktopBackground.js | 214 + .../shell/content/setDesktopBackground.xul | 84 + browser/components/shell/jar.mn | 7 + browser/components/shell/moz.build | 62 + browser/components/shell/nsGNOMEShellService.cpp | 638 + browser/components/shell/nsGNOMEShellService.h | 36 + browser/components/shell/nsIGNOMEShellService.idl | 19 + browser/components/shell/nsIMacShellService.idl | 15 + browser/components/shell/nsIShellService.idl | 95 + .../components/shell/nsIWindowsShellService.idl | 17 + browser/components/shell/nsMacShellService.cpp | 434 + browser/components/shell/nsMacShellService.h | 32 + browser/components/shell/nsSetDefaultBrowser.js | 30 + .../components/shell/nsSetDefaultBrowser.manifest | 3 + browser/components/shell/nsShellService.h | 12 + browser/components/shell/nsWindowsShellService.cpp | 1280 + browser/components/shell/nsWindowsShellService.h | 37 + browser/components/shell/test/.eslintrc.js | 7 + browser/components/shell/test/browser.ini | 6 + browser/components/shell/test/browser_420786.js | 88 + browser/components/shell/test/browser_633221.js | 7 + browser/components/shell/test/unit/.eslintrc.js | 7 + browser/components/shell/test/unit/test_421977.js | 123 + browser/components/shell/test/unit/xpcshell.ini | 7 + browser/components/syncedtabs/EventEmitter.jsm | 45 + .../syncedtabs/SyncedTabsDeckComponent.js | 169 + .../components/syncedtabs/SyncedTabsDeckStore.js | 60 + .../components/syncedtabs/SyncedTabsDeckView.js | 116 + .../components/syncedtabs/SyncedTabsListStore.js | 235 + browser/components/syncedtabs/TabListComponent.js | 142 + browser/components/syncedtabs/TabListView.js | 568 + browser/components/syncedtabs/jar.mn | 7 + browser/components/syncedtabs/moz.build | 24 + browser/components/syncedtabs/sidebar.js | 30 + browser/components/syncedtabs/sidebar.xhtml | 114 + .../syncedtabs/test/browser/.eslintrc.js | 7 + .../components/syncedtabs/test/browser/browser.ini | 4 + .../test/browser/browser_sidebar_syncedtabslist.js | 410 + browser/components/syncedtabs/test/browser/head.js | 19 + .../syncedtabs/test/xpcshell/.eslintrc.js | 7 + .../components/syncedtabs/test/xpcshell/head.js | 29 + .../syncedtabs/test/xpcshell/test_EventEmitter.js | 35 + .../test/xpcshell/test_SyncedTabsDeckComponent.js | 218 + .../test/xpcshell/test_SyncedTabsDeckStore.js | 64 + .../test/xpcshell/test_SyncedTabsListStore.js | 266 + .../test/xpcshell/test_TabListComponent.js | 155 + .../syncedtabs/test/xpcshell/xpcshell.ini | 10 + browser/components/syncedtabs/util.js | 23 + browser/components/tests/browser/.eslintrc.js | 7 + browser/components/tests/browser/browser.ini | 4 + .../components/tests/browser/browser_bug538331.js | 426 + .../browser/browser_contentpermissionprompt.js | 166 + browser/components/tests/unit/.eslintrc.js | 7 + .../components/tests/unit/data/engine-de-DE.xml | 8 + browser/components/tests/unit/distribution.ini | 58 + browser/components/tests/unit/head.js | 9 + .../test_browserGlue_migration_loop_cleanup.js | 32 + browser/components/tests/unit/test_distribution.js | 152 + browser/components/tests/unit/xpcshell.ini | 10 + browser/components/translation/BingTranslator.jsm | 449 + .../components/translation/LanguageDetector.jsm | 143 + browser/components/translation/Translation.jsm | 446 + .../translation/TranslationContentHandler.jsm | 181 + .../components/translation/TranslationDocument.jsm | 683 + .../components/translation/YandexTranslator.jsm | 343 + browser/components/translation/cld2/Makefile | 74 + browser/components/translation/cld2/cld-worker.js | 86 + .../components/translation/cld2/cld-worker.js.mem | Bin 0 -> 1097263 bytes browser/components/translation/cld2/cld.idl | 47 + browser/components/translation/cld2/cldapp.cc | 107 + .../components/translation/cld2/internal/LICENSE | 202 + .../translation/cld2/internal/cld2_dynamic_data.h | 216 + .../cld2/internal/cld2_dynamic_data_loader.h | 52 + .../cld2/internal/cld2_generated_cjk_compatible.cc | 298 + .../internal/cld2_generated_deltaoctachrome0122.cc | 4601 ++ .../cld2_generated_distinctoctachrome0122.cc | 2208 + .../internal/cld2_generated_quadchrome0122_16.cc | 52746 +++++++++++++++++++ .../translation/cld2/internal/cld2tablesummary.h | 55 + .../cld2/internal/cld_generated_cjk_delta_bi_4.cc | 1136 + .../cld2/internal/cld_generated_cjk_uni_prop_80.cc | 7133 +++ .../cld_generated_score_quad_octa_0122_2.cc | 639 + .../translation/cld2/internal/cldutil.cc | 620 + .../components/translation/cld2/internal/cldutil.h | 80 + .../translation/cld2/internal/cldutil_shared.cc | 437 + .../translation/cld2/internal/cldutil_shared.h | 509 + .../translation/cld2/internal/compact_lang_det.cc | 322 + .../cld2/internal/compact_lang_det_hint_code.cc | 1649 + .../cld2/internal/compact_lang_det_hint_code.h | 95 + .../cld2/internal/compact_lang_det_impl.cc | 2039 + .../cld2/internal/compact_lang_det_impl.h | 183 + .../components/translation/cld2/internal/debug.h | 58 + .../translation/cld2/internal/debug_empty.cc | 64 + .../translation/cld2/internal/fixunicodevalue.cc | 54 + .../translation/cld2/internal/fixunicodevalue.h | 68 + .../cld2/internal/generated_distinct_bi_0.cc | 52 + .../cld2/internal/generated_entities.cc | 294 + .../cld2/internal/generated_language.cc | 4680 ++ .../translation/cld2/internal/generated_language.h | 651 + .../cld2/internal/generated_ulscript.cc | 781 + .../translation/cld2/internal/generated_ulscript.h | 140 + .../translation/cld2/internal/getonescriptspan.cc | 1086 + .../translation/cld2/internal/getonescriptspan.h | 110 + .../translation/cld2/internal/integral_types.h | 31 + .../translation/cld2/internal/lang_script.cc | 560 + .../translation/cld2/internal/lang_script.h | 187 + .../translation/cld2/internal/langspan.h | 40 + .../translation/cld2/internal/offsetmap.cc | 569 + .../translation/cld2/internal/offsetmap.h | 175 + .../components/translation/cld2/internal/port.h | 128 + .../cld2/internal/scoreonescriptspan.cc | 1334 + .../translation/cld2/internal/scoreonescriptspan.h | 297 + .../translation/cld2/internal/stringpiece.h | 78 + .../components/translation/cld2/internal/tote.cc | 265 + .../components/translation/cld2/internal/tote.h | 112 + .../cld2/internal/utf8prop_lettermarkscriptnum.h | 1629 + .../cld2/internal/utf8repl_lettermarklower.h | 756 + .../cld2/internal/utf8scannot_lettermarkspecial.h | 1453 + .../translation/cld2/internal/utf8statetable.cc | 1369 + .../translation/cld2/internal/utf8statetable.h | 283 + browser/components/translation/cld2/post.js | 171 + .../translation/cld2/public/compact_lang_det.h | 320 + .../components/translation/cld2/public/encodings.h | 169 + browser/components/translation/jar.mn | 6 + .../microsoft-translator-attribution.png | Bin 0 -> 3422 bytes browser/components/translation/moz.build | 24 + browser/components/translation/test/.eslintrc.js | 7 + browser/components/translation/test/bing.sjs | 234 + browser/components/translation/test/browser.ini | 13 + .../translation/test/browser_translation_bing.js | 133 + .../test/browser_translation_exceptions.js | 327 + .../test/browser_translation_infobar.js | 216 + .../test/browser_translation_telemetry.js | 300 + .../translation/test/browser_translation_yandex.js | 130 + .../translation/test/fixtures/bug1022725-fr.html | 15 + .../test/fixtures/result-da39a3ee5e.txt | 22 + .../test/fixtures/result-yandex-d448894848.json | 1 + .../components/translation/test/unit/.eslintrc.js | 7 + .../components/translation/test/unit/test_cld2.js | 463 + .../components/translation/test/unit/xpcshell.ini | 7 + browser/components/translation/test/yandex.sjs | 199 + .../components/translation/translation-infobar.xml | 441 + browser/components/uitour/UITour-lib.js | 331 + browser/components/uitour/UITour.jsm | 2111 + browser/components/uitour/content-UITour.js | 103 + browser/components/uitour/jar.mn | 6 + browser/components/uitour/moz.build | 16 + browser/components/uitour/test/.eslintrc.js | 7 + browser/components/uitour/test/browser.ini | 49 + browser/components/uitour/test/browser_UITour.js | 408 + browser/components/uitour/test/browser_UITour2.js | 83 + browser/components/uitour/test/browser_UITour3.js | 181 + .../browser_UITour_annotation_size_attributes.js | 42 + .../uitour/test/browser_UITour_availableTargets.js | 114 + .../uitour/test/browser_UITour_defaultBrowser.js | 61 + .../uitour/test/browser_UITour_detach_tab.js | 94 + .../uitour/test/browser_UITour_forceReaderMode.js | 17 + .../uitour/test/browser_UITour_heartbeat.js | 755 + .../uitour/test/browser_UITour_modalDialog.js | 104 + .../uitour/test/browser_UITour_observe.js | 85 + .../test/browser_UITour_panel_close_annotation.js | 153 + .../uitour/test/browser_UITour_pocket.js | 82 + .../uitour/test/browser_UITour_registerPageID.js | 108 + .../uitour/test/browser_UITour_resetProfile.js | 48 + .../uitour/test/browser_UITour_showNewTab.js | 17 + .../components/uitour/test/browser_UITour_sync.js | 105 + .../uitour/test/browser_UITour_toggleReaderMode.js | 16 + .../uitour/test/browser_backgroundTab.js | 46 + browser/components/uitour/test/browser_closeTab.js | 18 + browser/components/uitour/test/browser_fxa.js | 68 + browser/components/uitour/test/browser_no_tabs.js | 102 + .../uitour/test/browser_openPreferences.js | 36 + .../uitour/test/browser_openSearchPanel.js | 33 + .../uitour/test/browser_showMenu_controlCenter.js | 44 + .../uitour/test/browser_trackingProtection.js | 90 + .../uitour/test/browser_trackingProtection_tour.js | 77 + browser/components/uitour/test/head.js | 449 + browser/components/uitour/test/image.png | Bin 0 -> 56060 bytes browser/components/uitour/test/uitour.html | 42 + 1285 files changed, 268526 insertions(+) create mode 100644 browser/components/BrowserComponents.manifest create mode 100644 browser/components/about/AboutRedirector.cpp create mode 100644 browser/components/about/AboutRedirector.h create mode 100644 browser/components/about/moz.build create mode 100644 browser/components/build/Makefile.in create mode 100644 browser/components/build/moz.build create mode 100644 browser/components/build/nsBrowserCompsCID.h create mode 100644 browser/components/build/nsModule.cpp create mode 100644 browser/components/contextualidentity/content/usercontext.css create mode 100644 browser/components/contextualidentity/jar.mn create mode 100644 browser/components/contextualidentity/moz.build create mode 100644 browser/components/contextualidentity/test/browser/.eslintrc.js create mode 100644 browser/components/contextualidentity/test/browser/browser.ini create mode 100644 browser/components/contextualidentity/test/browser/browser_aboutURLs.js create mode 100644 browser/components/contextualidentity/test/browser/browser_blobUrl.js create mode 100644 browser/components/contextualidentity/test/browser/browser_broadcastchannel.js create mode 100644 browser/components/contextualidentity/test/browser/browser_count_and_remove.js create mode 100644 browser/components/contextualidentity/test/browser/browser_eme.js create mode 100644 browser/components/contextualidentity/test/browser/browser_favicon.js create mode 100644 browser/components/contextualidentity/test/browser/browser_forgetAPI_EME_forgetThisSite.js create mode 100644 browser/components/contextualidentity/test/browser/browser_forgetAPI_cookie_getCookiesWithOriginAttributes.js create mode 100644 browser/components/contextualidentity/test/browser/browser_forgetAPI_quota_clearStoragesForPrincipal.js create mode 100644 browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js create mode 100644 browser/components/contextualidentity/test/browser/browser_imageCache.js create mode 100644 browser/components/contextualidentity/test/browser/browser_middleClick.js create mode 100644 browser/components/contextualidentity/test/browser/browser_newtabButton.js create mode 100644 browser/components/contextualidentity/test/browser/browser_serviceworkers.js create mode 100644 browser/components/contextualidentity/test/browser/browser_usercontext.js create mode 100644 browser/components/contextualidentity/test/browser/browser_usercontextid_tabdrop.js create mode 100644 browser/components/contextualidentity/test/browser/browser_windowName.js create mode 100644 browser/components/contextualidentity/test/browser/browser_windowOpen.js create mode 100644 browser/components/contextualidentity/test/browser/empty_file.html create mode 100644 browser/components/contextualidentity/test/browser/favicon-normal32.png create mode 100644 browser/components/contextualidentity/test/browser/file_reflect_cookie_into_title.html create mode 100644 browser/components/contextualidentity/test/browser/file_set_storages.html create mode 100644 browser/components/contextualidentity/test/browser/serviceworker.html create mode 100644 browser/components/contextualidentity/test/browser/worker.js create mode 100644 browser/components/controlcenter/content/panel.inc.xul create mode 100644 browser/components/customizableui/CustomizableUI.jsm create mode 100644 browser/components/customizableui/CustomizableWidgets.jsm create mode 100644 browser/components/customizableui/CustomizeMode.jsm create mode 100644 browser/components/customizableui/DragPositionManager.jsm create mode 100644 browser/components/customizableui/PanelWideWidgetTracker.jsm create mode 100644 browser/components/customizableui/ScrollbarSampler.jsm create mode 100644 browser/components/customizableui/content/customizeMode.inc.xul create mode 100644 browser/components/customizableui/content/jar.mn create mode 100644 browser/components/customizableui/content/moz.build create mode 100644 browser/components/customizableui/content/panelUI.css create mode 100644 browser/components/customizableui/content/panelUI.inc.xul create mode 100644 browser/components/customizableui/content/panelUI.js create mode 100644 browser/components/customizableui/content/panelUI.xml create mode 100644 browser/components/customizableui/content/toolbar.xml create mode 100644 browser/components/customizableui/moz.build create mode 100644 browser/components/customizableui/test/.eslintrc.js create mode 100644 browser/components/customizableui/test/browser.ini create mode 100644 browser/components/customizableui/test/browser_1003588_no_specials_in_panel.js create mode 100644 browser/components/customizableui/test/browser_1007336_lwthemes_in_customize_mode.js create mode 100644 browser/components/customizableui/test/browser_1008559_anchor_undo_restore.js create mode 100644 browser/components/customizableui/test/browser_1042100_default_placements_update.js create mode 100644 browser/components/customizableui/test/browser_1058573_showToolbarsDropdown.js create mode 100644 browser/components/customizableui/test/browser_1087303_button_fullscreen.js create mode 100644 browser/components/customizableui/test/browser_1087303_button_preferences.js create mode 100644 browser/components/customizableui/test/browser_1089591_still_customizable_after_reset.js create mode 100644 browser/components/customizableui/test/browser_1096763_seen_widgets_post_reset.js create mode 100644 browser/components/customizableui/test/browser_1161838_inserted_new_default_buttons.js create mode 100644 browser/components/customizableui/test/browser_873501_handle_specials.js create mode 100644 browser/components/customizableui/test/browser_876926_customize_mode_wrapping.js create mode 100644 browser/components/customizableui/test/browser_876944_customize_mode_create_destroy.js create mode 100644 browser/components/customizableui/test/browser_877006_missing_view.js create mode 100644 browser/components/customizableui/test/browser_877178_unregisterArea.js create mode 100644 browser/components/customizableui/test/browser_877447_skip_missing_ids.js create mode 100644 browser/components/customizableui/test/browser_878452_drag_to_panel.js create mode 100644 browser/components/customizableui/test/browser_880164_customization_context_menus.js create mode 100644 browser/components/customizableui/test/browser_880382_drag_wide_widgets_in_panel.js create mode 100644 browser/components/customizableui/test/browser_884402_customize_from_overflow.js create mode 100644 browser/components/customizableui/test/browser_885052_customize_mode_observers_disabed.js create mode 100644 browser/components/customizableui/test/browser_885530_showInPrivateBrowsing.js create mode 100644 browser/components/customizableui/test/browser_886323_buildArea_removable_nodes.js create mode 100644 browser/components/customizableui/test/browser_887438_currentset_shim.js create mode 100644 browser/components/customizableui/test/browser_888817_currentset_updating.js create mode 100644 browser/components/customizableui/test/browser_890140_orphaned_placeholders.js create mode 100644 browser/components/customizableui/test/browser_890262_destroyWidget_after_add_to_panel.js create mode 100644 browser/components/customizableui/test/browser_892955_isWidgetRemovable_for_removed_widgets.js create mode 100644 browser/components/customizableui/test/browser_892956_destroyWidget_defaultPlacements.js create mode 100644 browser/components/customizableui/test/browser_901207_searchbar_in_panel.js create mode 100644 browser/components/customizableui/test/browser_909779_overflow_toolbars_new_window.js create mode 100644 browser/components/customizableui/test/browser_913972_currentset_overflow.js create mode 100644 browser/components/customizableui/test/browser_914138_widget_API_overflowable_toolbar.js create mode 100644 browser/components/customizableui/test/browser_914863_disabled_help_quit_buttons.js create mode 100644 browser/components/customizableui/test/browser_918049_skipintoolbarset_dnd.js create mode 100644 browser/components/customizableui/test/browser_923857_customize_mode_event_wrapping_during_reset.js create mode 100644 browser/components/customizableui/test/browser_927717_customize_drag_empty_toolbar.js create mode 100644 browser/components/customizableui/test/browser_932928_show_notice_when_palette_empty.js create mode 100644 browser/components/customizableui/test/browser_934113_menubar_removable.js create mode 100644 browser/components/customizableui/test/browser_934951_zoom_in_toolbar.js create mode 100644 browser/components/customizableui/test/browser_938980_navbar_collapsed.js create mode 100644 browser/components/customizableui/test/browser_938995_indefaultstate_nonremovable.js create mode 100644 browser/components/customizableui/test/browser_940013_registerToolbarNode_calls_registerArea.js create mode 100644 browser/components/customizableui/test/browser_940307_panel_click_closure_handling.js create mode 100644 browser/components/customizableui/test/browser_940946_removable_from_navbar_customizemode.js create mode 100644 browser/components/customizableui/test/browser_941083_invalidate_wrapper_cache_createWidget.js create mode 100644 browser/components/customizableui/test/browser_942581_unregisterArea_keeps_placements.js create mode 100644 browser/components/customizableui/test/browser_943683_migration_test.js create mode 100644 browser/components/customizableui/test/browser_944887_destroyWidget_should_destroy_in_palette.js create mode 100644 browser/components/customizableui/test/browser_945739_showInPrivateBrowsing_customize_mode.js create mode 100644 browser/components/customizableui/test/browser_947914_button_addons.js create mode 100644 browser/components/customizableui/test/browser_947914_button_copy.js create mode 100644 browser/components/customizableui/test/browser_947914_button_cut.js create mode 100644 browser/components/customizableui/test/browser_947914_button_find.js create mode 100644 browser/components/customizableui/test/browser_947914_button_history.js create mode 100644 browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js create mode 100644 browser/components/customizableui/test/browser_947914_button_newWindow.js create mode 100644 browser/components/customizableui/test/browser_947914_button_paste.js create mode 100644 browser/components/customizableui/test/browser_947914_button_print.js create mode 100644 browser/components/customizableui/test/browser_947914_button_savePage.js create mode 100644 browser/components/customizableui/test/browser_947914_button_zoomIn.js create mode 100644 browser/components/customizableui/test/browser_947914_button_zoomOut.js create mode 100644 browser/components/customizableui/test/browser_947914_button_zoomReset.js create mode 100644 browser/components/customizableui/test/browser_947987_removable_default.js create mode 100644 browser/components/customizableui/test/browser_948985_non_removable_defaultArea.js create mode 100644 browser/components/customizableui/test/browser_952963_areaType_getter_no_area.js create mode 100644 browser/components/customizableui/test/browser_956602_remove_special_widget.js create mode 100644 browser/components/customizableui/test/browser_962069_drag_to_overflow_chevron.js create mode 100644 browser/components/customizableui/test/browser_962884_opt_in_disable_hyphens.js create mode 100644 browser/components/customizableui/test/browser_963639_customizing_attribute_non_customizable_toolbar.js create mode 100644 browser/components/customizableui/test/browser_967000_button_charEncoding.js create mode 100644 browser/components/customizableui/test/browser_967000_button_feeds.js create mode 100644 browser/components/customizableui/test/browser_967000_button_sync.js create mode 100644 browser/components/customizableui/test/browser_968447_bookmarks_toolbar_items_in_panel.js create mode 100644 browser/components/customizableui/test/browser_968565_insert_before_hidden_items.js create mode 100644 browser/components/customizableui/test/browser_969427_recreate_destroyed_widget_after_reset.js create mode 100644 browser/components/customizableui/test/browser_969661_character_encoding_navbar_disabled.js create mode 100644 browser/components/customizableui/test/browser_970511_undo_restore_default.js create mode 100644 browser/components/customizableui/test/browser_972267_customizationchange_events.js create mode 100755 browser/components/customizableui/test/browser_973641_button_addon.js create mode 100644 browser/components/customizableui/test/browser_973932_addonbar_currentset.js create mode 100644 browser/components/customizableui/test/browser_975719_customtoolbars_behaviour.js create mode 100644 browser/components/customizableui/test/browser_976792_insertNodeInWindow.js create mode 100644 browser/components/customizableui/test/browser_978084_dragEnd_after_move.js create mode 100644 browser/components/customizableui/test/browser_980155_add_overflow_toolbar.js create mode 100644 browser/components/customizableui/test/browser_981305_separator_insertion.js create mode 100644 browser/components/customizableui/test/browser_981418-widget-onbeforecreated-handler.js create mode 100644 browser/components/customizableui/test/browser_982656_restore_defaults_builtin_widgets.js create mode 100644 browser/components/customizableui/test/browser_984455_bookmarks_items_reparenting.js create mode 100644 browser/components/customizableui/test/browser_985815_propagate_setToolbarVisibility.js create mode 100644 browser/components/customizableui/test/browser_987177_destroyWidget_xul.js create mode 100644 browser/components/customizableui/test/browser_987177_xul_wrapper_updating.js create mode 100755 browser/components/customizableui/test/browser_987185_syncButton.js create mode 100644 browser/components/customizableui/test/browser_987492_window_api.js create mode 100644 browser/components/customizableui/test/browser_987640_charEncoding.js create mode 100644 browser/components/customizableui/test/browser_988072_sidebar_events.js create mode 100644 browser/components/customizableui/test/browser_989338_saved_placements_not_resaved.js create mode 100644 browser/components/customizableui/test/browser_989751_subviewbutton_class.js create mode 100644 browser/components/customizableui/test/browser_992747_toggle_noncustomizable_toolbar.js create mode 100644 browser/components/customizableui/test/browser_993322_widget_notoolbar.js create mode 100644 browser/components/customizableui/test/browser_995164_registerArea_during_customize_mode.js create mode 100644 browser/components/customizableui/test/browser_996364_registerArea_different_properties.js create mode 100644 browser/components/customizableui/test/browser_996635_remove_non_widgets.js create mode 100644 browser/components/customizableui/test/browser_bootstrapped_custom_toolbar.js create mode 100644 browser/components/customizableui/test/browser_check_tooltips_in_navbar.js create mode 100644 browser/components/customizableui/test/browser_customizemode_contextmenu_menubuttonstate.js create mode 100644 browser/components/customizableui/test/browser_panel_toggle.js create mode 100644 browser/components/customizableui/test/browser_switch_to_customize_mode.js create mode 100644 browser/components/customizableui/test/head.js create mode 100644 browser/components/customizableui/test/support/feeds_test_page.html create mode 100644 browser/components/customizableui/test/support/test-feed.xml create mode 100644 browser/components/customizableui/test/support/test_967000_charEncoding_page.html create mode 100644 browser/components/dirprovider/DirectoryProvider.cpp create mode 100644 browser/components/dirprovider/DirectoryProvider.h create mode 100644 browser/components/dirprovider/moz.build create mode 100644 browser/components/dirprovider/tests/unit/.eslintrc.js create mode 100644 browser/components/distribution.js create mode 100644 browser/components/downloads/DownloadsCommon.jsm create mode 100644 browser/components/downloads/DownloadsTaskbar.jsm create mode 100644 browser/components/downloads/DownloadsViewUI.jsm create mode 100644 browser/components/downloads/content/allDownloadsViewOverlay.js create mode 100644 browser/components/downloads/content/allDownloadsViewOverlay.xul create mode 100644 browser/components/downloads/content/contentAreaDownloadsView.css create mode 100644 browser/components/downloads/content/contentAreaDownloadsView.js create mode 100644 browser/components/downloads/content/contentAreaDownloadsView.xul create mode 100644 browser/components/downloads/content/download.xml create mode 100644 browser/components/downloads/content/downloads.css create mode 100644 browser/components/downloads/content/downloads.js create mode 100644 browser/components/downloads/content/downloadsOverlay.xul create mode 100644 browser/components/downloads/content/indicator.js create mode 100644 browser/components/downloads/content/indicatorOverlay.xul create mode 100644 browser/components/downloads/jar.mn create mode 100644 browser/components/downloads/moz.build create mode 100644 browser/components/downloads/test/browser/.eslintrc.js create mode 100644 browser/components/downloads/test/browser/browser.ini create mode 100644 browser/components/downloads/test/browser/browser_basic_functionality.js create mode 100644 browser/components/downloads/test/browser/browser_confirm_unblock_download.js create mode 100644 browser/components/downloads/test/browser/browser_downloads_panel_block.js create mode 100644 browser/components/downloads/test/browser/browser_downloads_panel_footer.js create mode 100644 browser/components/downloads/test/browser/browser_downloads_panel_height.js create mode 100644 browser/components/downloads/test/browser/browser_first_download_panel.js create mode 100644 browser/components/downloads/test/browser/browser_iframe_gone_mid_download.js create mode 100644 browser/components/downloads/test/browser/browser_indicatorDrop.js create mode 100644 browser/components/downloads/test/browser/browser_libraryDrop.js create mode 100644 browser/components/downloads/test/browser/browser_overflow_anchor.js create mode 100644 browser/components/downloads/test/browser/head.js create mode 100644 browser/components/downloads/test/unit/.eslintrc.js create mode 100644 browser/components/downloads/test/unit/head.js create mode 100644 browser/components/downloads/test/unit/test_DownloadsCommon.js create mode 100644 browser/components/downloads/test/unit/xpcshell.ini create mode 100644 browser/components/extensions/.eslintrc.js create mode 100644 browser/components/extensions/ext-bookmarks.js create mode 100644 browser/components/extensions/ext-browserAction.js create mode 100644 browser/components/extensions/ext-c-contextMenus.js create mode 100644 browser/components/extensions/ext-c-omnibox.js create mode 100644 browser/components/extensions/ext-c-tabs.js create mode 100644 browser/components/extensions/ext-commands.js create mode 100644 browser/components/extensions/ext-contextMenus.js create mode 100644 browser/components/extensions/ext-desktop-runtime.js create mode 100644 browser/components/extensions/ext-history.js create mode 100644 browser/components/extensions/ext-omnibox.js create mode 100644 browser/components/extensions/ext-pageAction.js create mode 100644 browser/components/extensions/ext-sessions.js create mode 100644 browser/components/extensions/ext-tabs.js create mode 100644 browser/components/extensions/ext-utils.js create mode 100644 browser/components/extensions/ext-windows.js create mode 100644 browser/components/extensions/extension-mac-panel.css create mode 100644 browser/components/extensions/extension-mac.css create mode 100644 browser/components/extensions/extension-win-panel.css create mode 100644 browser/components/extensions/extension.css create mode 100644 browser/components/extensions/extension.svg create mode 100644 browser/components/extensions/extensions-browser.manifest create mode 100644 browser/components/extensions/jar.mn create mode 100644 browser/components/extensions/moz.build create mode 100644 browser/components/extensions/schemas/LICENSE create mode 100644 browser/components/extensions/schemas/bookmarks.json create mode 100644 browser/components/extensions/schemas/browser_action.json create mode 100644 browser/components/extensions/schemas/commands.json create mode 100644 browser/components/extensions/schemas/context_menus.json create mode 100644 browser/components/extensions/schemas/context_menus_internal.json create mode 100644 browser/components/extensions/schemas/history.json create mode 100644 browser/components/extensions/schemas/jar.mn create mode 100644 browser/components/extensions/schemas/moz.build create mode 100644 browser/components/extensions/schemas/omnibox.json create mode 100644 browser/components/extensions/schemas/page_action.json create mode 100644 browser/components/extensions/schemas/sessions.json create mode 100644 browser/components/extensions/schemas/tabs.json create mode 100644 browser/components/extensions/schemas/windows.json create mode 100644 browser/components/extensions/test/browser/.eslintrc.js create mode 100644 browser/components/extensions/test/browser/browser.ini create mode 100644 browser/components/extensions/test/browser/browser_ext_browserAction_context.js create mode 100644 browser/components/extensions/test/browser/browser_ext_browserAction_disabled.js create mode 100644 browser/components/extensions/test/browser/browser_ext_browserAction_pageAction_icon.js create mode 100644 browser/components/extensions/test/browser/browser_ext_browserAction_pageAction_icon_permissions.js create mode 100644 browser/components/extensions/test/browser/browser_ext_browserAction_popup.js create mode 100644 browser/components/extensions/test/browser/browser_ext_browserAction_popup_resize.js create mode 100644 browser/components/extensions/test/browser/browser_ext_browserAction_simple.js create mode 100644 browser/components/extensions/test/browser/browser_ext_commands_execute_browser_action.js create mode 100644 browser/components/extensions/test/browser/browser_ext_commands_execute_page_action.js create mode 100644 browser/components/extensions/test/browser/browser_ext_commands_getAll.js create mode 100644 browser/components/extensions/test/browser/browser_ext_commands_onCommand.js create mode 100644 browser/components/extensions/test/browser/browser_ext_contentscript_connect.js create mode 100644 browser/components/extensions/test/browser/browser_ext_contextMenus.js create mode 100644 browser/components/extensions/test/browser/browser_ext_contextMenus_checkboxes.js create mode 100644 browser/components/extensions/test/browser/browser_ext_contextMenus_icons.js create mode 100644 browser/components/extensions/test/browser/browser_ext_contextMenus_onclick.js create mode 100644 browser/components/extensions/test/browser/browser_ext_contextMenus_radioGroups.js create mode 100644 browser/components/extensions/test/browser/browser_ext_contextMenus_uninstall.js create mode 100644 browser/components/extensions/test/browser/browser_ext_contextMenus_urlPatterns.js create mode 100644 browser/components/extensions/test/browser/browser_ext_currentWindow.js create mode 100644 browser/components/extensions/test/browser/browser_ext_getViews.js create mode 100644 browser/components/extensions/test/browser/browser_ext_incognito_popup.js create mode 100644 browser/components/extensions/test/browser/browser_ext_incognito_views.js create mode 100644 browser/components/extensions/test/browser/browser_ext_lastError.js create mode 100644 browser/components/extensions/test/browser/browser_ext_legacy_extension_context_contentscript.js create mode 100644 browser/components/extensions/test/browser/browser_ext_omnibox.js create mode 100644 browser/components/extensions/test/browser/browser_ext_optionsPage_privileges.js create mode 100644 browser/components/extensions/test/browser/browser_ext_pageAction_context.js create mode 100644 browser/components/extensions/test/browser/browser_ext_pageAction_popup.js create mode 100644 browser/components/extensions/test/browser/browser_ext_pageAction_popup_resize.js create mode 100644 browser/components/extensions/test/browser/browser_ext_pageAction_simple.js create mode 100644 browser/components/extensions/test/browser/browser_ext_pageAction_title.js create mode 100644 browser/components/extensions/test/browser/browser_ext_popup_api_injection.js create mode 100644 browser/components/extensions/test/browser/browser_ext_popup_background.js create mode 100644 browser/components/extensions/test/browser/browser_ext_popup_corners.js create mode 100644 browser/components/extensions/test/browser/browser_ext_popup_sendMessage.js create mode 100644 browser/components/extensions/test/browser/browser_ext_popup_shutdown.js create mode 100644 browser/components/extensions/test/browser/browser_ext_runtime_openOptionsPage.js create mode 100644 browser/components/extensions/test/browser/browser_ext_runtime_openOptionsPage_uninstall.js create mode 100644 browser/components/extensions/test/browser/browser_ext_runtime_setUninstallURL.js create mode 100644 browser/components/extensions/test/browser/browser_ext_sessions_getRecentlyClosed.js create mode 100644 browser/components/extensions/test/browser/browser_ext_sessions_getRecentlyClosed_private.js create mode 100644 browser/components/extensions/test/browser/browser_ext_sessions_getRecentlyClosed_tabs.js create mode 100644 browser/components/extensions/test/browser/browser_ext_sessions_restore.js create mode 100644 browser/components/extensions/test/browser/browser_ext_simple.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tab_runtimeConnect.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_audio.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_captureVisibleTab.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_cookieStoreId.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_create.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_create_invalid_url.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_detectLanguage.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_duplicate.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_events.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_executeScript.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_executeScript_bad.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_executeScript_good.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_executeScript_no_create.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_executeScript_runAt.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_getCurrent.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_insertCSS.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_move.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_move_window.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_move_window_multiple.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_move_window_pinned.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_onHighlighted.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_onUpdated.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_query.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_reload.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_reload_bypass_cache.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_removeCSS.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_sendMessage.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_update.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_update_url.js create mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_zoom.js create mode 100644 browser/components/extensions/test/browser/browser_ext_topwindowid.js create mode 100644 browser/components/extensions/test/browser/browser_ext_webNavigation_frameId0.js create mode 100644 browser/components/extensions/test/browser/browser_ext_webNavigation_getFrames.js create mode 100644 browser/components/extensions/test/browser/browser_ext_webNavigation_urlbar_transitions.js create mode 100644 browser/components/extensions/test/browser/browser_ext_webRequest.js create mode 100644 browser/components/extensions/test/browser/browser_ext_windows.js create mode 100644 browser/components/extensions/test/browser/browser_ext_windows_allowScriptsToClose.js create mode 100644 browser/components/extensions/test/browser/browser_ext_windows_create.js create mode 100644 browser/components/extensions/test/browser/browser_ext_windows_create_params.js create mode 100644 browser/components/extensions/test/browser/browser_ext_windows_create_tabId.js create mode 100644 browser/components/extensions/test/browser/browser_ext_windows_create_url.js create mode 100644 browser/components/extensions/test/browser/browser_ext_windows_events.js create mode 100644 browser/components/extensions/test/browser/browser_ext_windows_size.js create mode 100644 browser/components/extensions/test/browser/browser_ext_windows_update.js create mode 100644 browser/components/extensions/test/browser/context.html create mode 100644 browser/components/extensions/test/browser/context_tabs_onUpdated_iframe.html create mode 100644 browser/components/extensions/test/browser/context_tabs_onUpdated_page.html create mode 100644 browser/components/extensions/test/browser/ctxmenu-image.png create mode 100644 browser/components/extensions/test/browser/file_bypass_cache.sjs create mode 100644 browser/components/extensions/test/browser/file_dummy.html create mode 100644 browser/components/extensions/test/browser/file_iframe_document.html create mode 100644 browser/components/extensions/test/browser/file_iframe_document.sjs create mode 100644 browser/components/extensions/test/browser/file_language_fr_en.html create mode 100644 browser/components/extensions/test/browser/file_language_ja.html create mode 100644 browser/components/extensions/test/browser/file_language_tlh.html create mode 100644 browser/components/extensions/test/browser/file_popup_api_injection_a.html create mode 100644 browser/components/extensions/test/browser/file_popup_api_injection_b.html create mode 100644 browser/components/extensions/test/browser/head.js create mode 100644 browser/components/extensions/test/browser/head_pageAction.js create mode 100644 browser/components/extensions/test/browser/head_sessions.js create mode 100644 browser/components/extensions/test/browser/searchSuggestionEngine.sjs create mode 100644 browser/components/extensions/test/browser/searchSuggestionEngine.xml create mode 100644 browser/components/extensions/test/mochitest/mochitest.ini create mode 100644 browser/components/extensions/test/mochitest/test_ext_all_apis.html create mode 100644 browser/components/extensions/test/xpcshell/.eslintrc.js create mode 100644 browser/components/extensions/test/xpcshell/head.js create mode 100644 browser/components/extensions/test/xpcshell/test_ext_bookmarks.js create mode 100644 browser/components/extensions/test/xpcshell/test_ext_history.js create mode 100644 browser/components/extensions/test/xpcshell/test_ext_manifest_commands.js create mode 100644 browser/components/extensions/test/xpcshell/test_ext_manifest_omnibox.js create mode 100644 browser/components/extensions/test/xpcshell/test_ext_manifest_permissions.js create mode 100644 browser/components/extensions/test/xpcshell/xpcshell.ini create mode 100644 browser/components/feeds/BrowserFeeds.manifest create mode 100644 browser/components/feeds/FeedConverter.js create mode 100644 browser/components/feeds/FeedWriter.js create mode 100644 browser/components/feeds/WebContentConverter.js create mode 100644 browser/components/feeds/content/subscribe.js create mode 100644 browser/components/feeds/content/subscribe.xhtml create mode 100644 browser/components/feeds/jar.mn create mode 100644 browser/components/feeds/moz.build create mode 100644 browser/components/feeds/nsFeedSniffer.cpp create mode 100644 browser/components/feeds/nsFeedSniffer.h create mode 100644 browser/components/feeds/nsIFeedResultService.idl create mode 100644 browser/components/feeds/nsIWebContentConverterRegistrar.idl create mode 100644 browser/components/feeds/test/.eslintrc.js create mode 100644 browser/components/feeds/test/bug368464-data.xml create mode 100644 browser/components/feeds/test/bug408328-data.xml create mode 100644 browser/components/feeds/test/bug436801-data.xml create mode 100644 browser/components/feeds/test/bug494328-data.xml create mode 100644 browser/components/feeds/test/bug589543-data.xml create mode 100644 browser/components/feeds/test/chrome/.eslintrc.js create mode 100644 browser/components/feeds/test/chrome/chrome.ini create mode 100644 browser/components/feeds/test/chrome/sample_feed.atom create mode 100644 browser/components/feeds/test/chrome/test_423060.xul create mode 100644 browser/components/feeds/test/chrome/test_bug368464.html create mode 100644 browser/components/feeds/test/chrome/test_bug408328.html create mode 100644 browser/components/feeds/test/chrome/test_maxSniffing.html create mode 100644 browser/components/feeds/test/mochitest.ini create mode 100644 browser/components/feeds/test/test_bug436801.html create mode 100644 browser/components/feeds/test/test_bug494328.html create mode 100644 browser/components/feeds/test/test_bug589543.html create mode 100644 browser/components/feeds/test/test_registerHandler.html create mode 100644 browser/components/feeds/test/unit/.eslintrc.js create mode 100644 browser/components/feeds/test/unit/head_feeds.js create mode 100644 browser/components/feeds/test/unit/test_355473.js create mode 100644 browser/components/feeds/test/unit/test_758990.js create mode 100644 browser/components/feeds/test/unit/xpcshell.ini create mode 100644 browser/components/feeds/test/valid-feed.xml create mode 100644 browser/components/feeds/test/valid-unsniffable-feed.xml create mode 100644 browser/components/migration/.eslintrc.js create mode 100644 browser/components/migration/360seProfileMigrator.js create mode 100644 browser/components/migration/AutoMigrate.jsm create mode 100644 browser/components/migration/BrowserProfileMigrators.manifest create mode 100644 browser/components/migration/ChromeProfileMigrator.js create mode 100644 browser/components/migration/ESEDBReader.jsm create mode 100644 browser/components/migration/EdgeProfileMigrator.js create mode 100644 browser/components/migration/FirefoxProfileMigrator.js create mode 100644 browser/components/migration/IEProfileMigrator.js create mode 100644 browser/components/migration/MSMigrationUtils.jsm create mode 100644 browser/components/migration/MigrationUtils.jsm create mode 100644 browser/components/migration/ProfileMigrator.js create mode 100644 browser/components/migration/SafariProfileMigrator.js create mode 100644 browser/components/migration/content/aboutWelcomeBack.xhtml create mode 100644 browser/components/migration/content/extra-migration-strings.properties create mode 100644 browser/components/migration/content/migration.js create mode 100644 browser/components/migration/content/migration.xul create mode 100644 browser/components/migration/jar.mn create mode 100644 browser/components/migration/moz.build create mode 100644 browser/components/migration/nsIBrowserProfileMigrator.idl create mode 100644 browser/components/migration/nsIEHistoryEnumerator.cpp create mode 100644 browser/components/migration/nsIEHistoryEnumerator.h create mode 100644 browser/components/migration/nsWindowsMigrationUtils.h create mode 100644 browser/components/migration/tests/browser/.eslintrc.js create mode 100644 browser/components/migration/tests/browser/browser.ini create mode 100644 browser/components/migration/tests/browser/browser_undo_notification.js create mode 100644 browser/components/migration/tests/browser/browser_undo_notification_multiple_dismissal.js create mode 100644 browser/components/migration/tests/browser/browser_undo_notification_wording.js create mode 100644 browser/components/migration/tests/marionette/manifest.ini create mode 100644 browser/components/migration/tests/marionette/test_refresh_firefox.py create mode 100644 browser/components/migration/tests/unit/.eslintrc.js create mode 100644 browser/components/migration/tests/unit/AppData/Local/Google/Chrome/User Data/Default/Login Data create mode 100644 browser/components/migration/tests/unit/Library/Application Support/Google/Chrome/Default/Cookies create mode 100644 browser/components/migration/tests/unit/Library/Application Support/Google/Chrome/Local State create mode 100644 browser/components/migration/tests/unit/Library/Safari/Bookmarks.plist create mode 100644 browser/components/migration/tests/unit/head_migration.js create mode 100644 browser/components/migration/tests/unit/test_Chrome_cookies.js create mode 100644 browser/components/migration/tests/unit/test_Chrome_passwords.js create mode 100644 browser/components/migration/tests/unit/test_Edge_availability.js create mode 100644 browser/components/migration/tests/unit/test_Edge_db_migration.js create mode 100644 browser/components/migration/tests/unit/test_IE7_passwords.js create mode 100644 browser/components/migration/tests/unit/test_IE_bookmarks.js create mode 100644 browser/components/migration/tests/unit/test_IE_cookies.js create mode 100644 browser/components/migration/tests/unit/test_Safari_bookmarks.js create mode 100644 browser/components/migration/tests/unit/test_automigration.js create mode 100644 browser/components/migration/tests/unit/test_fx_telemetry.js create mode 100644 browser/components/migration/tests/unit/xpcshell.ini create mode 100644 browser/components/moz.build create mode 100644 browser/components/newtab/NewTabComponents.manifest create mode 100644 browser/components/newtab/NewTabMessages.jsm create mode 100644 browser/components/newtab/NewTabPrefsProvider.jsm create mode 100644 browser/components/newtab/NewTabRemoteResources.jsm create mode 100644 browser/components/newtab/NewTabSearchProvider.jsm create mode 100644 browser/components/newtab/NewTabURL.jsm create mode 100644 browser/components/newtab/NewTabWebChannel.jsm create mode 100644 browser/components/newtab/PlacesProvider.jsm create mode 100644 browser/components/newtab/PreviewProvider.jsm create mode 100644 browser/components/newtab/aboutNewTabService.js create mode 100644 browser/components/newtab/moz.build create mode 100644 browser/components/newtab/nsIAboutNewTabService.idl create mode 100644 browser/components/newtab/tests/browser/.eslintrc.js create mode 100644 browser/components/newtab/tests/browser/blue_page.html create mode 100644 browser/components/newtab/tests/browser/browser.ini create mode 100644 browser/components/newtab/tests/browser/browser_PreviewProvider.js create mode 100644 browser/components/newtab/tests/browser/browser_newtab_overrides.js create mode 100644 browser/components/newtab/tests/browser/browser_newtabmessages.js create mode 100644 browser/components/newtab/tests/browser/browser_newtabwebchannel.js create mode 100644 browser/components/newtab/tests/browser/browser_remotenewtab_pageloads.js create mode 100644 browser/components/newtab/tests/browser/dummy_page.html create mode 100644 browser/components/newtab/tests/browser/newtabmessages_places.html create mode 100644 browser/components/newtab/tests/browser/newtabmessages_prefs.html create mode 100644 browser/components/newtab/tests/browser/newtabmessages_preview.html create mode 100644 browser/components/newtab/tests/browser/newtabmessages_search.html create mode 100644 browser/components/newtab/tests/browser/newtabwebchannel_basic.html create mode 100644 browser/components/newtab/tests/xpcshell/.eslintrc.js create mode 100644 browser/components/newtab/tests/xpcshell/test_AboutNewTabService.js create mode 100644 browser/components/newtab/tests/xpcshell/test_NewTabPrefsProvider.js create mode 100644 browser/components/newtab/tests/xpcshell/test_NewTabSearchProvider.js create mode 100644 browser/components/newtab/tests/xpcshell/test_NewTabURL.js create mode 100644 browser/components/newtab/tests/xpcshell/test_PlacesProvider.js create mode 100644 browser/components/newtab/tests/xpcshell/xpcshell.ini create mode 100644 browser/components/nsBrowserContentHandler.js create mode 100644 browser/components/nsBrowserGlue.js create mode 100644 browser/components/nsIBrowserGlue.idl create mode 100644 browser/components/nsIBrowserHandler.idl create mode 100644 browser/components/originattributes/moz.build create mode 100644 browser/components/originattributes/test/browser/.eslintrc.js create mode 100644 browser/components/originattributes/test/browser/browser.ini create mode 100644 browser/components/originattributes/test/browser/browser_blobURLIsolation.js create mode 100644 browser/components/originattributes/test/browser/browser_broadcastChannel.js create mode 100644 browser/components/originattributes/test/browser/browser_cache.js create mode 100644 browser/components/originattributes/test/browser/browser_clientAuth.js create mode 100644 browser/components/originattributes/test/browser/browser_cookieIsolation.js create mode 100644 browser/components/originattributes/test/browser/browser_favicon_firstParty.js create mode 100644 browser/components/originattributes/test/browser/browser_favicon_userContextId.js create mode 100644 browser/components/originattributes/test/browser/browser_firstPartyIsolation.js create mode 100644 browser/components/originattributes/test/browser/browser_httpauth.js create mode 100644 browser/components/originattributes/test/browser/browser_imageCacheIsolation.js create mode 100644 browser/components/originattributes/test/browser/browser_localStorageIsolation.js create mode 100644 browser/components/originattributes/test/browser/browser_sharedworker.js create mode 100644 browser/components/originattributes/test/browser/dummy.html create mode 100644 browser/components/originattributes/test/browser/file_broadcastChannel.html create mode 100644 browser/components/originattributes/test/browser/file_broadcastChanneliFrame.html create mode 100644 browser/components/originattributes/test/browser/file_cache.html create mode 100644 browser/components/originattributes/test/browser/file_favicon.html create mode 100644 browser/components/originattributes/test/browser/file_favicon.png create mode 100644 browser/components/originattributes/test/browser/file_favicon.png^headers^ create mode 100644 browser/components/originattributes/test/browser/file_favicon_cache.html create mode 100644 browser/components/originattributes/test/browser/file_favicon_cache.png create mode 100644 browser/components/originattributes/test/browser/file_favicon_thirdParty.html create mode 100644 browser/components/originattributes/test/browser/file_firstPartyBasic.html create mode 100644 browser/components/originattributes/test/browser/file_sharedworker.html create mode 100644 browser/components/originattributes/test/browser/file_sharedworker.js create mode 100644 browser/components/originattributes/test/browser/file_thirdPartyChild.audio.ogg create mode 100644 browser/components/originattributes/test/browser/file_thirdPartyChild.embed.png create mode 100644 browser/components/originattributes/test/browser/file_thirdPartyChild.fetch.html create mode 100644 browser/components/originattributes/test/browser/file_thirdPartyChild.iframe.html create mode 100644 browser/components/originattributes/test/browser/file_thirdPartyChild.img.png create mode 100644 browser/components/originattributes/test/browser/file_thirdPartyChild.import.js create mode 100644 browser/components/originattributes/test/browser/file_thirdPartyChild.link.css create mode 100644 browser/components/originattributes/test/browser/file_thirdPartyChild.object.png create mode 100644 browser/components/originattributes/test/browser/file_thirdPartyChild.request.html create mode 100644 browser/components/originattributes/test/browser/file_thirdPartyChild.script.js create mode 100644 browser/components/originattributes/test/browser/file_thirdPartyChild.sharedworker.js create mode 100644 browser/components/originattributes/test/browser/file_thirdPartyChild.track.vtt create mode 100644 browser/components/originattributes/test/browser/file_thirdPartyChild.video.ogv create mode 100644 browser/components/originattributes/test/browser/file_thirdPartyChild.worker.fetch.html create mode 100644 browser/components/originattributes/test/browser/file_thirdPartyChild.worker.js create mode 100644 browser/components/originattributes/test/browser/file_thirdPartyChild.worker.request.html create mode 100644 browser/components/originattributes/test/browser/file_thirdPartyChild.worker.xhr.html create mode 100644 browser/components/originattributes/test/browser/file_thirdPartyChild.xhr.html create mode 100644 browser/components/originattributes/test/browser/head.js create mode 100644 browser/components/originattributes/test/browser/test.html create mode 100644 browser/components/originattributes/test/browser/test.js create mode 100644 browser/components/originattributes/test/browser/test.js^headers^ create mode 100644 browser/components/originattributes/test/browser/test2.html create mode 100644 browser/components/originattributes/test/browser/test2.js create mode 100644 browser/components/originattributes/test/browser/test2.js^headers^ create mode 100644 browser/components/originattributes/test/browser/test_firstParty.html create mode 100644 browser/components/originattributes/test/browser/test_firstParty_cookie.html create mode 100644 browser/components/originattributes/test/browser/test_firstParty_html_redirect.html create mode 100644 browser/components/originattributes/test/browser/test_firstParty_http_redirect.html create mode 100644 browser/components/originattributes/test/browser/test_firstParty_http_redirect.html^headers^ create mode 100644 browser/components/originattributes/test/browser/test_firstParty_iframe_http_redirect.html create mode 100644 browser/components/originattributes/test/browser/test_firstParty_postMessage.html create mode 100644 browser/components/originattributes/test/browser/window.html create mode 100644 browser/components/originattributes/test/browser/worker_blobify.js create mode 100644 browser/components/originattributes/test/browser/worker_deblobify.js create mode 100644 browser/components/originattributes/test/mochitest/file_empty.html create mode 100644 browser/components/originattributes/test/mochitest/mochitest.ini create mode 100644 browser/components/originattributes/test/mochitest/test_permissions_api.html create mode 100644 browser/components/places/PlacesUIUtils.jsm create mode 100644 browser/components/places/content/bookmarkProperties.js create mode 100644 browser/components/places/content/bookmarkProperties.xul create mode 100644 browser/components/places/content/bookmarksPanel.js create mode 100644 browser/components/places/content/bookmarksPanel.xul create mode 100644 browser/components/places/content/browserPlacesViews.js create mode 100644 browser/components/places/content/controller.js create mode 100644 browser/components/places/content/downloadsViewOverlay.xul create mode 100644 browser/components/places/content/editBookmarkOverlay.js create mode 100644 browser/components/places/content/editBookmarkOverlay.xul create mode 100644 browser/components/places/content/history-panel.js create mode 100644 browser/components/places/content/history-panel.xul create mode 100644 browser/components/places/content/menu.xml create mode 100644 browser/components/places/content/moveBookmarks.js create mode 100644 browser/components/places/content/moveBookmarks.xul create mode 100644 browser/components/places/content/organizer.css create mode 100644 browser/components/places/content/places.css create mode 100644 browser/components/places/content/places.js create mode 100644 browser/components/places/content/places.xul create mode 100644 browser/components/places/content/placesOverlay.xul create mode 100644 browser/components/places/content/sidebarUtils.js create mode 100644 browser/components/places/content/tree.xml create mode 100644 browser/components/places/content/treeView.js create mode 100644 browser/components/places/jar.mn create mode 100644 browser/components/places/moz.build create mode 100644 browser/components/places/tests/browser/.eslintrc.js create mode 100644 browser/components/places/tests/browser/bookmark_dummy_1.html create mode 100644 browser/components/places/tests/browser/bookmark_dummy_2.html create mode 100644 browser/components/places/tests/browser/browser.ini create mode 100644 browser/components/places/tests/browser/browser_0_library_left_pane_migration.js create mode 100644 browser/components/places/tests/browser/browser_410196_paste_into_tags.js create mode 100644 browser/components/places/tests/browser/browser_416459_cut.js create mode 100644 browser/components/places/tests/browser/browser_423515.js create mode 100644 browser/components/places/tests/browser/browser_425884.js create mode 100644 browser/components/places/tests/browser/browser_435851_copy_query.js create mode 100644 browser/components/places/tests/browser/browser_475045.js create mode 100644 browser/components/places/tests/browser/browser_555547.js create mode 100644 browser/components/places/tests/browser/browser_bookmarkProperties_addFolderDefaultButton.js create mode 100644 browser/components/places/tests/browser/browser_bookmarkProperties_addKeywordForThisSearch.js create mode 100644 browser/components/places/tests/browser/browser_bookmarkProperties_addLivemark.js create mode 100644 browser/components/places/tests/browser/browser_bookmarkProperties_editTagContainer.js create mode 100644 browser/components/places/tests/browser/browser_bookmarkProperties_readOnlyRoot.js create mode 100644 browser/components/places/tests/browser/browser_bookmark_all_tabs.js create mode 100644 browser/components/places/tests/browser/browser_bookmarklet_windowOpen.js create mode 100644 browser/components/places/tests/browser/browser_bookmarksProperties.js create mode 100644 browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js create mode 100644 browser/components/places/tests/browser/browser_forgetthissite_single.js create mode 100644 browser/components/places/tests/browser/browser_history_sidebar_search.js create mode 100644 browser/components/places/tests/browser/browser_library_batch_delete.js create mode 100644 browser/components/places/tests/browser/browser_library_commands.js create mode 100644 browser/components/places/tests/browser/browser_library_downloads.js create mode 100644 browser/components/places/tests/browser/browser_library_infoBox.js create mode 100644 browser/components/places/tests/browser/browser_library_left_pane_fixnames.js create mode 100644 browser/components/places/tests/browser/browser_library_left_pane_select_hierarchy.js create mode 100644 browser/components/places/tests/browser/browser_library_middleclick.js create mode 100644 browser/components/places/tests/browser/browser_library_openFlatContainer.js create mode 100644 browser/components/places/tests/browser/browser_library_open_leak.js create mode 100644 browser/components/places/tests/browser/browser_library_panel_leak.js create mode 100644 browser/components/places/tests/browser/browser_library_search.js create mode 100644 browser/components/places/tests/browser/browser_library_views_liveupdate.js create mode 100644 browser/components/places/tests/browser/browser_markPageAsFollowedLink.js create mode 100644 browser/components/places/tests/browser/browser_sidebarpanels_click.js create mode 100644 browser/components/places/tests/browser/browser_sort_in_library.js create mode 100644 browser/components/places/tests/browser/browser_toolbarbutton_menu_context.js create mode 100644 browser/components/places/tests/browser/browser_views_liveupdate.js create mode 100644 browser/components/places/tests/browser/frameLeft.html create mode 100644 browser/components/places/tests/browser/frameRight.html create mode 100644 browser/components/places/tests/browser/framedPage.html create mode 100644 browser/components/places/tests/browser/head.js create mode 100644 browser/components/places/tests/browser/keyword_form.html create mode 100644 browser/components/places/tests/browser/pageopeningwindow.html create mode 100644 browser/components/places/tests/browser/sidebarpanels_click_test_page.html create mode 100644 browser/components/places/tests/chrome/.eslintrc.js create mode 100644 browser/components/places/tests/chrome/chrome.ini create mode 100644 browser/components/places/tests/chrome/head.js create mode 100644 browser/components/places/tests/chrome/test_0_bug510634.xul create mode 100644 browser/components/places/tests/chrome/test_0_multiple_left_pane.xul create mode 100644 browser/components/places/tests/chrome/test_bug1163447_selectItems_through_shortcut.xul create mode 100644 browser/components/places/tests/chrome/test_bug427633_no_newfolder_if_noip.xul create mode 100644 browser/components/places/tests/chrome/test_bug485100-change-case-loses-tag.xul create mode 100644 browser/components/places/tests/chrome/test_bug549192.xul create mode 100644 browser/components/places/tests/chrome/test_bug549491.xul create mode 100644 browser/components/places/tests/chrome/test_bug631374_tags_selector_scroll.xul create mode 100644 browser/components/places/tests/chrome/test_editBookmarkOverlay_keywords.xul create mode 100644 browser/components/places/tests/chrome/test_editBookmarkOverlay_tags_liveUpdate.xul create mode 100644 browser/components/places/tests/chrome/test_selectItems_on_nested_tree.xul create mode 100644 browser/components/places/tests/chrome/test_treeview_date.xul create mode 100644 browser/components/places/tests/unit/.eslintrc.js create mode 100644 browser/components/places/tests/unit/bookmarks.glue.html create mode 100644 browser/components/places/tests/unit/bookmarks.glue.json create mode 100644 browser/components/places/tests/unit/corruptDB.sqlite create mode 100644 browser/components/places/tests/unit/distribution.ini create mode 100644 browser/components/places/tests/unit/head_bookmarks.js create mode 100644 browser/components/places/tests/unit/test_421483.js create mode 100644 browser/components/places/tests/unit/test_PUIU_makeTransaction.js create mode 100644 browser/components/places/tests/unit/test_browserGlue_bookmarkshtml.js create mode 100644 browser/components/places/tests/unit/test_browserGlue_corrupt.js create mode 100644 browser/components/places/tests/unit/test_browserGlue_corrupt_nobackup.js create mode 100644 browser/components/places/tests/unit/test_browserGlue_corrupt_nobackup_default.js create mode 100644 browser/components/places/tests/unit/test_browserGlue_distribution.js create mode 100644 browser/components/places/tests/unit/test_browserGlue_migrate.js create mode 100644 browser/components/places/tests/unit/test_browserGlue_prefs.js create mode 100644 browser/components/places/tests/unit/test_browserGlue_restore.js create mode 100644 browser/components/places/tests/unit/test_browserGlue_smartBookmarks.js create mode 100644 browser/components/places/tests/unit/test_browserGlue_urlbar_defaultbehavior_migration.js create mode 100644 browser/components/places/tests/unit/test_clearHistory_shutdown.js create mode 100644 browser/components/places/tests/unit/test_leftpane_corruption_handling.js create mode 100644 browser/components/places/tests/unit/xpcshell.ini create mode 100644 browser/components/preferences/applicationManager.js create mode 100644 browser/components/preferences/applicationManager.xul create mode 100644 browser/components/preferences/blocklists.js create mode 100644 browser/components/preferences/blocklists.xul create mode 100644 browser/components/preferences/colors.xul create mode 100644 browser/components/preferences/connection.js create mode 100644 browser/components/preferences/connection.xul create mode 100644 browser/components/preferences/containers.js create mode 100644 browser/components/preferences/containers.xul create mode 100644 browser/components/preferences/cookies.js create mode 100644 browser/components/preferences/cookies.xul create mode 100644 browser/components/preferences/donottrack.xul create mode 100644 browser/components/preferences/fonts.js create mode 100644 browser/components/preferences/fonts.xul create mode 100644 browser/components/preferences/handlers.css create mode 100644 browser/components/preferences/handlers.xml create mode 100644 browser/components/preferences/in-content/advanced.js create mode 100644 browser/components/preferences/in-content/advanced.xul create mode 100644 browser/components/preferences/in-content/applications.js create mode 100644 browser/components/preferences/in-content/applications.xul create mode 100644 browser/components/preferences/in-content/containers.js create mode 100644 browser/components/preferences/in-content/containers.xul create mode 100644 browser/components/preferences/in-content/content.js create mode 100644 browser/components/preferences/in-content/content.xul create mode 100644 browser/components/preferences/in-content/jar.mn create mode 100644 browser/components/preferences/in-content/main.js create mode 100644 browser/components/preferences/in-content/main.xul create mode 100644 browser/components/preferences/in-content/moz.build create mode 100644 browser/components/preferences/in-content/preferences.js create mode 100644 browser/components/preferences/in-content/preferences.xul create mode 100644 browser/components/preferences/in-content/privacy.js create mode 100644 browser/components/preferences/in-content/privacy.xul create mode 100644 browser/components/preferences/in-content/search.js create mode 100644 browser/components/preferences/in-content/search.xul create mode 100644 browser/components/preferences/in-content/security.js create mode 100644 browser/components/preferences/in-content/security.xul create mode 100644 browser/components/preferences/in-content/subdialogs.js create mode 100644 browser/components/preferences/in-content/sync.js create mode 100644 browser/components/preferences/in-content/sync.xul create mode 100644 browser/components/preferences/in-content/tests/.eslintrc.js create mode 100644 browser/components/preferences/in-content/tests/browser.ini create mode 100644 browser/components/preferences/in-content/tests/browser_advanced_update.js create mode 100644 browser/components/preferences/in-content/tests/browser_basic_rebuild_fonts_test.js create mode 100644 browser/components/preferences/in-content/tests/browser_bug1018066_resetScrollPosition.js create mode 100644 browser/components/preferences/in-content/tests/browser_bug1020245_openPreferences_to_paneContent.js create mode 100644 browser/components/preferences/in-content/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.js create mode 100644 browser/components/preferences/in-content/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.xul create mode 100644 browser/components/preferences/in-content/tests/browser_bug410900.js create mode 100644 browser/components/preferences/in-content/tests/browser_bug705422.js create mode 100644 browser/components/preferences/in-content/tests/browser_bug731866.js create mode 100644 browser/components/preferences/in-content/tests/browser_bug795764_cachedisabled.js create mode 100644 browser/components/preferences/in-content/tests/browser_change_app_handler.js create mode 100644 browser/components/preferences/in-content/tests/browser_connection.js create mode 100644 browser/components/preferences/in-content/tests/browser_connection_bug388287.js create mode 100644 browser/components/preferences/in-content/tests/browser_cookies_exceptions.js create mode 100644 browser/components/preferences/in-content/tests/browser_defaultbrowser_alwayscheck.js create mode 100644 browser/components/preferences/in-content/tests/browser_healthreport.js create mode 100644 browser/components/preferences/in-content/tests/browser_homepages_filter_aboutpreferences.js create mode 100644 browser/components/preferences/in-content/tests/browser_notifications_do_not_disturb.js create mode 100644 browser/components/preferences/in-content/tests/browser_permissions_urlFieldHidden.js create mode 100644 browser/components/preferences/in-content/tests/browser_privacypane_1.js create mode 100644 browser/components/preferences/in-content/tests/browser_privacypane_3.js create mode 100644 browser/components/preferences/in-content/tests/browser_privacypane_4.js create mode 100644 browser/components/preferences/in-content/tests/browser_privacypane_5.js create mode 100644 browser/components/preferences/in-content/tests/browser_privacypane_8.js create mode 100644 browser/components/preferences/in-content/tests/browser_proxy_backup.js create mode 100644 browser/components/preferences/in-content/tests/browser_sanitizeOnShutdown_prefLocked.js create mode 100644 browser/components/preferences/in-content/tests/browser_searchsuggestions.js create mode 100644 browser/components/preferences/in-content/tests/browser_security.js create mode 100644 browser/components/preferences/in-content/tests/browser_subdialogs.js create mode 100644 browser/components/preferences/in-content/tests/browser_telemetry.js create mode 100644 browser/components/preferences/in-content/tests/head.js create mode 100644 browser/components/preferences/in-content/tests/privacypane_tests_perwindow.js create mode 100644 browser/components/preferences/in-content/tests/subdialog.xul create mode 100644 browser/components/preferences/in-content/tests/subdialog2.xul create mode 100644 browser/components/preferences/jar.mn create mode 100644 browser/components/preferences/languages.js create mode 100644 browser/components/preferences/languages.xul create mode 100644 browser/components/preferences/moz.build create mode 100644 browser/components/preferences/permissions.js create mode 100644 browser/components/preferences/permissions.xul create mode 100644 browser/components/preferences/sanitize.js create mode 100644 browser/components/preferences/sanitize.xul create mode 100644 browser/components/preferences/selectBookmark.js create mode 100644 browser/components/preferences/selectBookmark.xul create mode 100644 browser/components/preferences/translation.js create mode 100644 browser/components/preferences/translation.xul create mode 100644 browser/components/privatebrowsing/content/aboutPrivateBrowsing.css create mode 100644 browser/components/privatebrowsing/content/aboutPrivateBrowsing.js create mode 100644 browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml create mode 100644 browser/components/privatebrowsing/jar.mn create mode 100644 browser/components/privatebrowsing/moz.build create mode 100644 browser/components/privatebrowsing/test/browser/.eslintrc.js create mode 100644 browser/components/privatebrowsing/test/browser/browser.ini create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_DownloadLastDirWithCPS.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_aboutHomeButtonAfterWindowClose.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_aboutSessionRestore.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_blobUrl.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_cache.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_certexceptionsui.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_concurrent.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_concurrent_page.html create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_context_and_chromeFlags.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_crh.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadLastDir.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadLastDir_c.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadLastDir_toggle.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_favicon.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_geoprompt.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_geoprompt_page.html create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_lastpbcontextexited.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_localStorage.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_localStorage_before_after.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_localStorage_before_after_page.html create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_localStorage_before_after_page2.html create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_localStorage_page1.html create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_localStorage_page2.html create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_newtab_from_popup.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_noSessionRestoreMenuOption.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_nonbrowser.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_opendir.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_placesTitleNoUpdate.html create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_placesTitleNoUpdate.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_placestitle.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_popupblocker.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_protocolhandler.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_protocolhandler_page.html create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_sidebar.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_theming.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_ui.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_urlbarfocus.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_windowtitle.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_windowtitle_page.html create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_zoom.js create mode 100644 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_zoomrestore.js create mode 100644 browser/components/privatebrowsing/test/browser/empty_file.html create mode 100644 browser/components/privatebrowsing/test/browser/file_favicon.html create mode 100644 browser/components/privatebrowsing/test/browser/file_favicon.png create mode 100644 browser/components/privatebrowsing/test/browser/file_favicon.png^headers^ create mode 100644 browser/components/privatebrowsing/test/browser/head.js create mode 100644 browser/components/privatebrowsing/test/browser/popup.html create mode 100644 browser/components/privatebrowsing/test/browser/title.sjs create mode 100644 browser/components/safebrowsing/content/test/.eslintrc.js create mode 100644 browser/components/safebrowsing/content/test/browser.ini create mode 100644 browser/components/safebrowsing/content/test/browser_bug400731.js create mode 100644 browser/components/safebrowsing/content/test/browser_bug415846.js create mode 100644 browser/components/safebrowsing/content/test/browser_whitelisted.js create mode 100644 browser/components/safebrowsing/content/test/head.js create mode 100644 browser/components/search/content/search.xml create mode 100644 browser/components/search/content/searchReset.js create mode 100644 browser/components/search/content/searchReset.xhtml create mode 100644 browser/components/search/content/searchbarBindings.css create mode 100644 browser/components/search/jar.mn create mode 100644 browser/components/search/moz.build create mode 100644 browser/components/search/test/.eslintrc.js create mode 100644 browser/components/search/test/426329.xml create mode 100644 browser/components/search/test/483086-1.xml create mode 100644 browser/components/search/test/483086-2.xml create mode 100644 browser/components/search/test/browser.ini create mode 100644 browser/components/search/test/browser_426329.js create mode 100644 browser/components/search/test/browser_483086.js create mode 100644 browser/components/search/test/browser_aboutSearchReset.js create mode 100644 browser/components/search/test/browser_abouthome_behavior.js create mode 100644 browser/components/search/test/browser_addEngine.js create mode 100644 browser/components/search/test/browser_amazon.js create mode 100644 browser/components/search/test/browser_amazon_behavior.js create mode 100644 browser/components/search/test/browser_bing.js create mode 100644 browser/components/search/test/browser_bing_behavior.js create mode 100644 browser/components/search/test/browser_contextSearchTabPosition.js create mode 100644 browser/components/search/test/browser_contextmenu.js create mode 100644 browser/components/search/test/browser_google.js create mode 100644 browser/components/search/test/browser_google_behavior.js create mode 100644 browser/components/search/test/browser_google_codes.js create mode 100644 browser/components/search/test/browser_healthreport.js create mode 100644 browser/components/search/test/browser_hiddenOneOffs_cleanup.js create mode 100644 browser/components/search/test/browser_hiddenOneOffs_diacritics.js create mode 100644 browser/components/search/test/browser_oneOffContextMenu.js create mode 100644 browser/components/search/test/browser_oneOffContextMenu_setDefault.js create mode 100644 browser/components/search/test/browser_oneOffHeader.js create mode 100644 browser/components/search/test/browser_private_search_perwindowpb.js create mode 100644 browser/components/search/test/browser_searchbar_keyboard_navigation.js create mode 100644 browser/components/search/test/browser_searchbar_openpopup.js create mode 100644 browser/components/search/test/browser_searchbar_smallpanel_keyboard_navigation.js create mode 100644 browser/components/search/test/browser_webapi.js create mode 100644 browser/components/search/test/browser_yahoo.js create mode 100644 browser/components/search/test/browser_yahoo_behavior.js create mode 100644 browser/components/search/test/head.js create mode 100644 browser/components/search/test/opensearch.html create mode 100644 browser/components/search/test/test.html create mode 100644 browser/components/search/test/testEngine.xml create mode 100644 browser/components/search/test/testEngine_diacritics.xml create mode 100644 browser/components/search/test/testEngine_dupe.xml create mode 100644 browser/components/search/test/testEngine_mozsearch.xml create mode 100644 browser/components/search/test/webapi.html create mode 100644 browser/components/selfsupport/SelfSupportService.js create mode 100644 browser/components/selfsupport/SelfSupportService.manifest create mode 100644 browser/components/selfsupport/moz.build create mode 100644 browser/components/selfsupport/test/.eslintrc.js create mode 100644 browser/components/selfsupport/test/browser.ini create mode 100644 browser/components/selfsupport/test/browser_selfsupportAPI.js create mode 100644 browser/components/sessionstore/ContentRestore.jsm create mode 100644 browser/components/sessionstore/DocShellCapabilities.jsm create mode 100644 browser/components/sessionstore/FrameTree.jsm create mode 100644 browser/components/sessionstore/GlobalState.jsm create mode 100644 browser/components/sessionstore/PageStyle.jsm create mode 100644 browser/components/sessionstore/PrivacyFilter.jsm create mode 100644 browser/components/sessionstore/PrivacyLevel.jsm create mode 100644 browser/components/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.jsm create mode 100644 browser/components/sessionstore/RunState.jsm create mode 100644 browser/components/sessionstore/SessionCookies.jsm create mode 100644 browser/components/sessionstore/SessionFile.jsm create mode 100644 browser/components/sessionstore/SessionHistory.jsm create mode 100644 browser/components/sessionstore/SessionMigration.jsm create mode 100644 browser/components/sessionstore/SessionSaver.jsm create mode 100644 browser/components/sessionstore/SessionStorage.jsm create mode 100644 browser/components/sessionstore/SessionStore.jsm create mode 100644 browser/components/sessionstore/SessionWorker.js create mode 100644 browser/components/sessionstore/SessionWorker.jsm create mode 100644 browser/components/sessionstore/StartupPerformance.jsm create mode 100644 browser/components/sessionstore/TabAttributes.jsm create mode 100644 browser/components/sessionstore/TabState.jsm create mode 100644 browser/components/sessionstore/TabStateCache.jsm create mode 100644 browser/components/sessionstore/TabStateFlusher.jsm create mode 100644 browser/components/sessionstore/content/aboutSessionRestore.js create mode 100644 browser/components/sessionstore/content/aboutSessionRestore.xhtml create mode 100644 browser/components/sessionstore/content/content-sessionStore.js create mode 100644 browser/components/sessionstore/jar.mn create mode 100644 browser/components/sessionstore/moz.build create mode 100644 browser/components/sessionstore/nsISessionStartup.idl create mode 100644 browser/components/sessionstore/nsISessionStore.idl create mode 100644 browser/components/sessionstore/nsSessionStartup.js create mode 100644 browser/components/sessionstore/nsSessionStore.js create mode 100644 browser/components/sessionstore/nsSessionStore.manifest create mode 100644 browser/components/sessionstore/test/.eslintrc.js create mode 100644 browser/components/sessionstore/test/browser.ini create mode 100644 browser/components/sessionstore/test/browser_1234021.js create mode 100644 browser/components/sessionstore/test/browser_1234021_page.html create mode 100644 browser/components/sessionstore/test/browser_248970_b_perwindowpb.js create mode 100644 browser/components/sessionstore/test/browser_248970_b_sample.html create mode 100644 browser/components/sessionstore/test/browser_339445.js create mode 100644 browser/components/sessionstore/test/browser_339445_sample.html create mode 100644 browser/components/sessionstore/test/browser_345898.js create mode 100644 browser/components/sessionstore/test/browser_350525.js create mode 100644 browser/components/sessionstore/test/browser_354894_perwindowpb.js create mode 100644 browser/components/sessionstore/test/browser_367052.js create mode 100644 browser/components/sessionstore/test/browser_393716.js create mode 100644 browser/components/sessionstore/test/browser_394759_basic.js create mode 100644 browser/components/sessionstore/test/browser_394759_behavior.js create mode 100644 browser/components/sessionstore/test/browser_394759_perwindowpb.js create mode 100644 browser/components/sessionstore/test/browser_394759_purge.js create mode 100644 browser/components/sessionstore/test/browser_423132.js create mode 100644 browser/components/sessionstore/test/browser_423132_sample.html create mode 100644 browser/components/sessionstore/test/browser_447951.js create mode 100644 browser/components/sessionstore/test/browser_447951_sample.html create mode 100644 browser/components/sessionstore/test/browser_454908.js create mode 100644 browser/components/sessionstore/test/browser_454908_sample.html create mode 100644 browser/components/sessionstore/test/browser_456342.js create mode 100644 browser/components/sessionstore/test/browser_456342_sample.xhtml create mode 100644 browser/components/sessionstore/test/browser_459906.js create mode 100644 browser/components/sessionstore/test/browser_459906_empty.html create mode 100644 browser/components/sessionstore/test/browser_459906_sample.html create mode 100644 browser/components/sessionstore/test/browser_461634.js create mode 100644 browser/components/sessionstore/test/browser_461743.js create mode 100644 browser/components/sessionstore/test/browser_461743_sample.html create mode 100644 browser/components/sessionstore/test/browser_463205.js create mode 100644 browser/components/sessionstore/test/browser_463205_sample.html create mode 100644 browser/components/sessionstore/test/browser_463206.js create mode 100644 browser/components/sessionstore/test/browser_463206_sample.html create mode 100644 browser/components/sessionstore/test/browser_464199.js create mode 100644 browser/components/sessionstore/test/browser_464620_a.html create mode 100644 browser/components/sessionstore/test/browser_464620_a.js create mode 100644 browser/components/sessionstore/test/browser_464620_b.html create mode 100644 browser/components/sessionstore/test/browser_464620_b.js create mode 100644 browser/components/sessionstore/test/browser_464620_xd.html create mode 100644 browser/components/sessionstore/test/browser_465215.js create mode 100644 browser/components/sessionstore/test/browser_465223.js create mode 100644 browser/components/sessionstore/test/browser_466937.js create mode 100644 browser/components/sessionstore/test/browser_466937_sample.html create mode 100644 browser/components/sessionstore/test/browser_467409-backslashplosion.js create mode 100644 browser/components/sessionstore/test/browser_477657.js create mode 100644 browser/components/sessionstore/test/browser_480893.js create mode 100644 browser/components/sessionstore/test/browser_485482.js create mode 100644 browser/components/sessionstore/test/browser_485482_sample.html create mode 100644 browser/components/sessionstore/test/browser_485563.js create mode 100644 browser/components/sessionstore/test/browser_490040.js create mode 100644 browser/components/sessionstore/test/browser_491168.js create mode 100644 browser/components/sessionstore/test/browser_491577.js create mode 100644 browser/components/sessionstore/test/browser_495495.js create mode 100644 browser/components/sessionstore/test/browser_500328.js create mode 100644 browser/components/sessionstore/test/browser_506482.js create mode 100644 browser/components/sessionstore/test/browser_514751.js create mode 100644 browser/components/sessionstore/test/browser_522375.js create mode 100644 browser/components/sessionstore/test/browser_522545.js create mode 100644 browser/components/sessionstore/test/browser_524745.js create mode 100644 browser/components/sessionstore/test/browser_526613.js create mode 100644 browser/components/sessionstore/test/browser_528776.js create mode 100644 browser/components/sessionstore/test/browser_579868.js create mode 100644 browser/components/sessionstore/test/browser_579879.js create mode 100644 browser/components/sessionstore/test/browser_580512.js create mode 100644 browser/components/sessionstore/test/browser_581937.js create mode 100644 browser/components/sessionstore/test/browser_586068-apptabs.js create mode 100644 browser/components/sessionstore/test/browser_586068-apptabs_ondemand.js create mode 100644 browser/components/sessionstore/test/browser_586068-browser_state_interrupted.js create mode 100644 browser/components/sessionstore/test/browser_586068-cascade.js create mode 100644 browser/components/sessionstore/test/browser_586068-multi_window.js create mode 100644 browser/components/sessionstore/test/browser_586068-reload.js create mode 100644 browser/components/sessionstore/test/browser_586068-select.js create mode 100644 browser/components/sessionstore/test/browser_586068-window_state.js create mode 100644 browser/components/sessionstore/test/browser_586068-window_state_override.js create mode 100644 browser/components/sessionstore/test/browser_586147.js create mode 100644 browser/components/sessionstore/test/browser_588426.js create mode 100644 browser/components/sessionstore/test/browser_589246.js create mode 100644 browser/components/sessionstore/test/browser_590268.js create mode 100644 browser/components/sessionstore/test/browser_590563.js create mode 100644 browser/components/sessionstore/test/browser_595601-restore_hidden.js create mode 100644 browser/components/sessionstore/test/browser_597071.js create mode 100644 browser/components/sessionstore/test/browser_599909.js create mode 100644 browser/components/sessionstore/test/browser_600545.js create mode 100644 browser/components/sessionstore/test/browser_601955.js create mode 100644 browser/components/sessionstore/test/browser_607016.js create mode 100644 browser/components/sessionstore/test/browser_615394-SSWindowState_events.js create mode 100644 browser/components/sessionstore/test/browser_618151.js create mode 100644 browser/components/sessionstore/test/browser_623779.js create mode 100644 browser/components/sessionstore/test/browser_624727.js create mode 100644 browser/components/sessionstore/test/browser_625016.js create mode 100644 browser/components/sessionstore/test/browser_628270.js create mode 100644 browser/components/sessionstore/test/browser_635418.js create mode 100644 browser/components/sessionstore/test/browser_636279.js create mode 100644 browser/components/sessionstore/test/browser_637020.js create mode 100644 browser/components/sessionstore/test/browser_637020_slow.sjs create mode 100644 browser/components/sessionstore/test/browser_644409-scratchpads.js create mode 100644 browser/components/sessionstore/test/browser_645428.js create mode 100644 browser/components/sessionstore/test/browser_659591.js create mode 100644 browser/components/sessionstore/test/browser_662743.js create mode 100644 browser/components/sessionstore/test/browser_662743_sample.html create mode 100644 browser/components/sessionstore/test/browser_662812.js create mode 100644 browser/components/sessionstore/test/browser_665702-state_session.js create mode 100644 browser/components/sessionstore/test/browser_682507.js create mode 100644 browser/components/sessionstore/test/browser_687710.js create mode 100644 browser/components/sessionstore/test/browser_687710_2.js create mode 100644 browser/components/sessionstore/test/browser_694378.js create mode 100644 browser/components/sessionstore/test/browser_701377.js create mode 100644 browser/components/sessionstore/test/browser_705597.js create mode 100644 browser/components/sessionstore/test/browser_707862.js create mode 100644 browser/components/sessionstore/test/browser_739531.js create mode 100644 browser/components/sessionstore/test/browser_739531_sample.html create mode 100644 browser/components/sessionstore/test/browser_739805.js create mode 100644 browser/components/sessionstore/test/browser_819510_perwindowpb.js create mode 100644 browser/components/sessionstore/test/browser_911547.js create mode 100644 browser/components/sessionstore/test/browser_911547_sample.html create mode 100644 browser/components/sessionstore/test/browser_911547_sample.html^headers^ create mode 100644 browser/components/sessionstore/test/browser_aboutPrivateBrowsing.js create mode 100644 browser/components/sessionstore/test/browser_aboutSessionRestore.js create mode 100644 browser/components/sessionstore/test/browser_async_duplicate_tab.js create mode 100644 browser/components/sessionstore/test/browser_async_flushes.js create mode 100644 browser/components/sessionstore/test/browser_async_remove_tab.js create mode 100644 browser/components/sessionstore/test/browser_async_window_flushing.js create mode 100644 browser/components/sessionstore/test/browser_attributes.js create mode 100644 browser/components/sessionstore/test/browser_background_tab_crash.js create mode 100644 browser/components/sessionstore/test/browser_backup_recovery.js create mode 100644 browser/components/sessionstore/test/browser_broadcast.js create mode 100644 browser/components/sessionstore/test/browser_capabilities.js create mode 100644 browser/components/sessionstore/test/browser_cleaner.js create mode 100644 browser/components/sessionstore/test/browser_cookies.js create mode 100644 browser/components/sessionstore/test/browser_cookies.sjs create mode 100644 browser/components/sessionstore/test/browser_crashedTabs.js create mode 100644 browser/components/sessionstore/test/browser_dying_cache.js create mode 100644 browser/components/sessionstore/test/browser_dynamic_frames.js create mode 100644 browser/components/sessionstore/test/browser_forget_async_closings.js create mode 100644 browser/components/sessionstore/test/browser_form_restore_events.js create mode 100644 browser/components/sessionstore/test/browser_form_restore_events_sample.html create mode 100644 browser/components/sessionstore/test/browser_formdata.js create mode 100644 browser/components/sessionstore/test/browser_formdata_cc.js create mode 100644 browser/components/sessionstore/test/browser_formdata_format.js create mode 100644 browser/components/sessionstore/test/browser_formdata_format_sample.html create mode 100644 browser/components/sessionstore/test/browser_formdata_sample.html create mode 100644 browser/components/sessionstore/test/browser_formdata_xpath.js create mode 100644 browser/components/sessionstore/test/browser_formdata_xpath_sample.html create mode 100644 browser/components/sessionstore/test/browser_frame_history.js create mode 100755 browser/components/sessionstore/test/browser_frame_history_a.html create mode 100755 browser/components/sessionstore/test/browser_frame_history_b.html create mode 100755 browser/components/sessionstore/test/browser_frame_history_c.html create mode 100755 browser/components/sessionstore/test/browser_frame_history_c1.html create mode 100755 browser/components/sessionstore/test/browser_frame_history_c2.html create mode 100644 browser/components/sessionstore/test/browser_frame_history_index.html create mode 100644 browser/components/sessionstore/test/browser_frame_history_index2.html create mode 100644 browser/components/sessionstore/test/browser_frame_history_index_blank.html create mode 100644 browser/components/sessionstore/test/browser_frametree.js create mode 100644 browser/components/sessionstore/test/browser_frametree_sample.html create mode 100644 browser/components/sessionstore/test/browser_frametree_sample_frameset.html create mode 100644 browser/components/sessionstore/test/browser_global_store.js create mode 100644 browser/components/sessionstore/test/browser_history_persist.js create mode 100644 browser/components/sessionstore/test/browser_label_and_icon.js create mode 100644 browser/components/sessionstore/test/browser_merge_closed_tabs.js create mode 100644 browser/components/sessionstore/test/browser_multiple_navigateAndRestore.js create mode 100644 browser/components/sessionstore/test/browser_newtab_userTypedValue.js create mode 100644 browser/components/sessionstore/test/browser_pageStyle.js create mode 100644 browser/components/sessionstore/test/browser_pageStyle_sample.html create mode 100644 browser/components/sessionstore/test/browser_pageStyle_sample_nested.html create mode 100644 browser/components/sessionstore/test/browser_page_title.js create mode 100644 browser/components/sessionstore/test/browser_parentProcessRestoreHash.js create mode 100644 browser/components/sessionstore/test/browser_pending_tabs.js create mode 100644 browser/components/sessionstore/test/browser_privatetabs.js create mode 100644 browser/components/sessionstore/test/browser_purge_shistory.js create mode 100644 browser/components/sessionstore/test/browser_remoteness_flip_on_restore.js create mode 100644 browser/components/sessionstore/test/browser_replace_load.js create mode 100644 browser/components/sessionstore/test/browser_restore_cookies_noOriginAttributes.js create mode 100644 browser/components/sessionstore/test/browser_restore_redirect.js create mode 100644 browser/components/sessionstore/test/browser_revive_crashed_bg_tabs.js create mode 100644 browser/components/sessionstore/test/browser_scrollPositions.js create mode 100644 browser/components/sessionstore/test/browser_scrollPositionsReaderMode.js create mode 100644 browser/components/sessionstore/test/browser_scrollPositions_readerModeArticle.html create mode 100644 browser/components/sessionstore/test/browser_scrollPositions_sample.html create mode 100644 browser/components/sessionstore/test/browser_scrollPositions_sample_frameset.html create mode 100644 browser/components/sessionstore/test/browser_send_async_message_oom.js create mode 100644 browser/components/sessionstore/test/browser_sessionHistory.js create mode 100644 browser/components/sessionstore/test/browser_sessionHistory_slow.sjs create mode 100644 browser/components/sessionstore/test/browser_sessionStorage.html create mode 100644 browser/components/sessionstore/test/browser_sessionStorage.js create mode 100644 browser/components/sessionstore/test/browser_sessionStorage_size.js create mode 100644 browser/components/sessionstore/test/browser_sessionStoreContainer.js create mode 100644 browser/components/sessionstore/test/browser_swapDocShells.js create mode 100644 browser/components/sessionstore/test/browser_switch_remoteness.js create mode 100644 browser/components/sessionstore/test/browser_undoCloseById.js create mode 100644 browser/components/sessionstore/test/browser_unrestored_crashedTabs.js create mode 100644 browser/components/sessionstore/test/browser_upgrade_backup.js create mode 100644 browser/components/sessionstore/test/browser_windowRestore_perwindowpb.js create mode 100644 browser/components/sessionstore/test/browser_windowStateContainer.js create mode 100644 browser/components/sessionstore/test/content-forms.js create mode 100644 browser/components/sessionstore/test/content.js create mode 100644 browser/components/sessionstore/test/head.js create mode 100644 browser/components/sessionstore/test/restore_redirect_http.html create mode 100644 browser/components/sessionstore/test/restore_redirect_http.html^headers^ create mode 100644 browser/components/sessionstore/test/restore_redirect_js.html create mode 100644 browser/components/sessionstore/test/restore_redirect_target.html create mode 100644 browser/components/sessionstore/test/unit/.eslintrc.js create mode 100644 browser/components/sessionstore/test/unit/data/sessionCheckpoints_all.json create mode 100644 browser/components/sessionstore/test/unit/data/sessionstore_invalid.js create mode 100644 browser/components/sessionstore/test/unit/data/sessionstore_valid.js create mode 100644 browser/components/sessionstore/test/unit/head.js create mode 100644 browser/components/sessionstore/test/unit/test_backup_once.js create mode 100644 browser/components/sessionstore/test/unit/test_histogram_corrupt_files.js create mode 100644 browser/components/sessionstore/test/unit/test_shutdown_cleanup.js create mode 100644 browser/components/sessionstore/test/unit/test_startup_invalid_session.js create mode 100644 browser/components/sessionstore/test/unit/test_startup_nosession_async.js create mode 100644 browser/components/sessionstore/test/unit/test_startup_session_async.js create mode 100644 browser/components/sessionstore/test/unit/xpcshell.ini create mode 100644 browser/components/shell/ShellService.jsm create mode 100644 browser/components/shell/content/setDesktopBackground.js create mode 100644 browser/components/shell/content/setDesktopBackground.xul create mode 100644 browser/components/shell/jar.mn create mode 100644 browser/components/shell/moz.build create mode 100644 browser/components/shell/nsGNOMEShellService.cpp create mode 100644 browser/components/shell/nsGNOMEShellService.h create mode 100644 browser/components/shell/nsIGNOMEShellService.idl create mode 100644 browser/components/shell/nsIMacShellService.idl create mode 100644 browser/components/shell/nsIShellService.idl create mode 100644 browser/components/shell/nsIWindowsShellService.idl create mode 100644 browser/components/shell/nsMacShellService.cpp create mode 100644 browser/components/shell/nsMacShellService.h create mode 100644 browser/components/shell/nsSetDefaultBrowser.js create mode 100644 browser/components/shell/nsSetDefaultBrowser.manifest create mode 100644 browser/components/shell/nsShellService.h create mode 100644 browser/components/shell/nsWindowsShellService.cpp create mode 100644 browser/components/shell/nsWindowsShellService.h create mode 100644 browser/components/shell/test/.eslintrc.js create mode 100644 browser/components/shell/test/browser.ini create mode 100644 browser/components/shell/test/browser_420786.js create mode 100644 browser/components/shell/test/browser_633221.js create mode 100644 browser/components/shell/test/unit/.eslintrc.js create mode 100644 browser/components/shell/test/unit/test_421977.js create mode 100644 browser/components/shell/test/unit/xpcshell.ini create mode 100644 browser/components/syncedtabs/EventEmitter.jsm create mode 100644 browser/components/syncedtabs/SyncedTabsDeckComponent.js create mode 100644 browser/components/syncedtabs/SyncedTabsDeckStore.js create mode 100644 browser/components/syncedtabs/SyncedTabsDeckView.js create mode 100644 browser/components/syncedtabs/SyncedTabsListStore.js create mode 100644 browser/components/syncedtabs/TabListComponent.js create mode 100644 browser/components/syncedtabs/TabListView.js create mode 100644 browser/components/syncedtabs/jar.mn create mode 100644 browser/components/syncedtabs/moz.build create mode 100644 browser/components/syncedtabs/sidebar.js create mode 100644 browser/components/syncedtabs/sidebar.xhtml create mode 100644 browser/components/syncedtabs/test/browser/.eslintrc.js create mode 100644 browser/components/syncedtabs/test/browser/browser.ini create mode 100644 browser/components/syncedtabs/test/browser/browser_sidebar_syncedtabslist.js create mode 100644 browser/components/syncedtabs/test/browser/head.js create mode 100644 browser/components/syncedtabs/test/xpcshell/.eslintrc.js create mode 100644 browser/components/syncedtabs/test/xpcshell/head.js create mode 100644 browser/components/syncedtabs/test/xpcshell/test_EventEmitter.js create mode 100644 browser/components/syncedtabs/test/xpcshell/test_SyncedTabsDeckComponent.js create mode 100644 browser/components/syncedtabs/test/xpcshell/test_SyncedTabsDeckStore.js create mode 100644 browser/components/syncedtabs/test/xpcshell/test_SyncedTabsListStore.js create mode 100644 browser/components/syncedtabs/test/xpcshell/test_TabListComponent.js create mode 100644 browser/components/syncedtabs/test/xpcshell/xpcshell.ini create mode 100644 browser/components/syncedtabs/util.js create mode 100644 browser/components/tests/browser/.eslintrc.js create mode 100644 browser/components/tests/browser/browser.ini create mode 100644 browser/components/tests/browser/browser_bug538331.js create mode 100644 browser/components/tests/browser/browser_contentpermissionprompt.js create mode 100644 browser/components/tests/unit/.eslintrc.js create mode 100644 browser/components/tests/unit/data/engine-de-DE.xml create mode 100644 browser/components/tests/unit/distribution.ini create mode 100644 browser/components/tests/unit/head.js create mode 100644 browser/components/tests/unit/test_browserGlue_migration_loop_cleanup.js create mode 100644 browser/components/tests/unit/test_distribution.js create mode 100644 browser/components/tests/unit/xpcshell.ini create mode 100644 browser/components/translation/BingTranslator.jsm create mode 100644 browser/components/translation/LanguageDetector.jsm create mode 100644 browser/components/translation/Translation.jsm create mode 100644 browser/components/translation/TranslationContentHandler.jsm create mode 100644 browser/components/translation/TranslationDocument.jsm create mode 100644 browser/components/translation/YandexTranslator.jsm create mode 100644 browser/components/translation/cld2/Makefile create mode 100644 browser/components/translation/cld2/cld-worker.js create mode 100644 browser/components/translation/cld2/cld-worker.js.mem create mode 100644 browser/components/translation/cld2/cld.idl create mode 100644 browser/components/translation/cld2/cldapp.cc create mode 100644 browser/components/translation/cld2/internal/LICENSE create mode 100644 browser/components/translation/cld2/internal/cld2_dynamic_data.h create mode 100644 browser/components/translation/cld2/internal/cld2_dynamic_data_loader.h create mode 100644 browser/components/translation/cld2/internal/cld2_generated_cjk_compatible.cc create mode 100644 browser/components/translation/cld2/internal/cld2_generated_deltaoctachrome0122.cc create mode 100644 browser/components/translation/cld2/internal/cld2_generated_distinctoctachrome0122.cc create mode 100644 browser/components/translation/cld2/internal/cld2_generated_quadchrome0122_16.cc create mode 100644 browser/components/translation/cld2/internal/cld2tablesummary.h create mode 100644 browser/components/translation/cld2/internal/cld_generated_cjk_delta_bi_4.cc create mode 100644 browser/components/translation/cld2/internal/cld_generated_cjk_uni_prop_80.cc create mode 100644 browser/components/translation/cld2/internal/cld_generated_score_quad_octa_0122_2.cc create mode 100644 browser/components/translation/cld2/internal/cldutil.cc create mode 100644 browser/components/translation/cld2/internal/cldutil.h create mode 100644 browser/components/translation/cld2/internal/cldutil_shared.cc create mode 100644 browser/components/translation/cld2/internal/cldutil_shared.h create mode 100644 browser/components/translation/cld2/internal/compact_lang_det.cc create mode 100644 browser/components/translation/cld2/internal/compact_lang_det_hint_code.cc create mode 100644 browser/components/translation/cld2/internal/compact_lang_det_hint_code.h create mode 100644 browser/components/translation/cld2/internal/compact_lang_det_impl.cc create mode 100644 browser/components/translation/cld2/internal/compact_lang_det_impl.h create mode 100644 browser/components/translation/cld2/internal/debug.h create mode 100644 browser/components/translation/cld2/internal/debug_empty.cc create mode 100644 browser/components/translation/cld2/internal/fixunicodevalue.cc create mode 100644 browser/components/translation/cld2/internal/fixunicodevalue.h create mode 100644 browser/components/translation/cld2/internal/generated_distinct_bi_0.cc create mode 100644 browser/components/translation/cld2/internal/generated_entities.cc create mode 100644 browser/components/translation/cld2/internal/generated_language.cc create mode 100644 browser/components/translation/cld2/internal/generated_language.h create mode 100644 browser/components/translation/cld2/internal/generated_ulscript.cc create mode 100644 browser/components/translation/cld2/internal/generated_ulscript.h create mode 100644 browser/components/translation/cld2/internal/getonescriptspan.cc create mode 100644 browser/components/translation/cld2/internal/getonescriptspan.h create mode 100644 browser/components/translation/cld2/internal/integral_types.h create mode 100644 browser/components/translation/cld2/internal/lang_script.cc create mode 100644 browser/components/translation/cld2/internal/lang_script.h create mode 100644 browser/components/translation/cld2/internal/langspan.h create mode 100644 browser/components/translation/cld2/internal/offsetmap.cc create mode 100644 browser/components/translation/cld2/internal/offsetmap.h create mode 100644 browser/components/translation/cld2/internal/port.h create mode 100644 browser/components/translation/cld2/internal/scoreonescriptspan.cc create mode 100644 browser/components/translation/cld2/internal/scoreonescriptspan.h create mode 100644 browser/components/translation/cld2/internal/stringpiece.h create mode 100644 browser/components/translation/cld2/internal/tote.cc create mode 100644 browser/components/translation/cld2/internal/tote.h create mode 100644 browser/components/translation/cld2/internal/utf8prop_lettermarkscriptnum.h create mode 100644 browser/components/translation/cld2/internal/utf8repl_lettermarklower.h create mode 100644 browser/components/translation/cld2/internal/utf8scannot_lettermarkspecial.h create mode 100644 browser/components/translation/cld2/internal/utf8statetable.cc create mode 100644 browser/components/translation/cld2/internal/utf8statetable.h create mode 100644 browser/components/translation/cld2/post.js create mode 100644 browser/components/translation/cld2/public/compact_lang_det.h create mode 100644 browser/components/translation/cld2/public/encodings.h create mode 100644 browser/components/translation/jar.mn create mode 100644 browser/components/translation/microsoft-translator-attribution.png create mode 100644 browser/components/translation/moz.build create mode 100644 browser/components/translation/test/.eslintrc.js create mode 100644 browser/components/translation/test/bing.sjs create mode 100644 browser/components/translation/test/browser.ini create mode 100644 browser/components/translation/test/browser_translation_bing.js create mode 100644 browser/components/translation/test/browser_translation_exceptions.js create mode 100644 browser/components/translation/test/browser_translation_infobar.js create mode 100644 browser/components/translation/test/browser_translation_telemetry.js create mode 100644 browser/components/translation/test/browser_translation_yandex.js create mode 100644 browser/components/translation/test/fixtures/bug1022725-fr.html create mode 100644 browser/components/translation/test/fixtures/result-da39a3ee5e.txt create mode 100644 browser/components/translation/test/fixtures/result-yandex-d448894848.json create mode 100644 browser/components/translation/test/unit/.eslintrc.js create mode 100644 browser/components/translation/test/unit/test_cld2.js create mode 100644 browser/components/translation/test/unit/xpcshell.ini create mode 100644 browser/components/translation/test/yandex.sjs create mode 100644 browser/components/translation/translation-infobar.xml create mode 100644 browser/components/uitour/UITour-lib.js create mode 100644 browser/components/uitour/UITour.jsm create mode 100644 browser/components/uitour/content-UITour.js create mode 100644 browser/components/uitour/jar.mn create mode 100644 browser/components/uitour/moz.build create mode 100644 browser/components/uitour/test/.eslintrc.js create mode 100644 browser/components/uitour/test/browser.ini create mode 100644 browser/components/uitour/test/browser_UITour.js create mode 100644 browser/components/uitour/test/browser_UITour2.js create mode 100644 browser/components/uitour/test/browser_UITour3.js create mode 100644 browser/components/uitour/test/browser_UITour_annotation_size_attributes.js create mode 100644 browser/components/uitour/test/browser_UITour_availableTargets.js create mode 100644 browser/components/uitour/test/browser_UITour_defaultBrowser.js create mode 100644 browser/components/uitour/test/browser_UITour_detach_tab.js create mode 100644 browser/components/uitour/test/browser_UITour_forceReaderMode.js create mode 100644 browser/components/uitour/test/browser_UITour_heartbeat.js create mode 100644 browser/components/uitour/test/browser_UITour_modalDialog.js create mode 100644 browser/components/uitour/test/browser_UITour_observe.js create mode 100644 browser/components/uitour/test/browser_UITour_panel_close_annotation.js create mode 100644 browser/components/uitour/test/browser_UITour_pocket.js create mode 100644 browser/components/uitour/test/browser_UITour_registerPageID.js create mode 100644 browser/components/uitour/test/browser_UITour_resetProfile.js create mode 100644 browser/components/uitour/test/browser_UITour_showNewTab.js create mode 100644 browser/components/uitour/test/browser_UITour_sync.js create mode 100644 browser/components/uitour/test/browser_UITour_toggleReaderMode.js create mode 100644 browser/components/uitour/test/browser_backgroundTab.js create mode 100644 browser/components/uitour/test/browser_closeTab.js create mode 100644 browser/components/uitour/test/browser_fxa.js create mode 100644 browser/components/uitour/test/browser_no_tabs.js create mode 100644 browser/components/uitour/test/browser_openPreferences.js create mode 100644 browser/components/uitour/test/browser_openSearchPanel.js create mode 100644 browser/components/uitour/test/browser_showMenu_controlCenter.js create mode 100644 browser/components/uitour/test/browser_trackingProtection.js create mode 100644 browser/components/uitour/test/browser_trackingProtection_tour.js create mode 100644 browser/components/uitour/test/head.js create mode 100644 browser/components/uitour/test/image.png create mode 100644 browser/components/uitour/test/uitour.html (limited to 'browser/components') diff --git a/browser/components/BrowserComponents.manifest b/browser/components/BrowserComponents.manifest new file mode 100644 index 000000000..dbfc3d2ec --- /dev/null +++ b/browser/components/BrowserComponents.manifest @@ -0,0 +1,44 @@ +# nsBrowserContentHandler.js +component {5d0ce354-df01-421a-83fb-7ead0990c24e} nsBrowserContentHandler.js application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +contract @mozilla.org/browser/clh;1 {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +component {47cd0651-b1be-4a0f-b5c4-10e5a573ef71} nsBrowserContentHandler.js application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +contract @mozilla.org/browser/final-clh;1 {47cd0651-b1be-4a0f-b5c4-10e5a573ef71} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +contract @mozilla.org/uriloader/content-handler;1?type=text/html {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +contract @mozilla.org/uriloader/content-handler;1?type=application/vnd.mozilla.xul+xml {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +contract @mozilla.org/uriloader/content-handler;1?type=image/svg+xml {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +contract @mozilla.org/uriloader/content-handler;1?type=text/rdf {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +contract @mozilla.org/uriloader/content-handler;1?type=text/xml {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +contract @mozilla.org/uriloader/content-handler;1?type=application/xhtml+xml {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +contract @mozilla.org/uriloader/content-handler;1?type=text/css {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +contract @mozilla.org/uriloader/content-handler;1?type=text/plain {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +contract @mozilla.org/uriloader/content-handler;1?type=image/gif {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +contract @mozilla.org/uriloader/content-handler;1?type=image/jpeg {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +contract @mozilla.org/uriloader/content-handler;1?type=image/jpg {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +contract @mozilla.org/uriloader/content-handler;1?type=image/png {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +contract @mozilla.org/uriloader/content-handler;1?type=image/bmp {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +contract @mozilla.org/uriloader/content-handler;1?type=image/x-icon {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +contract @mozilla.org/uriloader/content-handler;1?type=image/vnd.microsoft.icon {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +contract @mozilla.org/uriloader/content-handler;1?type=application/http-index-format {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +category command-line-handler m-browser @mozilla.org/browser/clh;1 application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +category command-line-handler x-default @mozilla.org/browser/final-clh;1 application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +category command-line-validator b-browser @mozilla.org/browser/clh;1 application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} + +# nsBrowserGlue.js + +# This component must restrict its registration for the app-startup category +# to the specific list of apps that use it so it doesn't get loaded in xpcshell. +# Thus we restrict it to these apps: +# +# b2g: {3c2e2abc-06d4-11e1-ac3b-374f68613e61} +# browser: {ec8030f7-c20a-464f-9b0e-13a3a9e97384} +# mobile/android: {aa3c5121-dab2-40e2-81ca-7ea25febc110} +# mobile/xul: {a23983c0-fd0e-11dc-95ff-0800200c9a66} +# graphene: {d1bfe7d9-c01e-4237-998b-7b5f960a4314} + +component {eab9012e-5f74-4cbc-b2b5-a590235513cc} nsBrowserGlue.js +contract @mozilla.org/browser/browserglue;1 {eab9012e-5f74-4cbc-b2b5-a590235513cc} +category app-startup nsBrowserGlue service,@mozilla.org/browser/browserglue;1 application={3c2e2abc-06d4-11e1-ac3b-374f68613e61} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} application={aa3c5121-dab2-40e2-81ca-7ea25febc110} application={a23983c0-fd0e-11dc-95ff-0800200c9a66} application={d1bfe7d9-c01e-4237-998b-7b5f960a4314} +component {d8903bf6-68d5-4e97-bcd1-e4d3012f721a} nsBrowserGlue.js +#ifndef MOZ_MULET +contract @mozilla.org/content-permission/prompt;1 {d8903bf6-68d5-4e97-bcd1-e4d3012f721a} +#endif diff --git a/browser/components/about/AboutRedirector.cpp b/browser/components/about/AboutRedirector.cpp new file mode 100644 index 000000000..a09932d95 --- /dev/null +++ b/browser/components/about/AboutRedirector.cpp @@ -0,0 +1,235 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* 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/. */ + +// See also: docshell/base/nsAboutRedirector.cpp + +#include "AboutRedirector.h" +#include "nsNetUtil.h" +#include "nsIAboutNewTabService.h" +#include "nsIChannel.h" +#include "nsIURI.h" +#include "nsIScriptSecurityManager.h" +#include "nsIProtocolHandler.h" +#include "mozilla/ArrayUtils.h" +#include "nsServiceManagerUtils.h" + +namespace mozilla { +namespace browser { + +NS_IMPL_ISUPPORTS(AboutRedirector, nsIAboutModule) + +struct RedirEntry { + const char* id; + const char* url; + uint32_t flags; +}; + +/* + Entries which do not have URI_SAFE_FOR_UNTRUSTED_CONTENT will run with chrome + privileges. This is potentially dangerous. Please use + URI_SAFE_FOR_UNTRUSTED_CONTENT in the third argument to each map item below + unless your about: page really needs chrome privileges. Security review is + required before adding new map entries without + URI_SAFE_FOR_UNTRUSTED_CONTENT. +*/ +static RedirEntry kRedirMap[] = { + { "blocked", "chrome://browser/content/blockedSite.xhtml", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | + nsIAboutModule::URI_CAN_LOAD_IN_CHILD | + nsIAboutModule::ALLOW_SCRIPT | + nsIAboutModule::HIDE_FROM_ABOUTABOUT }, + { "certerror", "chrome://browser/content/aboutNetError.xhtml", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | + nsIAboutModule::URI_CAN_LOAD_IN_CHILD | + nsIAboutModule::ALLOW_SCRIPT | + nsIAboutModule::HIDE_FROM_ABOUTABOUT }, + { "socialerror", "chrome://browser/content/aboutSocialError.xhtml", + nsIAboutModule::ALLOW_SCRIPT | + nsIAboutModule::HIDE_FROM_ABOUTABOUT }, + { "providerdirectory", "chrome://browser/content/aboutProviderDirectory.xhtml", + nsIAboutModule::ALLOW_SCRIPT | + nsIAboutModule::HIDE_FROM_ABOUTABOUT }, + { "tabcrashed", "chrome://browser/content/aboutTabCrashed.xhtml", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | + nsIAboutModule::ALLOW_SCRIPT | + nsIAboutModule::HIDE_FROM_ABOUTABOUT }, + { "feeds", "chrome://browser/content/feeds/subscribe.xhtml", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | + nsIAboutModule::ALLOW_SCRIPT | + nsIAboutModule::HIDE_FROM_ABOUTABOUT }, + { "privatebrowsing", "chrome://browser/content/aboutPrivateBrowsing.xhtml", + nsIAboutModule::URI_MUST_LOAD_IN_CHILD | + nsIAboutModule::ALLOW_SCRIPT }, + { "rights", + "chrome://global/content/aboutRights.xhtml", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | + nsIAboutModule::MAKE_LINKABLE | + nsIAboutModule::ALLOW_SCRIPT }, + { "robots", "chrome://browser/content/aboutRobots.xhtml", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | + nsIAboutModule::ALLOW_SCRIPT }, + { "searchreset", "chrome://browser/content/search/searchReset.xhtml", + nsIAboutModule::ALLOW_SCRIPT | + nsIAboutModule::HIDE_FROM_ABOUTABOUT }, + { "sessionrestore", "chrome://browser/content/aboutSessionRestore.xhtml", + nsIAboutModule::ALLOW_SCRIPT }, + { "welcomeback", "chrome://browser/content/aboutWelcomeBack.xhtml", + nsIAboutModule::ALLOW_SCRIPT }, + { "sync-tabs", "chrome://browser/content/sync/aboutSyncTabs.xul", + nsIAboutModule::ALLOW_SCRIPT }, + // Linkable because of indexeddb use (bug 1228118) + { "home", "chrome://browser/content/abouthome/aboutHome.xhtml", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | + nsIAboutModule::URI_MUST_LOAD_IN_CHILD | + nsIAboutModule::ALLOW_SCRIPT | + nsIAboutModule::MAKE_LINKABLE | + nsIAboutModule::ENABLE_INDEXED_DB }, + // the newtab's actual URL will be determined when the channel is created + { "newtab", "about:blank", + nsIAboutModule::ALLOW_SCRIPT }, + { "preferences", "chrome://browser/content/preferences/in-content/preferences.xul", + nsIAboutModule::ALLOW_SCRIPT }, + { "downloads", "chrome://browser/content/downloads/contentAreaDownloadsView.xul", + nsIAboutModule::ALLOW_SCRIPT }, +#ifdef MOZ_SERVICES_HEALTHREPORT + { "healthreport", "chrome://browser/content/abouthealthreport/abouthealth.xhtml", + nsIAboutModule::ALLOW_SCRIPT }, +#endif + { "accounts", "chrome://browser/content/aboutaccounts/aboutaccounts.xhtml", + nsIAboutModule::ALLOW_SCRIPT }, + { "reader", "chrome://global/content/reader/aboutReader.html", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | + nsIAboutModule::ALLOW_SCRIPT | + nsIAboutModule::URI_MUST_LOAD_IN_CHILD | + nsIAboutModule::HIDE_FROM_ABOUTABOUT }, +}; +static const int kRedirTotal = ArrayLength(kRedirMap); + +static nsAutoCString +GetAboutModuleName(nsIURI *aURI) +{ + nsAutoCString path; + aURI->GetPath(path); + + int32_t f = path.FindChar('#'); + if (f >= 0) + path.SetLength(f); + + f = path.FindChar('?'); + if (f >= 0) + path.SetLength(f); + + ToLowerCase(path); + return path; +} + +NS_IMETHODIMP +AboutRedirector::NewChannel(nsIURI* aURI, + nsILoadInfo* aLoadInfo, + nsIChannel** result) +{ + NS_ENSURE_ARG_POINTER(aURI); + NS_ASSERTION(result, "must not be null"); + + nsAutoCString path = GetAboutModuleName(aURI); + + nsresult rv; + nsCOMPtr ioService = do_GetIOService(&rv); + NS_ENSURE_SUCCESS(rv, rv); + + for (int i = 0; i < kRedirTotal; i++) { + if (!strcmp(path.get(), kRedirMap[i].id)) { + nsAutoCString url; + + if (path.EqualsLiteral("newtab")) { + // let the aboutNewTabService decide where to redirect + nsCOMPtr aboutNewTabService = + do_GetService("@mozilla.org/browser/aboutnewtab-service;1", &rv); + NS_ENSURE_SUCCESS(rv, rv); + rv = aboutNewTabService->GetDefaultURL(url); + NS_ENSURE_SUCCESS(rv, rv); + + // if about:newtab points to an external resource we have to make sure + // the content is signed and trusted + bool remoteEnabled = false; + rv = aboutNewTabService->GetRemoteEnabled(&remoteEnabled); + NS_ENSURE_SUCCESS(rv, rv); + if (remoteEnabled) { + NS_ENSURE_ARG_POINTER(aLoadInfo); + aLoadInfo->SetVerifySignedContent(true); + } + } + // fall back to the specified url in the map + if (url.IsEmpty()) { + url.AssignASCII(kRedirMap[i].url); + } + + nsCOMPtr tempChannel; + nsCOMPtr tempURI; + rv = NS_NewURI(getter_AddRefs(tempURI), url); + NS_ENSURE_SUCCESS(rv, rv); + + // If tempURI links to an external URI (i.e. something other than + // chrome:// or resource://) then set the LOAD_REPLACE flag on the + // channel which forces the channel owner to reflect the displayed + // URL rather then being the systemPrincipal. + bool isUIResource = false; + rv = NS_URIChainHasFlags(tempURI, nsIProtocolHandler::URI_IS_UI_RESOURCE, + &isUIResource); + NS_ENSURE_SUCCESS(rv, rv); + + nsLoadFlags loadFlags = isUIResource + ? static_cast(nsIChannel::LOAD_NORMAL) + : static_cast(nsIChannel::LOAD_REPLACE); + + rv = NS_NewChannelInternal(getter_AddRefs(tempChannel), + tempURI, + aLoadInfo, + nullptr, // aLoadGroup + nullptr, // aCallbacks + loadFlags); + NS_ENSURE_SUCCESS(rv, rv); + + tempChannel->SetOriginalURI(aURI); + + NS_ADDREF(*result = tempChannel); + return rv; + } + } + + return NS_ERROR_ILLEGAL_VALUE; +} + +NS_IMETHODIMP +AboutRedirector::GetURIFlags(nsIURI *aURI, uint32_t *result) +{ + NS_ENSURE_ARG_POINTER(aURI); + + nsAutoCString name = GetAboutModuleName(aURI); + + for (int i = 0; i < kRedirTotal; i++) { + if (name.Equals(kRedirMap[i].id)) { + *result = kRedirMap[i].flags; + return NS_OK; + } + } + + return NS_ERROR_ILLEGAL_VALUE; +} + +nsresult +AboutRedirector::Create(nsISupports *aOuter, REFNSIID aIID, void **result) +{ + AboutRedirector* about = new AboutRedirector(); + if (about == nullptr) + return NS_ERROR_OUT_OF_MEMORY; + NS_ADDREF(about); + nsresult rv = about->QueryInterface(aIID, result); + NS_RELEASE(about); + return rv; +} + +} // namespace browser +} // namespace mozilla diff --git a/browser/components/about/AboutRedirector.h b/browser/components/about/AboutRedirector.h new file mode 100644 index 000000000..8feeb7491 --- /dev/null +++ b/browser/components/about/AboutRedirector.h @@ -0,0 +1,32 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* 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/. */ + +#ifndef AboutRedirector_h__ +#define AboutRedirector_h__ + +#include "nsIAboutModule.h" + +namespace mozilla { +namespace browser { + +class AboutRedirector : public nsIAboutModule +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIABOUTMODULE + + AboutRedirector() {} + + static nsresult + Create(nsISupports *aOuter, REFNSIID aIID, void **aResult); + +protected: + virtual ~AboutRedirector() {} +}; + +} // namespace browser +} // namespace mozilla + +#endif // AboutRedirector_h__ diff --git a/browser/components/about/moz.build b/browser/components/about/moz.build new file mode 100644 index 000000000..f1559c2b9 --- /dev/null +++ b/browser/components/about/moz.build @@ -0,0 +1,19 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# 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/. + +EXPORTS.mozilla.browser += [ + 'AboutRedirector.h', +] + +SOURCES += [ + 'AboutRedirector.cpp', +] + +FINAL_LIBRARY = 'browsercomps' + +LOCAL_INCLUDES += [ + '../build', +] diff --git a/browser/components/build/Makefile.in b/browser/components/build/Makefile.in new file mode 100644 index 000000000..2387227ab --- /dev/null +++ b/browser/components/build/Makefile.in @@ -0,0 +1,8 @@ +# 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/. + +include $(topsrcdir)/config/rules.mk + +# Ensure that we don't embed a manifest referencing the CRT. +EMBED_MANIFEST_AT = diff --git a/browser/components/build/moz.build b/browser/components/build/moz.build new file mode 100644 index 000000000..8c99b74dd --- /dev/null +++ b/browser/components/build/moz.build @@ -0,0 +1,24 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# 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/. + +EXPORTS += [ + 'nsBrowserCompsCID.h', +] + +SOURCES += [ + 'nsModule.cpp', +] + +Library('browsercomps') +FINAL_LIBRARY = 'xul' + +LOCAL_INCLUDES += [ + '../about', + '../dirprovider', + '../feeds', + '../migration', + '../shell', +] diff --git a/browser/components/build/nsBrowserCompsCID.h b/browser/components/build/nsBrowserCompsCID.h new file mode 100644 index 000000000..e325e43d4 --- /dev/null +++ b/browser/components/build/nsBrowserCompsCID.h @@ -0,0 +1,43 @@ +/* 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/. */ + +///////////////////////////////////////////////////////////////////////////// + +#ifdef XP_WIN +#define NS_WINIEHISTORYENUMERATOR_CID \ +{ 0x93480624, 0x806e, 0x4756, { 0xb7, 0xcb, 0x0f, 0xb7, 0xdd, 0x74, 0x6a, 0x8f } } + +#define NS_IEHISTORYENUMERATOR_CONTRACTID \ + "@mozilla.org/profile/migrator/iehistoryenumerator;1" +#endif + +#define NS_SHELLSERVICE_CID \ +{ 0x63c7b9f4, 0xcc8, 0x43f8, { 0xb6, 0x66, 0xa, 0x66, 0x16, 0x55, 0xcb, 0x73 } } + +#define NS_SHELLSERVICE_CONTRACTID \ + "@mozilla.org/browser/shell-service;1" + +#define NS_RDF_FORWARDPROXY_INFER_DATASOURCE_CID \ +{ 0x7a024bcf, 0xedd5, 0x4d9a, { 0x86, 0x14, 0xd4, 0x4b, 0xe1, 0xda, 0xda, 0xd3 } } + +#define NS_FEEDSNIFFER_CID \ +{ 0x6893e69, 0x71d8, 0x4b23, { 0x81, 0xeb, 0x80, 0x31, 0x4d, 0xaf, 0x3e, 0x66 } } + +#define NS_FEEDSNIFFER_CONTRACTID \ + "@mozilla.org/browser/feeds/sniffer;1" + +#define NS_ABOUTFEEDS_CID \ +{ 0x12ff56ec, 0x58be, 0x402c, { 0xb0, 0x57, 0x1, 0xf9, 0x61, 0xde, 0x96, 0x9b } } + +// 136e2c4d-c5a4-477c-b131-d93d7d704f64 +#define NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID \ +{ 0x136e2c4d, 0xc5a4, 0x477c, { 0xb1, 0x31, 0xd9, 0x3d, 0x7d, 0x70, 0x4f, 0x64 } } + +// 7e4bb6ad-2fc4-4dc6-89ef-23e8e5ccf980 +#define NS_BROWSER_ABOUT_REDIRECTOR_CID \ +{ 0x7e4bb6ad, 0x2fc4, 0x4dc6, { 0x89, 0xef, 0x23, 0xe8, 0xe5, 0xcc, 0xf9, 0x80 } } + +// {6DEB193C-F87D-4078-BC78-5E64655B4D62} +#define NS_BROWSERDIRECTORYPROVIDER_CID \ +{ 0x6deb193c, 0xf87d, 0x4078, { 0xbc, 0x78, 0x5e, 0x64, 0x65, 0x5b, 0x4d, 0x62 } } diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp new file mode 100644 index 000000000..f85d8812c --- /dev/null +++ b/browser/components/build/nsModule.cpp @@ -0,0 +1,131 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* 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/. */ + +#include "mozilla/ModuleUtils.h" + +#include "nsBrowserCompsCID.h" +#include "DirectoryProvider.h" + +#if defined(XP_WIN) +#include "nsWindowsShellService.h" +#elif defined(XP_MACOSX) +#include "nsMacShellService.h" +#elif defined(MOZ_WIDGET_GTK) +#include "nsGNOMEShellService.h" +#endif + +#if defined(XP_WIN) +#include "nsIEHistoryEnumerator.h" +#endif + +#include "rdf.h" +#include "nsFeedSniffer.h" +#include "AboutRedirector.h" +#include "nsIAboutModule.h" + +#include "nsNetCID.h" + +using namespace mozilla::browser; + +///////////////////////////////////////////////////////////////////////////// + +NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider) +#if defined(XP_WIN) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService) +#elif defined(XP_MACOSX) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService) +#elif defined(MOZ_WIDGET_GTK) +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init) +#endif + +#if defined(XP_WIN) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEHistoryEnumerator) +#endif + +NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer) + +NS_DEFINE_NAMED_CID(NS_BROWSERDIRECTORYPROVIDER_CID); +#if defined(XP_WIN) +NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID); +#elif defined(MOZ_WIDGET_GTK) +NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID); +#endif +NS_DEFINE_NAMED_CID(NS_FEEDSNIFFER_CID); +NS_DEFINE_NAMED_CID(NS_BROWSER_ABOUT_REDIRECTOR_CID); +#if defined(XP_WIN) +NS_DEFINE_NAMED_CID(NS_WINIEHISTORYENUMERATOR_CID); +#elif defined(XP_MACOSX) +NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID); +#endif + +static const mozilla::Module::CIDEntry kBrowserCIDs[] = { + { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, nullptr, DirectoryProviderConstructor }, +#if defined(XP_WIN) + { &kNS_SHELLSERVICE_CID, false, nullptr, nsWindowsShellServiceConstructor }, +#elif defined(MOZ_WIDGET_GTK) + { &kNS_SHELLSERVICE_CID, false, nullptr, nsGNOMEShellServiceConstructor }, +#endif + { &kNS_FEEDSNIFFER_CID, false, nullptr, nsFeedSnifferConstructor }, + { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, nullptr, AboutRedirector::Create }, +#if defined(XP_WIN) + { &kNS_WINIEHISTORYENUMERATOR_CID, false, nullptr, nsIEHistoryEnumeratorConstructor }, +#elif defined(XP_MACOSX) + { &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor }, +#endif + { nullptr } +}; + +static const mozilla::Module::ContractIDEntry kBrowserContracts[] = { + { NS_BROWSERDIRECTORYPROVIDER_CONTRACTID, &kNS_BROWSERDIRECTORYPROVIDER_CID }, +#if defined(XP_WIN) + { NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID }, +#elif defined(MOZ_WIDGET_GTK) + { NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID }, +#endif + { NS_FEEDSNIFFER_CONTRACTID, &kNS_FEEDSNIFFER_CID }, + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "blocked", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "certerror", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "socialerror", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "providerdirectory", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "tabcrashed", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "feeds", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "privatebrowsing", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "rights", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "robots", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "searchreset", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "sessionrestore", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "welcomeback", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "sync-tabs", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "home", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "newtab", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "preferences", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "downloads", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "accounts", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, +#ifdef MOZ_SERVICES_HEALTHREPORT + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "healthreport", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, +#endif + { NS_ABOUT_MODULE_CONTRACTID_PREFIX "reader", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, +#if defined(XP_WIN) + { NS_IEHISTORYENUMERATOR_CONTRACTID, &kNS_WINIEHISTORYENUMERATOR_CID }, +#elif defined(XP_MACOSX) + { NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID }, +#endif + { nullptr } +}; + +static const mozilla::Module::CategoryEntry kBrowserCategories[] = { + { XPCOM_DIRECTORY_PROVIDER_CATEGORY, "browser-directory-provider", NS_BROWSERDIRECTORYPROVIDER_CONTRACTID }, + { NS_CONTENT_SNIFFER_CATEGORY, "Feed Sniffer", NS_FEEDSNIFFER_CONTRACTID }, + { nullptr } +}; + +static const mozilla::Module kBrowserModule = { + mozilla::Module::kVersion, + kBrowserCIDs, + kBrowserContracts, + kBrowserCategories +}; + +NSMODULE_DEFN(nsBrowserCompsModule) = &kBrowserModule; diff --git a/browser/components/contextualidentity/content/usercontext.css b/browser/components/contextualidentity/content/usercontext.css new file mode 100644 index 000000000..728275d9f --- /dev/null +++ b/browser/components/contextualidentity/content/usercontext.css @@ -0,0 +1,91 @@ +[data-identity-color="blue"] { + --identity-tab-color: #0996f8; + --identity-icon-color: #00a7e0; +} + +[data-identity-color="turquoise"] { + --identity-tab-color: #01bdad; + --identity-icon-color: #01bdad; +} + +[data-identity-color="green"] { + --identity-tab-color: #57bd35; + --identity-icon-color: #7dc14c; +} + +[data-identity-color="yellow"] { + --identity-tab-color: #ffcb00; + --identity-icon-color: #ffcb00; +} + +[data-identity-color="orange"] { + --identity-tab-color: #ff9216; + --identity-icon-color: #ff9216; +} + +[data-identity-color="red"] { + --identity-tab-color: #d92215; + --identity-icon-color: #d92215; +} + +[data-identity-color="pink"] { + --identity-tab-color: #ea385e; + --identity-icon-color: #ee5195; +} + +[data-identity-color="purple"] { + --identity-tab-color: #7a2f7a; + --identity-icon-color: #7a2f7a; +} + +[data-identity-icon="fingerprint"] { + --identity-icon: url("chrome://browser/content/usercontext.svg#fingerprint"); +} + +[data-identity-icon="briefcase"] { + --identity-icon: url("chrome://browser/content/usercontext.svg#briefcase"); +} + +[data-identity-icon="dollar"] { + --identity-icon: url("chrome://browser/content/usercontext.svg#dollar"); +} + +[data-identity-icon="cart"] { + --identity-icon: url("chrome://browser/content/usercontext.svg#cart"); +} + +[data-identity-icon="circle"] { + --identity-icon: url("chrome://browser/content/usercontext.svg#circle"); +} + +#userContext-indicator { + height: 16px; + width: 16px; +} + +#userContext-label { + margin-inline-end: 3px; + color: var(--identity-tab-color); +} + +#userContext-icons { + -moz-box-align: center; +} + +.tabbrowser-tab[usercontextid] { + background-image: linear-gradient(to right, transparent 20%, var(--identity-tab-color) 30%, var(--identity-tab-color) 70%, transparent 80%); + background-size: auto 2px; + background-repeat: no-repeat; +} + +.userContext-icon, +.menuitem-iconic[data-usercontextid] > .menu-iconic-left > .menu-iconic-icon, +.subviewbutton[usercontextid] > .toolbarbutton-icon, +#userContext-indicator { + background-image: var(--identity-icon); + filter: url(chrome://browser/skin/filters.svg#fill); + fill: var(--identity-icon-color); + background-size: contain; + background-repeat: no-repeat; + background-position: center center; +} diff --git a/browser/components/contextualidentity/jar.mn b/browser/components/contextualidentity/jar.mn new file mode 100644 index 000000000..848245949 --- /dev/null +++ b/browser/components/contextualidentity/jar.mn @@ -0,0 +1,6 @@ +# 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/. + +browser.jar: + content/browser/usercontext/usercontext.css (content/usercontext.css) diff --git a/browser/components/contextualidentity/moz.build b/browser/components/contextualidentity/moz.build new file mode 100644 index 000000000..62d333db8 --- /dev/null +++ b/browser/components/contextualidentity/moz.build @@ -0,0 +1,14 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# 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/. + +BROWSER_CHROME_MANIFESTS += [ + 'test/browser/browser.ini', +] + +JAR_MANIFESTS += ['jar.mn'] + +with Files('**'): + BUG_COMPONENT = ('Firefox', 'Contextual Identity') diff --git a/browser/components/contextualidentity/test/browser/.eslintrc.js b/browser/components/contextualidentity/test/browser/.eslintrc.js new file mode 100644 index 000000000..e25a6863e --- /dev/null +++ b/browser/components/contextualidentity/test/browser/.eslintrc.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = { + "extends": [ + "../../../../../testing/mochitest/browser.eslintrc.js" + ], + + "rules": { + "no-undef": "error" + } +}; diff --git a/browser/components/contextualidentity/test/browser/browser.ini b/browser/components/contextualidentity/test/browser/browser.ini new file mode 100644 index 000000000..55083f8d2 --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser.ini @@ -0,0 +1,30 @@ +[DEFAULT] +support-files = + empty_file.html + file_reflect_cookie_into_title.html + favicon-normal32.png + file_set_storages.html + serviceworker.html + worker.js + +[browser_aboutURLs.js] +[browser_eme.js] +[browser_favicon.js] +[browser_forgetaboutsite.js] +[browser_forgetAPI_cookie_getCookiesWithOriginAttributes.js] +[browser_forgetAPI_EME_forgetThisSite.js] +[browser_forgetAPI_quota_clearStoragesForPrincipal.js] +[browser_newtabButton.js] +[browser_usercontext.js] +[browser_usercontextid_tabdrop.js] +skip-if = os == "mac" || os == "win" # Intermittent failure - bug 1268276 +[browser_windowName.js] +tags = openwindow +[browser_windowOpen.js] +tags = openwindow +[browser_serviceworkers.js] +[browser_broadcastchannel.js] +[browser_blobUrl.js] +[browser_middleClick.js] +[browser_imageCache.js] +[browser_count_and_remove.js] diff --git a/browser/components/contextualidentity/test/browser/browser_aboutURLs.js b/browser/components/contextualidentity/test/browser/browser_aboutURLs.js new file mode 100644 index 000000000..586bca37f --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_aboutURLs.js @@ -0,0 +1,49 @@ +"use strict"; + +// For some about: URLs, they will take more time to load and cause timeout. +// See Bug 1270998. +requestLongerTimeout(2); + +add_task(function* () { + let aboutURLs = []; + + // List of about: URLs that will initiate network requests. + let networkURLs = [ + "credits", + "telemetry" // about:telemetry will fetch Telemetry asynchrounously and takes + // longer, we skip this for now. + ]; + + let ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); + for (let cid in Cc) { + let result = cid.match(/@mozilla.org\/network\/protocol\/about;1\?what\=(.*)$/); + if (!result) { + continue; + } + + let aboutType = result[1]; + let contract = "@mozilla.org/network/protocol/about;1?what=" + aboutType; + try { + let am = Cc[contract].getService(Ci.nsIAboutModule); + let uri = ios.newURI("about:"+aboutType, null, null); + let flags = am.getURIFlags(uri); + if (!(flags & Ci.nsIAboutModule.HIDE_FROM_ABOUTABOUT) && + networkURLs.indexOf(aboutType) == -1) { + aboutURLs.push(aboutType); + } + } catch (e) { + // getService might have thrown if the component doesn't actually + // implement nsIAboutModule + } + } + + for (let url of aboutURLs) { + info("Loading about:" + url); + let tab = gBrowser.addTab("about:"+url, {userContextId: 1}); + yield BrowserTestUtils.browserLoaded(tab.linkedBrowser); + + ok(true, "Done loading about:" + url); + + yield BrowserTestUtils.removeTab(tab); + } +}); diff --git a/browser/components/contextualidentity/test/browser/browser_blobUrl.js b/browser/components/contextualidentity/test/browser/browser_blobUrl.js new file mode 100644 index 000000000..8a441311e --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_blobUrl.js @@ -0,0 +1,78 @@ +"use strict"; + +// Here we want to test that blob URLs are not available cross containers. + +const BASE_URI = "http://mochi.test:8888/browser/browser/components/" + + "contextualidentity/test/browser/empty_file.html"; + +add_task(function* setup() { + yield new Promise((resolve) => { + SpecialPowers.pushPrefEnv({"set": [ + ["privacy.userContext.enabled", true] + ]}, resolve); + }); +}); + + +add_task(function* test() { + info("Creating a tab with UCI = 1..."); + let tab1 = gBrowser.addTab(BASE_URI, {userContextId: 1}); + is(tab1.getAttribute('usercontextid'), 1, "New tab has UCI equal 1"); + + let browser1 = gBrowser.getBrowserForTab(tab1); + yield BrowserTestUtils.browserLoaded(browser1); + + let blobURL; + + info("Creating a blob URL..."); + yield ContentTask.spawn(browser1, null, function() { + return Promise.resolve(content.window.URL.createObjectURL(new content.window.Blob([123]))); + }).then(newURL => { blobURL = newURL }); + + info("Blob URL: " + blobURL); + + info("Creating a tab with UCI = 2..."); + let tab2 = gBrowser.addTab(BASE_URI, {userContextId: 2}); + is(tab2.getAttribute('usercontextid'), 2, "New tab has UCI equal 2"); + + let browser2 = gBrowser.getBrowserForTab(tab2); + yield BrowserTestUtils.browserLoaded(browser2); + + yield ContentTask.spawn(browser2, blobURL, function(url) { + return new Promise(resolve => { + var xhr = new content.window.XMLHttpRequest(); + xhr.onerror = function() { resolve("SendErrored"); } + xhr.onload = function() { resolve("SendLoaded"); } + xhr.open("GET", url); + xhr.send(); + }); + }).then(status => { + is(status, "SendErrored", "Using a blob URI from one user context id in another should not work"); + }); + + info("Creating a tab with UCI = 1..."); + let tab3 = gBrowser.addTab(BASE_URI, {userContextId: 1}); + is(tab3.getAttribute('usercontextid'), 1, "New tab has UCI equal 1"); + + let browser3 = gBrowser.getBrowserForTab(tab3); + yield BrowserTestUtils.browserLoaded(browser3); + + yield ContentTask.spawn(browser3, blobURL, function(url) { + return new Promise(resolve => { + var xhr = new content.window.XMLHttpRequest(); + xhr.open("GET", url); + try { + xhr.send(); + resolve("SendSucceeded"); + } catch (e) { + resolve("SendThrew"); + } + }); + }).then(status => { + is(status, "SendSucceeded", "Using a blob URI within a single user context id should work"); + }); + + yield BrowserTestUtils.removeTab(tab1); + yield BrowserTestUtils.removeTab(tab2); + yield BrowserTestUtils.removeTab(tab3); +}); diff --git a/browser/components/contextualidentity/test/browser/browser_broadcastchannel.js b/browser/components/contextualidentity/test/browser/browser_broadcastchannel.js new file mode 100644 index 000000000..a821ce96b --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_broadcastchannel.js @@ -0,0 +1,80 @@ +let { classes: Cc, interfaces: Ci } = Components; + +const BASE_ORIGIN = "http://example.com"; +const URI = BASE_ORIGIN + + "/browser/browser/components/contextualidentity/test/browser/empty_file.html"; + +// opens `uri' in a new tab with the provided userContextId and focuses it. +// returns the newly opened tab +function* openTabInUserContext(uri, userContextId) { + // open the tab in the correct userContextId + let tab = gBrowser.addTab(uri, {userContextId}); + + // select tab and make sure its browser is focused + gBrowser.selectedTab = tab; + tab.ownerGlobal.focus(); + + let browser = gBrowser.getBrowserForTab(tab); + yield BrowserTestUtils.browserLoaded(browser); + return {tab, browser}; +} + +add_task(function* setup() { + // make sure userContext is enabled. + yield new Promise(resolve => { + SpecialPowers.pushPrefEnv({"set": [ + ["privacy.userContext.enabled", true] + ]}, resolve); + }); +}); + +add_task(function* test() { + let receiver = yield* openTabInUserContext(URI, 2); + + let channelName = "contextualidentity-broadcastchannel"; + + // reflect the received message on title + yield ContentTask.spawn(receiver.browser, channelName, + function (name) { + content.window.testPromise = new content.window.Promise(resolve => { + content.window.bc = new content.window.BroadcastChannel(name); + content.window.bc.onmessage = function (e) { + content.document.title += e.data; + resolve(); + } + }); + } + ); + + let sender1 = yield* openTabInUserContext(URI, 1); + let sender2 = yield* openTabInUserContext(URI, 2); + sender1.message = "Message from user context #1"; + sender2.message = "Message from user context #2"; + + // send a message from a tab in different user context first + // then send a message from a tab in the same user context + for (let sender of [sender1, sender2]) { + yield ContentTask.spawn( + sender.browser, + { name: channelName, message: sender.message }, + function (opts) { + let bc = new content.window.BroadcastChannel(opts.name); + bc.postMessage(opts.message); + }); + } + + // Since sender1 sends before sender2, if the title is exactly + // sender2's message, sender1's message must've been blocked + yield ContentTask.spawn(receiver.browser, sender2.message, + function* (message) { + yield content.window.testPromise.then(function() { + is(content.document.title, message, + "should only receive messages from the same user context"); + }); + } + ); + + gBrowser.removeTab(sender1.tab); + gBrowser.removeTab(sender2.tab); + gBrowser.removeTab(receiver.tab); +}); diff --git a/browser/components/contextualidentity/test/browser/browser_count_and_remove.js b/browser/components/contextualidentity/test/browser/browser_count_and_remove.js new file mode 100644 index 000000000..23b7e948a --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_count_and_remove.js @@ -0,0 +1,34 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components; + +Cu.import("resource://gre/modules/ContextualIdentityService.jsm"); + +function openTabInUserContext(userContextId) { + let tab = gBrowser.addTab("about:blank", {userContextId}); + gBrowser.selectedTab = tab; +} + +add_task(function* setup() { + // make sure userContext is enabled. + yield SpecialPowers.pushPrefEnv({"set": [ + ["privacy.userContext.enabled", true] + ]}); +}); + +add_task(function* test() { + is(ContextualIdentityService.countContainerTabs(), 0, "0 container tabs by default."); + + openTabInUserContext(1); + is(ContextualIdentityService.countContainerTabs(), 1, "1 container tab created"); + + openTabInUserContext(1); + is(ContextualIdentityService.countContainerTabs(), 2, "2 container tab created"); + + openTabInUserContext(2); + is(ContextualIdentityService.countContainerTabs(), 3, "3 container tab created"); + + ContextualIdentityService.closeAllContainerTabs(); + is(ContextualIdentityService.countContainerTabs(), 0, "0 container tab at the end."); +}); diff --git a/browser/components/contextualidentity/test/browser/browser_eme.js b/browser/components/contextualidentity/test/browser/browser_eme.js new file mode 100644 index 000000000..557648d60 --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_eme.js @@ -0,0 +1,186 @@ +/* + * Bug 1283325 - A test case to test the EME is originAttributes aware or not. + */ +const { classes: Cc, Constructor: CC, interfaces: Ci, utils: Cu } = Components; + +const TEST_HOST = "example.com"; +const TEST_URL = "http://" + TEST_HOST + "/browser/browser/components/contextualidentity/test/browser/"; + +const TESTKEY = { + initDataType: 'keyids', + initData: '{"kids":["LwVHf8JLtPrv2GUXFW2v_A"], "type":"persistent-license"}', + kid: "LwVHf8JLtPrv2GUXFW2v_A", + key: "97b9ddc459c8d5ff23c1f2754c95abe8", + sessionType: 'persistent-license', +}; + +const USER_ID_DEFAULT = 0; +const USER_ID_PERSONAL = 1; + +function* openTabInUserContext(uri, userContextId) { + // Open the tab in the correct userContextId. + let tab = gBrowser.addTab(uri, {userContextId}); + + // Select tab and make sure its browser is focused. + gBrowser.selectedTab = tab; + tab.ownerDocument.defaultView.focus(); + + let browser = gBrowser.getBrowserForTab(tab); + yield BrowserTestUtils.browserLoaded(browser); + return {tab, browser}; +} + +function HexToBase64(hex) +{ + var bin = ""; + for (var i = 0; i < hex.length; i += 2) { + bin += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); + } + return window.btoa(bin).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); +} + +function Base64ToHex(str) +{ + var bin = window.atob(str.replace(/-/g, "+").replace(/_/g, "/")); + var res = ""; + for (var i = 0; i < bin.length; i++) { + res += ("0" + bin.charCodeAt(i).toString(16)).substr(-2); + } + return res; +} + +function ByteArrayToHex(array) { + let bin = String.fromCharCode.apply(null, new Uint8Array(array)); + let res = ""; + + for (let i = 0; i < bin.length; i++) { + res += ("0" + bin.charCodeAt(i).toString(16)).substr(-2); + } + + return res; +} + +function generateKeyObject(aKid, aKey) { + let keyObj = { + kty: 'oct', + kid: aKid, + k: HexToBase64(aKey), + }; + + return new TextEncoder().encode(JSON.stringify({ + keys: [keyObj] + })); +} + +function generateKeyInfo(aData) { + let keyInfo = { + initDataType: aData.initDataType, + initData: new TextEncoder().encode(aData.initData), + sessionType: aData.sessionType, + keyObj: generateKeyObject(aData.kid, aData.key), + }; + + return keyInfo; +} + +add_task(function* setup() { + // Make sure userContext is enabled. + yield new Promise(resolve => { + SpecialPowers.pushPrefEnv({"set": [ + [ "privacy.userContext.enabled", true ], + [ "media.mediasource.enabled", true ], + [ "media.eme.apiVisible", true ], + [ "media.mediasource.webm.enabled", true ], + [ "media.clearkey.persistent-license.enabled", true ], + ]}, resolve); + }); +}); + +add_task(function* test() { + // Open a tab with the default container. + let defaultContainer = yield openTabInUserContext(TEST_URL + "empty_file.html", USER_ID_DEFAULT); + + // Generate the key info for the default container. + let keyInfo = generateKeyInfo(TESTKEY); + + // Update the media key for the default container. + let result = yield ContentTask.spawn(defaultContainer.browser, keyInfo, function* (aKeyInfo) { + let access = yield content.navigator.requestMediaKeySystemAccess('org.w3.clearkey', + [{ + initDataTypes: [aKeyInfo.initDataType], + videoCapabilities: [{contentType: 'video/webm'}], + sessionTypes: ['persistent-license'], + persistentState: 'required', + }]); + let mediaKeys = yield access.createMediaKeys(); + let session = mediaKeys.createSession(aKeyInfo.sessionType); + let res = {}; + + // Insert the media key. + yield new Promise(resolve => { + session.addEventListener("message", function(event) { + session.update(aKeyInfo.keyObj).then( + () => { resolve(); } + ).catch( + () => { + ok(false, "Update the media key fail."); + resolve(); + } + ); + }); + + session.generateRequest(aKeyInfo.initDataType, aKeyInfo.initData); + }); + + let map = session.keyStatuses; + + is(map.size, 1, "One media key has been added."); + + if (map.size === 1) { + res.keyId = map.keys().next().value; + res.sessionId = session.sessionId; + } + + // Close the session. + session.close(); + yield session.closed; + + return res; + }); + + // Check the media key ID. + is(ByteArrayToHex(result.keyId), Base64ToHex(TESTKEY.kid), "The key Id of the default container is correct."); + + // Store the sessionId for the further checking. + keyInfo.sessionId = result.sessionId; + + // Open a tab with personal container. + let personalContainer = yield openTabInUserContext(TEST_URL + "empty_file.html", USER_ID_PERSONAL); + + yield ContentTask.spawn(personalContainer.browser, keyInfo, function* (aKeyInfo) { + let access = yield content.navigator.requestMediaKeySystemAccess('org.w3.clearkey', + [{ + initDataTypes: [aKeyInfo.initDataType], + videoCapabilities: [{contentType: 'video/webm'}], + sessionTypes: ['persistent-license'], + persistentState: 'required', + }]); + let mediaKeys = yield access.createMediaKeys(); + let session = mediaKeys.createSession(aKeyInfo.sessionType); + + // First, load the session to check that mediakeys do not share with + // default container. + yield session.load(aKeyInfo.sessionId); + + let map = session.keyStatuses; + + // Check that there is no media key here. + is(map.size, 0, "No media key should be here for the personal container."); + }); + + // Close default container tab. + yield BrowserTestUtils.removeTab(defaultContainer.tab); + + // Close personal container tab. + yield BrowserTestUtils.removeTab(personalContainer.tab); +}); diff --git a/browser/components/contextualidentity/test/browser/browser_favicon.js b/browser/components/contextualidentity/test/browser/browser_favicon.js new file mode 100644 index 000000000..a0a7eb208 --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_favicon.js @@ -0,0 +1,140 @@ +/* + * Bug 1270678 - A test case to test does the favicon obey originAttributes. + */ +let { classes: Cc, interfaces: Ci, utils: Cu } = Components; + +Cu.import("resource://gre/modules/PlacesUtils.jsm"); +Cu.import("resource://gre/modules/NetUtil.jsm"); +let {HttpServer} = Cu.import("resource://testing-common/httpd.js", {}); + +const USER_CONTEXTS = [ + "default", + "personal", + "work", +]; + +let gHttpServer = null; +let gUserContextId; +let gFaviconData; + +function getIconFile() { + new Promise(resolve => { + NetUtil.asyncFetch({ + uri: "http://www.example.com/browser/browser/components/contextualidentity/test/browser/favicon-normal32.png", + loadUsingSystemPrincipal: true, + contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_IMAGE_FAVICON + }, function(inputStream, status) { + let size = inputStream.available(); + gFaviconData = NetUtil.readInputStreamToString(inputStream, size); + resolve(); + }); + }); +} + +function* openTabInUserContext(uri, userContextId) { + // open the tab in the correct userContextId + let tab = gBrowser.addTab(uri, {userContextId}); + + // select tab and make sure its browser is focused + gBrowser.selectedTab = tab; + tab.ownerGlobal.focus(); + + let browser = gBrowser.getBrowserForTab(tab); + yield BrowserTestUtils.browserLoaded(browser); + return {tab, browser}; +} + +function loadIndexHandler(metadata, response) { + response.setStatusLine(metadata.httpVersion, 200, "Ok"); + response.setHeader("Content-Type", "text/html", false); + let body = ` + + + + + Favicon Test + + + Favicon!! + + `; + response.bodyOutputStream.write(body, body.length); +} + +function loadFaviconHandler(metadata, response) { + let expectedCookie = "userContext=" + USER_CONTEXTS[gUserContextId]; + + if (metadata.hasHeader("Cookie")) { + is(metadata.getHeader("Cookie"), expectedCookie, "The cookie has matched with the expected cookie."); + } else { + ok(false, "The request should have a cookie."); + } + + response.setStatusLine(metadata.httpVersion, 200, "Ok"); + response.setHeader("Content-Type", "image/png", false); + response.bodyOutputStream.write(gFaviconData, gFaviconData.length); +} + +add_task(function* setup() { + // Make sure userContext is enabled. + yield new Promise(resolve => { + SpecialPowers.pushPrefEnv({"set": [ + ["privacy.userContext.enabled", true] + ]}, resolve); + }); + + // Create a http server for the image cache test. + if (!gHttpServer) { + gHttpServer = new HttpServer(); + gHttpServer.registerPathHandler('/', loadIndexHandler); + gHttpServer.registerPathHandler('/favicon.png', loadFaviconHandler); + gHttpServer.start(-1); + } +}); + +registerCleanupFunction(() => { + gHttpServer.stop(() => { + gHttpServer = null; + }); +}); + +add_task(function* test() { + waitForExplicitFinish(); + + // First, get the icon data. + yield getIconFile(); + + let serverPort = gHttpServer.identity.primaryPort; + let testURL = "http://localhost:" + serverPort + "/"; + let testFaviconURL = "http://localhost:" + serverPort + "/favicon.png"; + + for (let userContextId of Object.keys(USER_CONTEXTS)) { + gUserContextId = userContextId; + + // Load the page in 3 different contexts and set a cookie + // which should only be visible in that context. + + // Open our tab in the given user context. + let tabInfo = yield* openTabInUserContext(testURL, userContextId); + + // Write a cookie according to the userContext. + yield ContentTask.spawn(tabInfo.browser, { userContext: USER_CONTEXTS[userContextId] }, function (arg) { + content.document.cookie = "userContext=" + arg.userContext; + }); + + let pageURI = NetUtil.newURI(testURL); + let favIconURI = NetUtil.newURI(testFaviconURL); + + yield new Promise(resolve => { + PlacesUtils.favicons.setAndFetchFaviconForPage(pageURI, favIconURI, + true, PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE, { + onComplete() { + resolve(); + }, + }, + tabInfo.browser.contentPrincipal); + }); + + yield BrowserTestUtils.removeTab(tabInfo.tab); + } +}); diff --git a/browser/components/contextualidentity/test/browser/browser_forgetAPI_EME_forgetThisSite.js b/browser/components/contextualidentity/test/browser/browser_forgetAPI_EME_forgetThisSite.js new file mode 100644 index 000000000..1a97448c0 --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_forgetAPI_EME_forgetThisSite.js @@ -0,0 +1,219 @@ +/* + * Bug 1278037 - A Test case for checking whether forgetting APIs are working for the media key. + */ + +const { classes: Cc, Constructor: CC, interfaces: Ci, utils: Cu } = Components; + +const TEST_HOST = "example.com"; +const TEST_URL = "http://" + TEST_HOST + "/browser/browser/components/contextualidentity/test/browser/"; + +const USER_CONTEXTS = [ + "default", + "personal", +]; + +const TEST_EME_KEY = { + initDataType: 'keyids', + initData: '{"kids":["LwVHf8JLtPrv2GUXFW2v_A"], "type":"persistent-license"}', + kid: "LwVHf8JLtPrv2GUXFW2v_A", + key: "97b9ddc459c8d5ff23c1f2754c95abe8", + sessionType: 'persistent-license', +}; + +// +// Support functions. +// + +function* openTabInUserContext(uri, userContextId) { + // Open the tab in the correct userContextId. + let tab = gBrowser.addTab(uri, {userContextId}); + + // Select tab and make sure its browser is focused. + gBrowser.selectedTab = tab; + tab.ownerGlobal.focus(); + + let browser = gBrowser.getBrowserForTab(tab); + yield BrowserTestUtils.browserLoaded(browser); + return {tab, browser}; +} + +function HexToBase64(hex) { + var bin = ""; + for (var i = 0; i < hex.length; i += 2) { + bin += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); + } + return window.btoa(bin).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); +} + +function Base64ToHex(str) { + var bin = window.atob(str.replace(/-/g, "+").replace(/_/g, "/")); + var res = ""; + for (var i = 0; i < bin.length; i++) { + res += ("0" + bin.charCodeAt(i).toString(16)).substr(-2); + } + return res; +} + +function ByteArrayToHex(array) { + let bin = String.fromCharCode.apply(null, new Uint8Array(array)); + let res = ""; + + for (let i = 0; i < bin.length; i++) { + res += ("0" + bin.charCodeAt(i).toString(16)).substr(-2); + } + + return res; +} + +function generateKeyObject(aKid, aKey) { + let keyObj = { + kty: 'oct', + kid: aKid, + k: HexToBase64(aKey), + }; + + return new TextEncoder().encode(JSON.stringify({ + keys: [keyObj] + })); +} + +function generateKeyInfo(aData) { + let keyInfo = { + initDataType: aData.initDataType, + initData: new TextEncoder().encode(aData.initData), + sessionType: aData.sessionType, + keyObj: generateKeyObject(aData.kid, aData.key), + }; + + return keyInfo; +} + +// Setup a EME key for the given browser, and return the sessionId. +function* setupEMEKey(browser) { + // Generate the key info. + let keyInfo = generateKeyInfo(TEST_EME_KEY); + + // Setup the EME key. + let result = yield ContentTask.spawn(browser, keyInfo, function* (aKeyInfo) { + let access = yield content.navigator.requestMediaKeySystemAccess('org.w3.clearkey', + [{ + initDataTypes: [aKeyInfo.initDataType], + videoCapabilities: [{contentType: 'video/webm'}], + sessionTypes: ['persistent-license'], + persistentState: 'required', + }]); + let mediaKeys = yield access.createMediaKeys(); + let session = mediaKeys.createSession(aKeyInfo.sessionType); + let res = {}; + + // Insert the EME key. + yield new Promise(resolve => { + session.addEventListener("message", function(event) { + session.update(aKeyInfo.keyObj).then( + () => { resolve(); } + ).catch( + () => { + ok(false, "Update the EME key fail."); + resolve(); + } + ); + }); + + session.generateRequest(aKeyInfo.initDataType, aKeyInfo.initData); + }); + + let map = session.keyStatuses; + + is(map.size, 1, "One EME key has been added."); + + if (map.size === 1) { + res.keyId = map.keys().next().value; + res.sessionId = session.sessionId; + } + + // Close the session. + session.close(); + yield session.closed; + + return res; + }); + + // Check the EME key ID. + is(ByteArrayToHex(result.keyId), Base64ToHex(TEST_EME_KEY.kid), "The key Id is correct."); + return result.sessionId; +} + +// Check whether the EME key has been cleared. +function* checkEMEKey(browser, emeSessionId) { + // Generate the key info. + let keyInfo = generateKeyInfo(TEST_EME_KEY); + keyInfo.sessionId = emeSessionId; + + yield ContentTask.spawn(browser, keyInfo, function* (aKeyInfo) { + let access = yield content.navigator.requestMediaKeySystemAccess('org.w3.clearkey', + [{ + initDataTypes: [aKeyInfo.initDataType], + videoCapabilities: [{contentType: 'video/webm'}], + sessionTypes: ['persistent-license'], + persistentState: 'required', + }]); + let mediaKeys = yield access.createMediaKeys(); + let session = mediaKeys.createSession(aKeyInfo.sessionType); + + // First, load the session with the sessionId. + yield session.load(aKeyInfo.sessionId); + + let map = session.keyStatuses; + + // Check that there is no media key here. + is(map.size, 0, "No media key should be here after forgetThisSite() was called."); + }); +} + +// +// Test functions. +// + +add_task(function* setup() { + // Make sure userContext is enabled. + yield SpecialPowers.pushPrefEnv({"set": [ + [ "privacy.userContext.enabled", true ], + [ "media.mediasource.enabled", true ], + [ "media.eme.apiVisible", true ], + [ "media.mediasource.webm.enabled", true ], + [ "media.clearkey.persistent-license.enabled", true ], + ]}); +}); + +add_task(function* test_EME_forgetThisSite() { + let tabs = []; + let emeSessionIds = []; + + for (let userContextId of Object.keys(USER_CONTEXTS)) { + // Open our tab in the given user context. + tabs[userContextId] = yield* openTabInUserContext(TEST_URL+ "empty_file.html", userContextId); + + // Setup EME Key. + emeSessionIds[userContextId] = yield setupEMEKey(tabs[userContextId].browser); + + // Close this tab. + yield BrowserTestUtils.removeTab(tabs[userContextId].tab); + } + + // Clear all EME data for a given domain with originAttributes pattern. + let mps = Cc["@mozilla.org/gecko-media-plugin-service;1"]. + getService(Ci.mozIGeckoMediaPluginChromeService); + mps.forgetThisSite(TEST_HOST, JSON.stringify({})); + + // Open tabs again to check EME keys have been cleared. + for (let userContextId of Object.keys(USER_CONTEXTS)) { + // Open our tab in the given user context. + tabs[userContextId] = yield* openTabInUserContext(TEST_URL+ "empty_file.html", userContextId); + + // Check whether EME Key has been cleared. + yield checkEMEKey(tabs[userContextId].browser, emeSessionIds[userContextId]); + + // Close this tab. + yield BrowserTestUtils.removeTab(tabs[userContextId].tab); + } +}); diff --git a/browser/components/contextualidentity/test/browser/browser_forgetAPI_cookie_getCookiesWithOriginAttributes.js b/browser/components/contextualidentity/test/browser/browser_forgetAPI_cookie_getCookiesWithOriginAttributes.js new file mode 100644 index 000000000..1d9024d25 --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_forgetAPI_cookie_getCookiesWithOriginAttributes.js @@ -0,0 +1,86 @@ +/* + * Bug 1278037 - A Test case for checking whether forgetting APIs are working for cookies. + */ + +const { classes: Cc, Constructor: CC, interfaces: Ci, utils: Cu } = Components; + +const TEST_HOST = "example.com"; +const TEST_URL = "http://" + TEST_HOST + "/browser/browser/components/contextualidentity/test/browser/"; + +const USER_CONTEXTS = [ + "default", + "personal", +]; + +// +// Support functions. +// + +function* openTabInUserContext(uri, userContextId) { + // Open the tab in the correct userContextId. + let tab = gBrowser.addTab(uri, {userContextId}); + + // Select tab and make sure its browser is focused. + gBrowser.selectedTab = tab; + tab.ownerGlobal.focus(); + + let browser = gBrowser.getBrowserForTab(tab); + yield BrowserTestUtils.browserLoaded(browser); + return {tab, browser}; +} + +function getCookiesForOA(host, userContextId) { + return Services.cookies.getCookiesFromHost(host, {userContextId}); +} + +// +// Test functions. +// + +add_task(function* setup() { + // Make sure userContext is enabled. + yield SpecialPowers.pushPrefEnv({"set": [ + [ "privacy.userContext.enabled", true ], + ]}); +}); + +add_task(function* test_cookie_getCookiesWithOriginAttributes() { + let tabs = []; + let cookieName = "userContextId"; + + for (let userContextId of Object.keys(USER_CONTEXTS)) { + // Load the page in 2 different contexts and set a cookie + // which should only be visible in that context. + let value = USER_CONTEXTS[userContextId]; + + // Open our tab in the given user context. + tabs[userContextId] = yield* openTabInUserContext(TEST_URL+ "file_reflect_cookie_into_title.html?" + value, userContextId); + + // Close this tab. + yield BrowserTestUtils.removeTab(tabs[userContextId].tab); + } + + // Check that cookies have been set properly. + for (let userContextId of Object.keys(USER_CONTEXTS)) { + let enumerator = getCookiesForOA(TEST_HOST, userContextId); + ok(enumerator.hasMoreElements(), "Cookies available"); + + let foundCookie = enumerator.getNext().QueryInterface(Ci.nsICookie2); + is(foundCookie["name"], cookieName, "Check cookie name"); + is(foundCookie["value"], USER_CONTEXTS[userContextId], "Check cookie value"); + } + + // Using getCookiesWithOriginAttributes() to get all cookies for a certain + // domain by using the originAttributes pattern, and clear all these cookies. + let enumerator = Services.cookies.getCookiesWithOriginAttributes(JSON.stringify({}), TEST_HOST); + while (enumerator.hasMoreElements()) { + let cookie = enumerator.getNext().QueryInterface(Ci.nsICookie); + Services.cookies.remove(cookie.host, cookie.name, cookie.path, false, cookie.originAttributes); + } + + // Check that whether cookies has been cleared. + for (let userContextId of Object.keys(USER_CONTEXTS)) { + let enumerator = getCookiesForOA(TEST_HOST, userContextId); + ok(!enumerator.hasMoreElements(), "No Cookie should be here"); + } +}); diff --git a/browser/components/contextualidentity/test/browser/browser_forgetAPI_quota_clearStoragesForPrincipal.js b/browser/components/contextualidentity/test/browser/browser_forgetAPI_quota_clearStoragesForPrincipal.js new file mode 100644 index 000000000..6a4b37c55 --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_forgetAPI_quota_clearStoragesForPrincipal.js @@ -0,0 +1,147 @@ +/* + * Bug 1278037 - A Test case for checking whether forgetting APIs are working for the quota manager. + */ + +const { classes: Cc, Constructor: CC, interfaces: Ci, utils: Cu } = Components; + +const TEST_HOST = "example.com"; +const TEST_URL = "http://" + TEST_HOST + "/browser/browser/components/contextualidentity/test/browser/"; + +const USER_CONTEXTS = [ + "default", + "personal", +]; + +// +// Support functions. +// + +function* openTabInUserContext(uri, userContextId) { + // Open the tab in the correct userContextId. + let tab = gBrowser.addTab(uri, {userContextId}); + + // Select tab and make sure its browser is focused. + gBrowser.selectedTab = tab; + tab.ownerGlobal.focus(); + + let browser = gBrowser.getBrowserForTab(tab); + yield BrowserTestUtils.browserLoaded(browser); + return {tab, browser}; +} + +// Setup an entry for the indexedDB. +function* setupIndexedDB(browser) { + yield ContentTask.spawn(browser, { input: "TestForgetAPIs" }, function* (arg) { + let request = content.indexedDB.open("idb", 1); + + request.onerror = function() { + throw new Error("error opening db connection"); + }; + + request.onupgradeneeded = event => { + let db = event.target.result; + let store = db.createObjectStore("obj", { keyPath: "id" }); + store.createIndex("userContext", "userContext", { unique: false }); + }; + + let db = yield new Promise(resolve => { + request.onsuccess = event => { + resolve(event.target.result); + }; + }); + + // Add an entry into the indexedDB. + let transaction = db.transaction(["obj"], "readwrite"); + let store = transaction.objectStore("obj"); + store.add({id: 1, userContext: arg.input}); + + yield new Promise(resolve => { + transaction.oncomplete = () => { + resolve(); + }; + }); + + // Check the indexedDB has been set properly. + transaction = db.transaction(["obj"], "readonly"); + store = transaction.objectStore("obj"); + let getRequest = store.get(1); + yield new Promise(resolve => { + getRequest.onsuccess = () => { + let res = getRequest.result; + is(res.userContext, arg.input, "Check the indexedDB value"); + resolve(); + }; + }); + }); +} + +// Check whether the indexedDB has been cleared. +function* checkIndexedDB(browser) { + yield ContentTask.spawn(browser, null, function* () { + let request = content.indexedDB.open("idb", 1); + + let db = yield new Promise(done => { + request.onsuccess = event => { + done(event.target.result); + }; + }); + + try { + db.transaction(["obj"], "readonly"); + ok(false, "The indexedDB should not exist"); + } catch (e) { + is(e.name, "NotFoundError", "The indexedDB does not exist as expected"); + } + }); +} + +// +// Test functions. +// + +add_task(function* setup() { + // Make sure userContext is enabled. + yield SpecialPowers.pushPrefEnv({"set": [ + [ "privacy.userContext.enabled", true ], + ]}); +}); + +add_task(function* test_quota_clearStoragesForPrincipal() { + let tabs = []; + + for (let userContextId of Object.keys(USER_CONTEXTS)) { + // Open our tab in the given user context. + tabs[userContextId] = yield* openTabInUserContext(TEST_URL+ "empty_file.html", userContextId); + + // Setup an entry for the indexedDB. + yield setupIndexedDB(tabs[userContextId].browser); + + // Close this tab. + yield BrowserTestUtils.removeTab(tabs[userContextId].tab); + } + + // Using quota manager to clear all indexed DB for a given domain. + let qms = Cc["@mozilla.org/dom/quota-manager-service;1"]. + getService(Ci.nsIQuotaManagerService); + + let caUtils = {}; + let scriptLoader = Cc["@mozilla.org/moz/jssubscript-loader;1"]. + getService(Ci.mozIJSSubScriptLoader); + scriptLoader.loadSubScript("chrome://global/content/contentAreaUtils.js", + caUtils); + let httpURI = caUtils.makeURI("http://" + TEST_HOST); + let httpPrincipal = Services.scriptSecurityManager + .createCodebasePrincipal(httpURI, {}); + qms.clearStoragesForPrincipal(httpPrincipal, null, true); + + for (let userContextId of Object.keys(USER_CONTEXTS)) { + // Open our tab in the given user context. + tabs[userContextId] = yield* openTabInUserContext(TEST_URL+ "empty_file.html", userContextId); + + // Check whether indexed DB has been cleared. + yield checkIndexedDB(tabs[userContextId].browser); + + // Close this tab. + yield BrowserTestUtils.removeTab(tabs[userContextId].tab); + } +}); diff --git a/browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js b/browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js new file mode 100644 index 000000000..9efc86e0c --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js @@ -0,0 +1,352 @@ +/* + * Bug 1238183 - Test cases for forgetAboutSite with userContextId. + */ + +const { classes: Cc, Constructor: CC, interfaces: Ci, utils: Cu } = Components; + +Cu.import("resource://gre/modules/ForgetAboutSite.jsm"); +Cu.import("resource://gre/modules/Services.jsm"); +let {HttpServer} = Cu.import("resource://testing-common/httpd.js", {}); +let LoadContextInfo = Cc["@mozilla.org/load-context-info-factory;1"] + .getService(Ci.nsILoadContextInfoFactory); +let css = Cc["@mozilla.org/netwerk/cache-storage-service;1"] + .getService(Ci.nsICacheStorageService); + +const USER_CONTEXTS = [ + "default", + "personal", +]; +const TEST_HOST = "example.com"; +const TEST_URL = "http://" + TEST_HOST + "/browser/browser/components/contextualidentity/test/browser/"; +const COOKIE_NAME = "userContextId"; + +// Counter for image load hits. +let gHits = 0; + +let gHttpServer = null; + +function imageHandler(metadata, response) { + // A 1x1 PNG image. + // Source: https://commons.wikimedia.org/wiki/File:1x1.png (Public Domain) + const IMAGE = atob("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAA" + + "ACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII="); + gHits++; + response.setHeader("Cache-Control", "max-age=10000", false); + response.setStatusLine(metadata.httpVersion, 200, "OK"); + response.setHeader("Content-Type", "image/png", false); + response.write(IMAGE); +} + +function loadImagePageHandler(metadata, response) { + response.setHeader("Cache-Control", "max-age=10000", false); + response.setStatusLine(metadata.httpVersion, 200, "Ok"); + response.setHeader("Content-Type", "text/html", false); + let body = "\ + \ + \ + \ + Load Image\ + \ + \ + \ + \ + "; + response.bodyOutputStream.write(body, body.length); +} + +function* openTabInUserContext(uri, userContextId) { + // Open the tab in the correct userContextId. + let tab = gBrowser.addTab(uri, {userContextId}); + + // Select tab and make sure its browser is focused. + gBrowser.selectedTab = tab; + tab.ownerGlobal.focus(); + + let browser = gBrowser.getBrowserForTab(tab); + yield BrowserTestUtils.browserLoaded(browser); + return {tab, browser}; +} + +function getCookiesForOA(host, userContextId) { + return Services.cookies.getCookiesFromHost(host, {userContextId}); +} + +function createURI(uri) +{ + let ioServ = Cc["@mozilla.org/network/io-service;1"] + .getService(Components.interfaces.nsIIOService); + return ioServ.newURI(uri, null, null); +} + +function getCacheStorage(where, lci, appcache) +{ + if (!lci) lci = LoadContextInfo.default; + switch (where) { + case "disk": return css.diskCacheStorage(lci, false); + case "memory": return css.memoryCacheStorage(lci); + case "appcache": return css.appCacheStorage(lci, appcache); + case "pin": return css.pinningCacheStorage(lci); + } + return null; +} + +function OpenCacheEntry(key, where, flags, lci) +{ + return new Promise(resolve => { + key = createURI(key); + function CacheListener() { } + CacheListener.prototype = { + _appCache: null, + + QueryInterface: function (iid) { + if (iid.equals(Components.interfaces.nsICacheEntryOpenCallback) || + iid.equals(Components.interfaces.nsISupports)) + return this; + throw Components.results.NS_ERROR_NO_INTERFACE; + }, + + onCacheEntryCheck: function(entry, appCache) { + return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED; + }, + + onCacheEntryAvailable: function (entry, isnew, appCache, status) { + resolve(); + }, + + run: function () { + let storage = getCacheStorage(where, lci, this._appCache); + storage.asyncOpenURI(key, "", flags, this); + } + }; + + (new CacheListener()).run(); + }); +} + +// +// Test functions. +// + +// Cookies +function* test_cookie_cleared() { + let tabs = []; + + for (let userContextId of Object.keys(USER_CONTEXTS)) { + // Load the page in 2 different contexts and set a cookie + // which should only be visible in that context. + let value = USER_CONTEXTS[userContextId]; + + // Open our tab in the given user context. + tabs[userContextId] = yield* openTabInUserContext(TEST_URL+ "file_reflect_cookie_into_title.html?" + value, userContextId); + + // Close this tab. + yield BrowserTestUtils.removeTab(tabs[userContextId].tab); + } + // Check that cookies have been set properly. + for (let userContextId of Object.keys(USER_CONTEXTS)) { + let enumerator = getCookiesForOA(TEST_HOST, userContextId); + ok(enumerator.hasMoreElements(), "Cookies available"); + + let foundCookie = enumerator.getNext().QueryInterface(Ci.nsICookie2); + Assert.equal(foundCookie["name"], COOKIE_NAME, "Check cookie name"); + Assert.equal(foundCookie["value"], USER_CONTEXTS[userContextId], "Check cookie value"); + } + + // Forget the site. + ForgetAboutSite.removeDataFromDomain(TEST_HOST); + + // Check that whether cookies has been cleared or not. + for (let userContextId of Object.keys(USER_CONTEXTS)) { + let enumerator = getCookiesForOA(TEST_HOST, userContextId); + ok(!enumerator.hasMoreElements(), "No Cookie should be here"); + } +} + +// Cache +function* test_cache_cleared() { + // First, add some caches. + for (let userContextId of Object.keys(USER_CONTEXTS)) { + yield OpenCacheEntry("http://" + TEST_HOST + "/", + "disk", + Ci.nsICacheStorage.OPEN_NORMALLY, + LoadContextInfo.custom(false, {userContextId})); + + yield OpenCacheEntry("http://" + TEST_HOST + "/", + "memory", + Ci.nsICacheStorage.OPEN_NORMALLY, + LoadContextInfo.custom(false, {userContextId})); + } + + + // Check that caches have been set correctly. + for (let userContextId of Object.keys(USER_CONTEXTS)) { + let mem = getCacheStorage("memory", LoadContextInfo.custom(false, {userContextId})); + let disk = getCacheStorage("disk", LoadContextInfo.custom(false, {userContextId})); + + Assert.ok(mem.exists(createURI("http://" + TEST_HOST + "/"), ""), "The memory cache has been set correctly"); + Assert.ok(disk.exists(createURI("http://" + TEST_HOST + "/"), ""), "The disk cache has been set correctly"); + } + + // Forget the site. + ForgetAboutSite.removeDataFromDomain(TEST_HOST); + + // Check that do caches be removed or not? + for (let userContextId of Object.keys(USER_CONTEXTS)) { + let mem = getCacheStorage("memory", LoadContextInfo.custom(false, {userContextId})); + let disk = getCacheStorage("disk", LoadContextInfo.custom(false, {userContextId})); + + Assert.ok(!mem.exists(createURI("http://" + TEST_HOST + "/"), ""), "The memory cache is cleared"); + Assert.ok(!disk.exists(createURI("http://" + TEST_HOST + "/"), ""), "The disk cache is cleared"); + } +} + +// Image Cache +function* test_image_cache_cleared() { + let tabs = []; + + for (let userContextId of Object.keys(USER_CONTEXTS)) { + // Open our tab in the given user context to cache image. + tabs[userContextId] = yield* openTabInUserContext('http://localhost:' + gHttpServer.identity.primaryPort + '/loadImage.html', + userContextId); + yield BrowserTestUtils.removeTab(tabs[userContextId].tab); + } + + let expectedHits = USER_CONTEXTS.length; + + // Check that image cache works with the userContextId. + is(gHits, expectedHits, "The image should be loaded" + expectedHits + "times."); + + // Reset the cache count. + gHits = 0; + + // Forget the site. + ForgetAboutSite.removeDataFromDomain("localhost:" + gHttpServer.identity.primaryPort + "/"); + + // Load again. + for (let userContextId of Object.keys(USER_CONTEXTS)) { + // Open our tab in the given user context to cache image. + tabs[userContextId] = yield* openTabInUserContext('http://localhost:' + gHttpServer.identity.primaryPort + '/loadImage.html', + userContextId); + yield BrowserTestUtils.removeTab(tabs[userContextId].tab); + } + + // Check that image cache was cleared and the server gets another two hits. + is(gHits, expectedHits, "The image should be loaded" + expectedHits + "times."); +} + +// Offline Storage +function* test_storage_cleared() { + for (let userContextId of Object.keys(USER_CONTEXTS)) { + // Load the page in 2 different contexts and set the local storage + // which should only be visible in that context. + let value = USER_CONTEXTS[userContextId]; + + // Open our tab in the given user context. + let tabInfo = yield* openTabInUserContext(TEST_URL+ "file_set_storages.html?" + value, userContextId); + + // Check that the storages has been set correctly. + yield ContentTask.spawn(tabInfo.browser, { userContext: USER_CONTEXTS[userContextId] }, function* (arg) { + // Check that the local storage has been set correctly. + Assert.equal(content.localStorage.getItem("userContext"), arg.userContext, "Check the local storage value"); + + // Check that the session storage has been set correctly. + Assert.equal(content.sessionStorage.getItem("userContext"), arg.userContext, "Check the session storage value"); + + // Check that the indexedDB has been set correctly. + let request = content.indexedDB.open("idb", 1); + + let db = yield new Promise(done => { + request.onsuccess = event => { + done(event.target.result); + }; + }); + + let transaction = db.transaction(["obj"], "readonly"); + let store = transaction.objectStore("obj"); + let storeRequest = store.get(1); + + yield new Promise(done => { + storeRequest.onsuccess = event => { + let res = storeRequest.result; + Assert.equal(res.userContext, arg.userContext, "Check the indexedDB value"); + done(); + }; + }); + }); + + // Close this tab. + yield BrowserTestUtils.removeTab(tabInfo.tab); + } + + // Forget the site. + ForgetAboutSite.removeDataFromDomain(TEST_HOST); + + // Open the tab again without setting the localStorage and check that the + // local storage has been cleared or not. + for (let userContextId of Object.keys(USER_CONTEXTS)) { + // Open our tab in the given user context without setting local storage. + let tabInfo = yield* openTabInUserContext(TEST_URL+ "file_set_storages.html", userContextId); + + // Check that do storages be cleared or not. + yield ContentTask.spawn(tabInfo.browser, null, function* () { + // Check that does the local storage be cleared or not. + Assert.ok(!content.localStorage.getItem("userContext"), "The local storage has been cleared"); + + // Check that does the session storage be cleared or not. + Assert.ok(!content.sessionStorage.getItem("userContext"), "The session storage has been cleared"); + + // Check that does the indexedDB be cleared or not. + let request = content.indexedDB.open("idb", 1); + + let db = yield new Promise(done => { + request.onsuccess = event => { + done(event.target.result); + }; + }); + try { + db.transaction(["obj"], "readonly"); + Assert.ok(false, "The indexedDB should not exist"); + } catch (e) { + Assert.equal(e.name, "NotFoundError", "The indexedDB does not exist as expected"); + } + }); + + // Close the tab. + yield BrowserTestUtils.removeTab(tabInfo.tab); + } +} + +add_task(function* setup() { + // Make sure userContext is enabled. + yield new Promise(resolve => { + SpecialPowers.pushPrefEnv({"set": [ + ["privacy.userContext.enabled", true] + ]}, resolve); + }); + + // Create a http server for the image cache test. + if (!gHttpServer) { + gHttpServer = new HttpServer(); + gHttpServer.registerPathHandler('/image.png', imageHandler); + gHttpServer.registerPathHandler('/loadImage.html', loadImagePageHandler); + gHttpServer.start(-1); + } +}); + +let tests = [ + test_cookie_cleared, + test_cache_cleared, + test_image_cache_cleared, + test_storage_cleared, +]; + +add_task(function* test() { + for (let i = 0; i < tests.length; i++) + add_task(tests[i]); +}); + +registerCleanupFunction(() => { + gHttpServer.stop(() => { + gHttpServer = null; + }); +}); diff --git a/browser/components/contextualidentity/test/browser/browser_imageCache.js b/browser/components/contextualidentity/test/browser/browser_imageCache.js new file mode 100644 index 000000000..df36d44c1 --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_imageCache.js @@ -0,0 +1,59 @@ +let Cu = Components.utils; +let {HttpServer} = Cu.import("resource://testing-common/httpd.js", {}); + +const NUM_USER_CONTEXTS = 3; + +let gHits = 0; + +let server = new HttpServer(); +server.registerPathHandler('/image.png', imageHandler); +server.registerPathHandler('/file.html', fileHandler); +server.start(-1); + +let BASE_URI = 'http://localhost:' + server.identity.primaryPort; +let IMAGE_URI = BASE_URI + '/image.png'; +let FILE_URI = BASE_URI + '/file.html'; + +function imageHandler(metadata, response) { + gHits++; + response.setHeader("Cache-Control", "max-age=10000", false); + response.setStatusLine(metadata.httpVersion, 200, "OK"); + response.setHeader("Content-Type", "image/png", false); + var body = "iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAAEUlEQVQImWP4z8AAQTAamQkAhpcI+DeMzFcAAAAASUVORK5CYII="; + response.bodyOutputStream.write(body, body.length); +} + +function fileHandler(metadata, response) { + response.setStatusLine(metadata.httpVersion, 200, "OK"); + response.setHeader("Content-Type", "text/html", false); + let body = ``; + response.bodyOutputStream.write(body, body.length); +} + +add_task(function* setup() { + // make sure userContext is enabled. + yield SpecialPowers.pushPrefEnv({"set": [["privacy.userContext.enabled", true]]}); +}); + +// opens `uri' in a new tab with the provided userContextId and focuses it. +// returns the newly opened tab +function* openTabInUserContext(uri, userContextId) { + // open the tab in the correct userContextId + let tab = gBrowser.addTab(uri, {userContextId}); + + // select tab and make sure its browser is focused + gBrowser.selectedTab = tab; + tab.ownerDocument.defaultView.focus(); + + let browser = gBrowser.getBrowserForTab(tab); + yield BrowserTestUtils.browserLoaded(browser); + return tab; +} + +add_task(function* test() { + for (let userContextId = 0; userContextId < NUM_USER_CONTEXTS; userContextId++) { + let tab = yield* openTabInUserContext(FILE_URI, userContextId); + gBrowser.removeTab(tab); + } + is(gHits, NUM_USER_CONTEXTS, "should get an image request for each user contexts"); +}); diff --git a/browser/components/contextualidentity/test/browser/browser_middleClick.js b/browser/components/contextualidentity/test/browser/browser_middleClick.js new file mode 100644 index 000000000..f3bed2b53 --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_middleClick.js @@ -0,0 +1,41 @@ +"use strict"; + +const BASE_ORIGIN = "http://example.com"; +const URI = BASE_ORIGIN + + "/browser/browser/components/contextualidentity/test/browser/empty_file.html"; + +add_task(function* () { + info("Opening a new container tab..."); + + let tab = gBrowser.addTab(URI, { userContextId: 1 }); + gBrowser.selectedTab = tab; + + let browser = gBrowser.getBrowserForTab(tab); + yield BrowserTestUtils.browserLoaded(browser); + + info("Create a HTMLAnchorElement..."); + yield ContentTask.spawn(browser, URI, + function(URI) { + let anchor = content.document.createElement("a"); + anchor.setAttribute('id', 'clickMe'); + anchor.setAttribute("href", URI); + anchor.appendChild(content.document.createTextNode("click me!")); + content.document.body.appendChild(anchor); + } + ); + + info("Synthesize a mouse click and wait for a new tab..."); + let newTab = yield new Promise((resolve, reject) => { + gBrowser.tabContainer.addEventListener("TabOpen", function onTabOpen(openEvent) { + gBrowser.tabContainer.removeEventListener("TabOpen", onTabOpen); + resolve(openEvent.target); + }) + + BrowserTestUtils.synthesizeMouseAtCenter("#clickMe", { button: 1 }, browser); + }); + + is(newTab.getAttribute("usercontextid"), 1, "Correct UserContextId?"); + + yield BrowserTestUtils.removeTab(tab); + yield BrowserTestUtils.removeTab(newTab); +}); diff --git a/browser/components/contextualidentity/test/browser/browser_newtabButton.js b/browser/components/contextualidentity/test/browser/browser_newtabButton.js new file mode 100644 index 000000000..228e6f971 --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_newtabButton.js @@ -0,0 +1,35 @@ +"use strict"; + +// Testing that when the user opens the add tab menu and clicks menu items +// the correct context id is opened + +add_task(function* test() { + yield SpecialPowers.pushPrefEnv({"set": [ + ["privacy.userContext.enabled", true] + ]}); + + let newTab = document.getElementById('tabbrowser-tabs'); + let newTabButton = document.getAnonymousElementByAttribute(newTab, "anonid", "tabs-newtab-button"); + ok(newTabButton, "New tab button exists"); + ok(!newTabButton.hidden, "New tab button is visible"); + yield BrowserTestUtils.waitForCondition(() => !!document.getAnonymousElementByAttribute(newTab, "anonid", "newtab-popup"), "Wait for popup to exist"); + let popup = document.getAnonymousElementByAttribute(newTab, "anonid", "newtab-popup"); + + for (let i = 1; i <= 4; i++) { + let popupShownPromise = BrowserTestUtils.waitForEvent(popup, "popupshown"); + EventUtils.synthesizeMouseAtCenter(newTabButton, {type: "mousedown"}); + + yield popupShownPromise; + let contextIdItem = popup.querySelector(`menuitem[data-usercontextid="${i}"]`); + + ok(contextIdItem, `User context id ${i} exists`); + + let waitForTabPromise = BrowserTestUtils.waitForNewTab(gBrowser); + EventUtils.synthesizeMouseAtCenter(contextIdItem, {}); + + let tab = yield waitForTabPromise; + + is(tab.getAttribute('usercontextid'), i, `New tab has UCI equal ${i}`); + yield BrowserTestUtils.removeTab(tab); + } +}); diff --git a/browser/components/contextualidentity/test/browser/browser_serviceworkers.js b/browser/components/contextualidentity/test/browser/browser_serviceworkers.js new file mode 100644 index 000000000..b074b91ac --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_serviceworkers.js @@ -0,0 +1,108 @@ +let { classes: Cc, interfaces: Ci } = Components; + +let swm = Cc["@mozilla.org/serviceworkers/manager;1"]. + getService(Ci.nsIServiceWorkerManager); + +const BASE_ORIGIN = "https://example.com"; +const URI = BASE_ORIGIN + + "/browser/browser/components/contextualidentity/test/browser/serviceworker.html"; +const NUM_USER_CONTEXTS = 3; + +// opens `uri' in a new tab with the provided userContextId and focuses it. +// returns the newly opened tab +function openTabInUserContext(uri, userContextId) { + // open the tab in the correct userContextId + let tab = gBrowser.addTab(uri, {userContextId}); + + // select tab and make sure its browser is focused + gBrowser.selectedTab = tab; + tab.ownerGlobal.focus(); + + return tab; +} + +add_task(function* setup() { + // make sure userContext is enabled. + yield new Promise(resolve => { + SpecialPowers.pushPrefEnv({"set": [ + ["privacy.userContext.enabled", true], + ["dom.serviceWorkers.enabled", true], + ["dom.serviceWorkers.openWindow.enabled", true], + ["dom.ipc.processCount", 1] + ]}, resolve); + }); +}); + +let infos = []; + +add_task(function* test() { + // Open the same URI in multiple user contexts, and make sure we have a + // separate service worker in each of the contexts + for (let userContextId = 0; userContextId < NUM_USER_CONTEXTS; userContextId++) { + // Open a tab in given user contexts + let tab = openTabInUserContext(URI, userContextId); + + // wait for tab load + yield BrowserTestUtils.browserLoaded(gBrowser.getBrowserForTab(tab)); + + // remove the tab + gBrowser.removeTab(tab); + } + + if (!allRegistered()) { + yield promiseAllRegistered(); + } + ok(true, "all service workers are registered"); + + // Unregistered all service workers added in this test + for (let info of infos) { + yield promiseUnregister(info); + } +}); + +function allRegistered() { + let results = []; + let registrations = swm.getAllRegistrations(); + for (let i = 0; i < registrations.length; i++) { + let info = registrations.queryElementAt(i, Ci.nsIServiceWorkerRegistrationInfo); + let principal = info.principal; + if (principal.originNoSuffix === BASE_ORIGIN) { + results[principal.userContextId] = true; + infos[principal.userContextId] = info; + } + } + for (let userContextId = 0; userContextId < NUM_USER_CONTEXTS; userContextId++) { + if (!results[userContextId]) { + return false; + } + } + return true; +} + +function promiseAllRegistered() { + return new Promise(function(resolve) { + let listener = { + onRegister: function() { + if (allRegistered()) { + swm.removeListener(listener); + resolve(); + } + } + } + swm.addListener(listener); + }); +} + +function promiseUnregister(info) { + return new Promise(function(resolve) { + swm.unregister(info.principal, { + unregisterSucceeded: function(aState) { + ok(aState, "ServiceWorkerRegistration exists"); + resolve(); + }, + unregisterFailed: function(aState) { + ok(false, "unregister should succeed"); + } + }, info.scope); + }); +} diff --git a/browser/components/contextualidentity/test/browser/browser_usercontext.js b/browser/components/contextualidentity/test/browser/browser_usercontext.js new file mode 100644 index 000000000..e0e785d3f --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_usercontext.js @@ -0,0 +1,86 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + + +const USER_CONTEXTS = [ + "default", + "personal", + "work", +]; + +const BASE_URI = "http://mochi.test:8888/browser/browser/components/" + + "contextualidentity/test/browser/file_reflect_cookie_into_title.html"; + + +// opens `uri' in a new tab with the provided userContextId and focuses it. +// returns the newly opened tab +function openTabInUserContext(uri, userContextId) { + // open the tab in the correct userContextId + let tab = gBrowser.addTab(uri, {userContextId}); + + // select tab and make sure its browser is focused + gBrowser.selectedTab = tab; + tab.ownerGlobal.focus(); + + return tab; +} + +add_task(function* setup() { + // make sure userContext is enabled. + yield new Promise(resolve => { + SpecialPowers.pushPrefEnv({"set": [ + ["privacy.userContext.enabled", true], + ["dom.ipc.processCount", 1] + ]}, resolve); + }); +}); + +add_task(function* test() { + for (let userContextId of Object.keys(USER_CONTEXTS)) { + // load the page in 3 different contexts and set a cookie + // which should only be visible in that context + let cookie = USER_CONTEXTS[userContextId]; + + // open our tab in the given user context + let tab = openTabInUserContext(BASE_URI+"?"+cookie, userContextId); + + // wait for tab load + yield BrowserTestUtils.browserLoaded(gBrowser.getBrowserForTab(tab)); + + // remove the tab + gBrowser.removeTab(tab); + } + + { + // Set a cookie in a different context so we can detect if that affects + // cross-context properly. If we don't do that, we get an UNEXPECTED-PASS + // for the localStorage case for the last tab we set. + let tab = openTabInUserContext(BASE_URI+"?foo", 9999); + yield BrowserTestUtils.browserLoaded(gBrowser.getBrowserForTab(tab)); + gBrowser.removeTab(tab); + } + + for (let userContextId of Object.keys(USER_CONTEXTS)) { + // Load the page without setting the cookie this time + let expectedContext = USER_CONTEXTS[userContextId]; + + let tab = openTabInUserContext(BASE_URI, userContextId); + + // wait for load + let browser = gBrowser.getBrowserForTab(tab); + yield BrowserTestUtils.browserLoaded(browser); + + // get the title + let title = browser.contentDocument.title.trim().split("|"); + + // check each item in the title and validate it meets expectatations + for (let part of title) { + let [storageMethodName, value] = part.split("="); + is(value, expectedContext, + "the title reflects the expected contextual identity of " + + expectedContext + " for method " + storageMethodName + ": " + value); + } + + gBrowser.removeTab(tab); + } +}); diff --git a/browser/components/contextualidentity/test/browser/browser_usercontextid_tabdrop.js b/browser/components/contextualidentity/test/browser/browser_usercontextid_tabdrop.js new file mode 100644 index 000000000..6a8fbc591 --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_usercontextid_tabdrop.js @@ -0,0 +1,134 @@ +"use strict"; + +let EventUtils = {}; +Services.scriptloader.loadSubScript("chrome://mochikit/content/tests/SimpleTest/EventUtils.js", EventUtils); + +/** + * Dragging an URL to a tab without userContextId set. + */ +add_task(function* () { + let tab = gBrowser.addTab("http://example.com/"); + yield BrowserTestUtils.browserLoaded(tab.linkedBrowser); + + let awaitDrop = BrowserTestUtils.waitForEvent(gBrowser.tabContainer, "drop"); + let newTabPromise = BrowserTestUtils.waitForNewTab(gBrowser, "http://test1.example.com/"); + + // A drop type of "link" onto an existing tab would normally trigger a + // load in that same tab, but tabbrowser code in _getDragTargetTab treats + // drops on the outer edges of a tab differently (loading a new tab + // instead). Make events created by synthesizeDrop have all of their + // coordinates set to 0 (screenX/screenY), so they're treated as drops + // on the outer edge of the tab, thus they open new tabs. + let event = { + clientX: 0, + clientY: 0, + screenX: 0, + screenY: 0, + }; + EventUtils.synthesizeDrop(tab, tab, [[{type: "text/plain", data: "http://test1.example.com/"}]], "link", window, undefined, event); + + yield awaitDrop; + + let tab2 = yield newTabPromise; + Assert.ok(!tab2.hasAttribute("usercontextid"), "Tab shouldn't have usercontextid attribute"); + + yield BrowserTestUtils.browserLoaded(tab2.linkedBrowser); + + yield ContentTask.spawn(tab2.linkedBrowser, {}, function* () { + Assert.equal(content.document.documentURI, "http://test1.example.com/"); + Assert.equal(content.document.nodePrincipal.originAttributes.userContextId, 0); + + // referrer is empty when urls are dragged to new or existing tabs. + // If this changes in the future, it would be okay to send the referrer + // in this case because we are creating a new tab with the default + // usercontextid as the original tab. + Assert.equal(content.document.referrer, "", "referrer should be empty"); + }); + + yield BrowserTestUtils.removeTab(tab); + yield BrowserTestUtils.removeTab(tab2); +}); + +/** + * When dragging an URL to a new tab, the new tab should have the same + * userContextId as the original tab. + */ +add_task(function* () { + let tab = gBrowser.addTab("http://example.com/", {userContextId: 1}); + yield BrowserTestUtils.browserLoaded(tab.linkedBrowser); + + let awaitDrop = BrowserTestUtils.waitForEvent(gBrowser.tabContainer, "drop"); + let newTabPromise = BrowserTestUtils.waitForNewTab(gBrowser, "http://test1.example.com/"); + + // A drop type of "link" onto an existing tab would normally trigger a + // load in that same tab, but tabbrowser code in _getDragTargetTab treats + // drops on the outer edges of a tab differently (loading a new tab + // instead). Make events created by synthesizeDrop have all of their + // coordinates set to 0 (screenX/screenY), so they're treated as drops + // on the outer edge of the tab, thus they open new tabs. + let event = { + clientX: 0, + clientY: 0, + screenX: 0, + screenY: 0, + }; + EventUtils.synthesizeDrop(tab, tab, [[{type: "text/plain", data: "http://test1.example.com/"}]], "link", window, undefined, event); + + yield awaitDrop; + + let tab2 = yield newTabPromise; + Assert.equal(tab2.getAttribute("usercontextid"), 1); + + yield BrowserTestUtils.browserLoaded(tab2.linkedBrowser); + + yield ContentTask.spawn(tab2.linkedBrowser, {}, function* () { + Assert.equal(content.document.documentURI, "http://test1.example.com/"); + Assert.equal(content.document.nodePrincipal.originAttributes.userContextId, 1); + + // referrer is empty when urls are dragged to new or existing tabs. + // If this changes in the future, it would be okay to send the referrer + // in this case because we are creating a new tab with the same + // usercontextid as the original tab. + Assert.equal(content.document.referrer, "", "referrer should be empty"); + }); + + yield BrowserTestUtils.removeTab(tab); + yield BrowserTestUtils.removeTab(tab2); +}); + +/** + * When dragging a URL from one tab or link on a tab to an existing tab, the + * existing tab should not change its userContextId. + * Ex: if you drag a link from tab 1 with userContext 1 to tab 2 with + * userContext 2, the link will open in tab 2 with userContext 2. + */ +add_task(function* () { + let tab = gBrowser.addTab("http://example.com/", {userContextId: 1}); + yield BrowserTestUtils.browserLoaded(tab.linkedBrowser); + + let tab2 = gBrowser.addTab("http://example.org/", {userContextId: 2}); + yield BrowserTestUtils.browserLoaded(tab2.linkedBrowser); + + let awaitDrop = BrowserTestUtils.waitForEvent(gBrowser.tabContainer, "drop"); + + EventUtils.synthesizeDrop(tab, tab2, [[{type: "text/plain", data: "http://test1.example.com/"}]], "link", window); + + yield awaitDrop; + Assert.equal(tab2.getAttribute("usercontextid"), 2); + + yield BrowserTestUtils.browserLoaded(tab2.linkedBrowser); + + yield ContentTask.spawn(tab2.linkedBrowser, {}, function* () { + Assert.equal(content.document.documentURI, "http://test1.example.com/"); + Assert.equal(content.document.nodePrincipal.originAttributes.userContextId, 2); + + // referrer is empty when urls are dragged to new or existing tabs. + // If this changes in the future, we should ensure that we are not sending + // a referrer for this case! When opening links across user contexts, we + // don't want the referrer to follow the user from one context to another. + Assert.equal(content.document.referrer, "", "referrer should be empty"); + }); + + yield BrowserTestUtils.removeTab(tab); + yield BrowserTestUtils.removeTab(tab2); +}); diff --git a/browser/components/contextualidentity/test/browser/browser_windowName.js b/browser/components/contextualidentity/test/browser/browser_windowName.js new file mode 100644 index 000000000..555c421ce --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_windowName.js @@ -0,0 +1,74 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + + +const USER_CONTEXTS = [ + "default", + "personal", + "work", +]; + +const BASE_URI = "http://mochi.test:8888/browser/browser/components/" + + "contextualidentity/test/browser/empty_file.html"; + +add_task(function* setup() { + // make sure userContext is enabled. + yield new Promise(resolve => { + SpecialPowers.pushPrefEnv({"set": [ + ["privacy.userContext.enabled", true], + ["browser.link.open_newwindow", 3], + ]}, resolve); + }); +}); + +add_task(function* test() { + info("Creating first tab..."); + let tab1 = gBrowser.addTab(BASE_URI + '?old', {userContextId: 1}); + let browser1 = gBrowser.getBrowserForTab(tab1); + yield BrowserTestUtils.browserLoaded(browser1); + yield ContentTask.spawn(browser1, null, function(opts) { + content.window.name = 'tab-1'; + }); + + info("Creating second tab..."); + let tab2 = gBrowser.addTab(BASE_URI + '?old', {userContextId: 2}); + let browser2 = gBrowser.getBrowserForTab(tab2); + yield BrowserTestUtils.browserLoaded(browser2); + yield ContentTask.spawn(browser2, null, function(opts) { + content.window.name = 'tab-2'; + }); + + // Let's try to open a window from tab1 with a name 'tab-2'. + info("Opening a window from the first tab..."); + yield ContentTask.spawn(browser1, { url: BASE_URI + '?new' }, function* (opts) { + yield (new content.window.wrappedJSObject.Promise(resolve => { + let w = content.window.wrappedJSObject.open(opts.url, 'tab-2'); + w.onload = function() { resolve(); } + })); + }); + + is(browser1.contentTitle, '?old', "Tab1 title must be 'old'"); + is(browser1.contentPrincipal.userContextId, 1, "Tab1 UCI must be 1"); + + is(browser2.contentTitle, '?old', "Tab2 title must be 'old'"); + is(browser2.contentPrincipal.userContextId, 2, "Tab2 UCI must be 2"); + + let found = false; + for (let i = 0; i < gBrowser.tabContainer.childNodes.length; ++i) { + let tab = gBrowser.tabContainer.childNodes[i]; + let browser = gBrowser.getBrowserForTab(tab); + if (browser.contentTitle == '?new') { + is(browser.contentPrincipal.userContextId, 1, "Tab3 UCI must be 1"); + isnot(browser, browser1, "Tab3 is not browser 1"); + isnot(browser, browser2, "Tab3 is not browser 2"); + gBrowser.removeTab(tab); + found = true; + break; + } + } + + ok(found, "We have tab3"); + + gBrowser.removeTab(tab1); + gBrowser.removeTab(tab2); +}); diff --git a/browser/components/contextualidentity/test/browser/browser_windowOpen.js b/browser/components/contextualidentity/test/browser/browser_windowOpen.js new file mode 100644 index 000000000..00c6e0aa0 --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_windowOpen.js @@ -0,0 +1,41 @@ +"use strict"; + +// Here we want to test that a new opened window shows the same UI of the +// parent one if this has been loaded from a particular container. + +const BASE_URI = "http://mochi.test:8888/browser/browser/components/" + + "contextualidentity/test/browser/empty_file.html"; + +add_task(function* setup() { + yield new Promise((resolve) => { + SpecialPowers.pushPrefEnv({"set": [ + ["privacy.userContext.enabled", true], + ["browser.link.open_newwindow", 2], + ]}, resolve); + }); +}); + + +add_task(function* test() { + info("Creating a tab with UCI = 1..."); + let tab = gBrowser.addTab(BASE_URI, {userContextId: 1}); + is(tab.getAttribute('usercontextid'), 1, "New tab has UCI equal 1"); + + let browser = gBrowser.getBrowserForTab(tab); + yield BrowserTestUtils.browserLoaded(browser); + + info("Opening a new window from this tab..."); + ContentTask.spawn(browser, BASE_URI, function(url) { + content.window.newWindow = content.window.open(url, "_blank"); + }); + + let newWin = yield BrowserTestUtils.waitForNewWindow(); + let newTab = newWin.gBrowser.selectedTab; + + yield BrowserTestUtils.browserLoaded(newTab.linkedBrowser); + is(newTab.getAttribute('usercontextid'), 1, "New tab has UCI equal 1"); + + info("Closing the new window and tab..."); + yield BrowserTestUtils.closeWindow(newWin); + yield BrowserTestUtils.removeTab(tab); +}); diff --git a/browser/components/contextualidentity/test/browser/empty_file.html b/browser/components/contextualidentity/test/browser/empty_file.html new file mode 100644 index 000000000..c6d11dcd5 --- /dev/null +++ b/browser/components/contextualidentity/test/browser/empty_file.html @@ -0,0 +1,5 @@ + + + diff --git a/browser/components/contextualidentity/test/browser/favicon-normal32.png b/browser/components/contextualidentity/test/browser/favicon-normal32.png new file mode 100644 index 000000000..5535363c9 Binary files /dev/null and b/browser/components/contextualidentity/test/browser/favicon-normal32.png differ diff --git a/browser/components/contextualidentity/test/browser/file_reflect_cookie_into_title.html b/browser/components/contextualidentity/test/browser/file_reflect_cookie_into_title.html new file mode 100644 index 000000000..b04f3fd5c --- /dev/null +++ b/browser/components/contextualidentity/test/browser/file_reflect_cookie_into_title.html @@ -0,0 +1,23 @@ + + + + title not set + + + + + diff --git a/browser/components/contextualidentity/test/browser/file_set_storages.html b/browser/components/contextualidentity/test/browser/file_set_storages.html new file mode 100644 index 000000000..c6adcbdde --- /dev/null +++ b/browser/components/contextualidentity/test/browser/file_set_storages.html @@ -0,0 +1,41 @@ + + + + Bug 1238183 + + + + + diff --git a/browser/components/contextualidentity/test/browser/serviceworker.html b/browser/components/contextualidentity/test/browser/serviceworker.html new file mode 100644 index 000000000..11edd001a --- /dev/null +++ b/browser/components/contextualidentity/test/browser/serviceworker.html @@ -0,0 +1,12 @@ + + + + + + + + This is a test page. + + diff --git a/browser/components/contextualidentity/test/browser/worker.js b/browser/components/contextualidentity/test/browser/worker.js new file mode 100644 index 000000000..2aba167d1 --- /dev/null +++ b/browser/components/contextualidentity/test/browser/worker.js @@ -0,0 +1 @@ +// empty worker, always succeed! diff --git a/browser/components/controlcenter/content/panel.inc.xul b/browser/components/controlcenter/content/panel.inc.xul new file mode 100644 index 000000000..361b3c945 --- /dev/null +++ b/browser/components/controlcenter/content/panel.inc.xul @@ -0,0 +1,189 @@ + + +