From 0a6414b8983df4036ccc3c5c67031b1a8d93c818 Mon Sep 17 00:00:00 2001 From: Dave Townsend Date: Wed, 3 Feb 2016 14:22:33 -0800 Subject: [PATCH] Bug 1245649: Turn on no-trailing-spaces. r=Gijs --HG-- extra : commitid : F2OWKTvXUO4 extra : rebase_source : ec68631342e0edc59d77b6bab1cdc975ad175327 --- browser/base/content/browser-places.js | 22 +- browser/base/content/content.js | 2 +- browser/base/content/pageinfo/security.js | 16 +- browser/base/content/sync/genericChange.js | 2 +- browser/base/content/urlbarBindings.xml | 2 +- browser/base/content/utilityOverlay.js | 10 +- browser/base/content/web-panels.js | 6 +- .../branding/aurora/pref/firefox-branding.js | 2 +- .../branding/nightly/pref/firefox-branding.js | 2 +- .../official/pref/firefox-branding.js | 2 +- .../unofficial/pref/firefox-branding.js | 2 +- ...39_showInPrivateBrowsing_customize_mode.js | 2 +- .../components/customizableui/test/head.js | 2 +- browser/components/nsBrowserContentHandler.js | 6 +- .../places/content/browserPlacesViews.js | 2 +- .../components/places/content/controller.js | 2 +- .../places/content/history-panel.js | 4 +- browser/components/places/content/places.js | 4 +- browser/components/places/content/treeView.js | 4 +- .../places/tests/browser/browser_475045.js | 16 +- .../tests/browser/browser_views_liveupdate.js | 4 +- .../tests/unit/test_PUIU_makeTransaction.js | 2 +- .../content/test/browser_bug400731.js | 12 +- .../content/test/browser_bug415846.js | 10 +- .../search/test/browser_bing_behavior.js | 2 +- .../pocket/content/panels/js/saved.js | 38 +- .../pocket/content/panels/js/signup.js | 4 +- browser/extensions/pocket/content/pktApi.jsm | 14 +- browser/modules/FormSubmitObserver.jsm | 6 +- browser/modules/WindowsJumpLists.jsm | 22 +- browser/modules/WindowsPreviewPerTab.jsm | 2 +- browser/modules/offlineAppCache.jsm | 2 +- storage/test/unit/test_storage_statement.js | 2 +- toolkit/.eslintrc | 2 +- .../components/alerts/test/test_alerts.html | 2 +- .../components/apppicker/content/appPicker.js | 34 +- .../tests/unit/head_autocomplete.js | 60 +- .../autocomplete/tests/unit/test_378079.js | 106 +-- .../autocomplete/tests/unit/test_393191.js | 98 +- .../tests/unit/test_autocomplete_multiple.js | 96 +- .../tests/unit/test_badDefaultIndex.js | 4 +- .../unit/test_completeDefaultIndex_casing.js | 4 +- .../tests/unit/test_finalCompleteValue.js | 4 +- .../test_finalCompleteValue_forceComplete.js | 4 +- .../unit/test_finalDefaultCompleteValue.js | 4 +- .../tests/unit/test_hiddenResult.js | 8 +- .../tests/unit/test_immediate_search.js | 6 +- .../tests/unit/test_previousResult.js | 86 +- .../tests/unit/test_stopSearch.js | 12 +- .../commandlines/test/unit/test_bug666224.js | 2 +- toolkit/components/console/content/console.js | 6 +- .../console/content/consoleBindings.xml | 12 +- .../tests/unit/head_contentPrefs.js | 2 +- .../contentprefs/tests/unit/test_bug503971.js | 2 +- .../contentprefs/tests/unit/test_bug679784.js | 2 +- .../unit/test_unusedGroupsAndSettings.js | 6 +- .../cookie/content/cookieAcceptDialog.js | 10 +- toolkit/components/crashes/CrashManager.jsm | 2 +- .../downloads/nsDownloadManagerUI.js | 2 +- .../test/browser/browser_bug414214.js | 2 +- .../browser/browser_nsIDownloadManagerUI.js | 2 +- .../test/unit/test_download_samename.js | 2 +- .../test/unit/test_history_expiration.js | 2 +- toolkit/components/feeds/FeedProcessor.js | 172 ++-- toolkit/components/feeds/test/test_xml.js | 2 +- .../filepicker/content/filepicker.js | 28 +- toolkit/components/gfx/SanityTest.js | 2 +- .../components/microformats/Microformats.js | 56 +- .../microformats/microformat-shiv.js | 840 +++++++++--------- .../test/interface-tests/count-test.js | 88 +- .../test/interface-tests/experimental-test.js | 10 +- .../test/interface-tests/getParent-test.js | 100 +-- .../interface-tests/hasMicroformats-test.js | 160 ++-- .../interface-tests/isMicroformat-test.js | 122 +-- .../components/microformats/test/lib/dates.js | 90 +- .../components/microformats/test/lib/html.js | 66 +- .../microformats/test/lib/isodate.js | 210 ++--- .../microformats/test/lib/maps/h-adr.js | 4 +- .../microformats/test/lib/maps/h-card.js | 8 +- .../microformats/test/lib/maps/h-entry.js | 10 +- .../microformats/test/lib/maps/h-event.js | 8 +- .../microformats/test/lib/maps/h-feed.js | 6 +- .../microformats/test/lib/maps/h-geo.js | 4 +- .../microformats/test/lib/maps/h-item.js | 6 +- .../microformats/test/lib/maps/h-listing.js | 4 +- .../microformats/test/lib/maps/h-news.js | 6 +- .../microformats/test/lib/maps/h-org.js | 4 +- .../microformats/test/lib/maps/h-product.js | 4 +- .../microformats/test/lib/maps/h-recipe.js | 4 +- .../microformats/test/lib/maps/h-resume.js | 4 +- .../test/lib/maps/h-review-aggregate.js | 6 +- .../microformats/test/lib/maps/h-review.js | 4 +- .../microformats/test/lib/maps/rel.js | 48 +- .../microformats/test/lib/parser-implied.js | 174 ++-- .../microformats/test/lib/parser-includes.js | 52 +- .../microformats/test/lib/parser-rels.js | 68 +- .../components/microformats/test/lib/text.js | 86 +- .../microformats/test/lib/utilities.js | 62 +- .../test/module-tests/dates-test.js | 46 +- .../test/module-tests/domutils-test.js | 146 +-- .../test/module-tests/html-test.js | 34 +- .../test/module-tests/isodate-test.js | 106 +-- .../test/module-tests/text-test.js | 38 +- .../test/module-tests/url-test.js | 10 +- .../test/module-tests/utilities-test.js | 58 +- .../mf-mixed-h-card-mixedpropertries.js | 2 +- .../mf-mixed-h-card-tworoots.js | 2 +- .../mf-mixed-h-entry-mixedroots.js | 2 +- .../mf-mixed-h-resume-mixedroots.js | 2 +- .../mf-v1-adr-simpleproperties.js | 2 +- .../standards-tests/mf-v1-geo-abbrpattern.js | 2 +- .../test/standards-tests/mf-v1-geo-hidden.js | 2 +- .../mf-v1-geo-simpleproperties.js | 2 +- .../mf-v1-geo-valuetitleclass.js | 2 +- .../standards-tests/mf-v1-hcalendar-ampm.js | 2 +- .../mf-v1-hcalendar-attendees.js | 2 +- .../mf-v1-hcalendar-combining.js | 2 +- .../mf-v1-hcalendar-concatenate.js | 2 +- .../standards-tests/mf-v1-hcalendar-time.js | 2 +- .../test/standards-tests/mf-v1-hcard-email.js | 2 +- .../standards-tests/mf-v1-hcard-format.js | 2 +- .../mf-v1-hcard-hyperlinkedphoto.js | 2 +- .../mf-v1-hcard-justahyperlink.js | 2 +- .../standards-tests/mf-v1-hcard-justaname.js | 2 +- .../standards-tests/mf-v1-hcard-multiple.js | 2 +- .../test/standards-tests/mf-v1-hcard-name.js | 2 +- .../standards-tests/mf-v1-hcard-single.js | 2 +- .../mf-v1-hentry-summarycontent.js | 2 +- .../standards-tests/mf-v1-hfeed-simple.js | 2 +- .../test/standards-tests/mf-v1-hnews-all.js | 2 +- .../standards-tests/mf-v1-hnews-minimum.js | 2 +- .../mf-v1-hproduct-aggregate.js | 2 +- .../mf-v1-hproduct-simpleproperties.js | 2 +- .../mf-v1-hresume-affiliation.js | 2 +- .../standards-tests/mf-v1-hresume-contact.js | 2 +- .../mf-v1-hresume-education.js | 2 +- .../standards-tests/mf-v1-hresume-skill.js | 2 +- .../standards-tests/mf-v1-hresume-work.js | 2 +- .../mf-v1-hreview-aggregate-hcard.js | 2 +- .../mf-v1-hreview-aggregate-justahyperlink.js | 2 +- .../mf-v1-hreview-aggregate-vevent.js | 2 +- .../standards-tests/mf-v1-hreview-item.js | 2 +- .../standards-tests/mf-v1-hreview-vcard.js | 2 +- .../mf-v1-includes-hcarditemref.js | 2 +- .../mf-v1-includes-heventitemref.js | 2 +- .../mf-v1-includes-hyperlink.js | 2 +- .../standards-tests/mf-v1-includes-object.js | 2 +- .../standards-tests/mf-v1-includes-table.js | 2 +- .../test/standards-tests/mf-v2-h-adr-geo.js | 2 +- .../standards-tests/mf-v2-h-adr-geourl.js | 2 +- .../standards-tests/mf-v2-h-adr-justaname.js | 2 +- .../mf-v2-h-adr-simpleproperties.js | 2 +- .../standards-tests/mf-v2-h-as-note-note.js | 2 +- .../standards-tests/mf-v2-h-card-baseurl.js | 2 +- .../mf-v2-h-card-childimplied.js | 2 +- .../mf-v2-h-card-extendeddescription.js | 2 +- .../standards-tests/mf-v2-h-card-hcard.js | 2 +- .../standards-tests/mf-v2-h-card-horghcard.js | 2 +- .../mf-v2-h-card-hyperlinkedphoto.js | 2 +- .../mf-v2-h-card-impliedname.js | 2 +- .../mf-v2-h-card-impliedphoto.js | 2 +- .../mf-v2-h-card-impliedurl.js | 2 +- .../mf-v2-h-card-justahyperlink.js | 2 +- .../standards-tests/mf-v2-h-card-justaname.js | 2 +- .../standards-tests/mf-v2-h-card-nested.js | 2 +- .../mf-v2-h-card-p-property.js | 2 +- .../mf-v2-h-card-relativeurls.js | 2 +- .../mf-v2-h-entry-impliedvalue-nested.js | 2 +- .../mf-v2-h-entry-justahyperlink.js | 2 +- .../mf-v2-h-entry-justaname.js | 2 +- .../mf-v2-h-entry-summarycontent.js | 2 +- .../mf-v2-h-entry-u-property.js | 2 +- .../mf-v2-h-entry-urlincontent.js | 2 +- .../standards-tests/mf-v2-h-event-ampm.js | 2 +- .../mf-v2-h-event-attendees.js | 2 +- .../mf-v2-h-event-combining.js | 2 +- .../mf-v2-h-event-concatenate.js | 2 +- .../standards-tests/mf-v2-h-event-dates.js | 2 +- .../mf-v2-h-event-dt-property.js | 2 +- .../mf-v2-h-event-justahyperlink.js | 2 +- .../mf-v2-h-event-justaname.js | 2 +- .../standards-tests/mf-v2-h-event-time.js | 2 +- .../mf-v2-h-feed-implied-title.js | 2 +- .../standards-tests/mf-v2-h-feed-simple.js | 2 +- .../mf-v2-h-geo-abbrpattern.js | 2 +- .../standards-tests/mf-v2-h-geo-altitude.js | 2 +- .../standards-tests/mf-v2-h-geo-hidden.js | 2 +- .../standards-tests/mf-v2-h-geo-justaname.js | 2 +- .../mf-v2-h-geo-simpleproperties.js | 2 +- .../mf-v2-h-geo-valuetitleclass.js | 2 +- .../test/standards-tests/mf-v2-h-news-all.js | 2 +- .../standards-tests/mf-v2-h-news-minimum.js | 2 +- .../standards-tests/mf-v2-h-org-hyperlink.js | 2 +- .../standards-tests/mf-v2-h-org-simple.js | 2 +- .../mf-v2-h-org-simpleproperties.js | 2 +- .../mf-v2-h-product-aggregate.js | 2 +- .../mf-v2-h-product-justahyperlink.js | 2 +- .../mf-v2-h-product-justaname.js | 2 +- .../mf-v2-h-product-simpleproperties.js | 2 +- .../standards-tests/mf-v2-h-recipe-all.js | 2 +- .../standards-tests/mf-v2-h-recipe-minimum.js | 2 +- .../mf-v2-h-resume-affiliation.js | 2 +- .../standards-tests/mf-v2-h-resume-contact.js | 2 +- .../mf-v2-h-resume-education.js | 2 +- .../mf-v2-h-resume-justaname.js | 2 +- .../standards-tests/mf-v2-h-resume-skill.js | 2 +- .../standards-tests/mf-v2-h-resume-work.js | 2 +- .../mf-v2-h-review-aggregate-hevent.js | 2 +- ...mf-v2-h-review-aggregate-justahyperlink.js | 2 +- ...-v2-h-review-aggregate-simpleproperties.js | 2 +- .../mf-v2-h-review-hyperlink.js | 2 +- .../mf-v2-h-review-implieditem.js | 2 +- .../standards-tests/mf-v2-h-review-item.js | 2 +- .../mf-v2-h-review-justaname.js | 2 +- .../standards-tests/mf-v2-h-review-photo.js | 2 +- .../standards-tests/mf-v2-h-review-vcard.js | 2 +- .../mf-v2-rel-duplicate-rels.js | 2 +- .../test/standards-tests/mf-v2-rel-license.js | 2 +- .../standards-tests/mf-v2-rel-nofollow.js | 2 +- .../standards-tests/mf-v2-rel-rel-urls.js | 2 +- .../mf-v2-rel-varying-text-duplicate-rels.js | 2 +- .../test/standards-tests/mf-v2-rel-xfn-all.js | 2 +- .../mf-v2-rel-xfn-elsewhere.js | 2 +- .../test/static/javascript/DOMParser.js | 4 +- .../test/static/javascript/beautify.js | 6 +- .../test/static/javascript/chai.js | 6 +- .../test/static/javascript/count.js | 30 +- .../test/static/javascript/parse.js | 58 +- .../test/static/javascript/prettify.js | 92 +- .../test/static/javascript/testrunner.js | 48 +- .../tests/test_Microformats_geo.html | 2 +- .../tests/test_Microformats_getters.html | 2 +- .../tests/test_Microformats_hCard.html | 12 +- toolkit/components/nsDefaultCLH.js | 4 +- .../perfmonitoring/PerformanceStats.jsm | 4 +- .../tests/browser/browser_compartments.js | 2 +- .../browser_webpagePerformanceAlerts.js | 2 +- .../components/places/BookmarkHTMLUtils.jsm | 14 +- toolkit/components/places/Bookmarks.jsm | 4 +- toolkit/components/places/PlacesBackups.jsm | 2 +- toolkit/components/places/PlacesUtils.jsm | 20 +- toolkit/components/places/nsTaggingService.js | 18 +- .../autocomplete/test_match_beginning.js | 2 +- .../places/tests/bookmarks/test_384228.js | 2 +- .../places/tests/bookmarks/test_385829.js | 2 +- .../places/tests/bookmarks/test_388695.js | 2 +- .../places/tests/bookmarks/test_395101.js | 2 +- .../bookmarks/test_405938_restore_queries.js | 4 +- .../test_417228-exclude-from-backup.js | 2 +- .../test_424958-json-quoted-folders.js | 2 +- .../places/tests/bookmarks/test_448584.js | 2 +- .../test_818584-discard-duplicate-backups.js | 2 +- .../test_997030-bookmarks-html-encode.js | 2 +- .../places/tests/bookmarks/test_bmindex.js | 2 +- .../tests/bookmarks/test_bookmarks_fetch.js | 2 +- .../places/tests/browser/browser_bug680727.js | 4 +- .../places/tests/history/test_remove.js | 2 +- .../places/tests/queries/test_415716.js | 2 +- .../tests/queries/test_onlyBookmarked.js | 8 +- .../places/tests/queries/test_transitions.js | 2 +- .../places/tests/unit/test_331487.js | 4 +- .../places/tests/unit/test_384370.js | 2 +- .../places/tests/unit/test_385397.js | 2 +- .../places/tests/unit/test_408221.js | 40 +- .../places/tests/unit/test_413784.js | 4 +- .../unit/test_419792_node_tags_property.js | 4 +- .../unit/test_429505_remove_shortcuts.js | 4 +- .../unit/test_PlacesUtils_lazyobservers.js | 2 +- .../tests/unit/test_adaptive_bug527311.js | 2 +- .../tests/unit/test_async_history_api.js | 2 +- .../places/tests/unit/test_bookmark_catobs.js | 2 +- .../unit/test_bookmarks_html_import_tags.js | 2 +- .../places/tests/unit/test_frecency.js | 2 +- .../places/tests/unit/test_history.js | 2 +- .../unit/test_history_autocomplete_tags.js | 36 +- .../places/tests/unit/test_history_sidebar.js | 2 +- .../places/tests/unit/test_isvisited.js | 4 +- .../places/tests/unit/test_keywords.js | 2 +- .../places/tests/unit/test_placeURIs.js | 2 +- .../unit/test_removeVisitsByTimeframe.js | 2 +- .../unit/test_tag_autocomplete_search.js | 40 +- .../test_utils_getURLsForContainerNode.js | 2 +- .../printing/content/printPageSetup.js | 14 +- .../printing/content/printPreviewProgress.js | 16 +- .../printing/content/printProgress.js | 38 +- .../components/printing/content/printUtils.js | 2 +- .../printing/content/printdialog.js | 26 +- .../printing/content/printjoboptions.js | 54 +- .../prompts/test/test_bug619644.html | 2 +- .../satchel/test/test_form_autocomplete.html | 2 +- .../test_form_autocomplete_with_list.html | 4 +- toolkit/components/social/WorkerAPI.jsm | 2 +- .../tests/unit/test_TelemetryController.js | 2 +- .../tests/unit/test_TelemetryLateWrites.js | 2 +- .../tests/unit/test_TelemetryLockCount.js | 2 +- .../telemetry/tests/unit/test_nsITelemetry.js | 2 +- .../test/browser_thumbnails_storage.js | 2 +- .../timermanager/nsUpdateTimerManager.js | 4 +- .../components/viewconfig/content/config.js | 18 +- toolkit/content/findUtils.js | 4 +- toolkit/content/finddialog.js | 18 +- toolkit/content/globalOverlay.js | 6 +- toolkit/content/nsDragAndDrop.js | 180 ++-- .../browser_bug295977_autoscroll_overflow.js | 4 +- .../tests/browser/browser_bug982298.js | 2 +- .../browser/browser_f7_caret_browsing.js | 2 +- .../tests/chrome/RegisterUnregisterChrome.js | 6 +- toolkit/content/tests/chrome/popup_trigger.js | 2 +- .../content/tests/chrome/xul_selectcontrol.js | 4 +- .../tests/unit/test_contentAreaUtils.js | 2 +- toolkit/content/tests/widgets/popup_shared.js | 2 +- toolkit/content/tests/widgets/tree_shared.js | 10 +- toolkit/content/widgets/button.xml | 36 +- toolkit/content/widgets/colorpicker.xml | 56 +- toolkit/content/widgets/datetimepicker.xml | 2 +- toolkit/content/widgets/dialog.xml | 30 +- toolkit/content/widgets/filefield.xml | 14 +- toolkit/content/widgets/listbox.xml | 24 +- toolkit/content/widgets/popup.xml | 30 +- toolkit/content/widgets/preferences.xml | 198 ++--- toolkit/content/widgets/progressmeter.xml | 6 +- toolkit/content/widgets/radio.xml | 18 +- toolkit/content/widgets/scrollbox.xml | 12 +- toolkit/content/widgets/spinbuttons.xml | 4 +- toolkit/content/widgets/textbox.xml | 2 +- toolkit/content/widgets/toolbar.xml | 32 +- toolkit/content/widgets/tree.xml | 66 +- toolkit/content/widgets/wizard.xml | 102 +-- toolkit/identity/tests/unit/test_log_utils.js | 2 +- toolkit/modules/CertUtils.jsm | 2 +- toolkit/modules/debug.js | 2 +- .../modules/tests/xpcshell/test_Promise.js | 2 +- .../mozapps/downloads/content/download.xml | 36 +- .../mozapps/downloads/content/downloads.js | 2 +- .../mozapps/downloads/content/helperApps.js | 128 +-- .../mozapps/downloads/tests/chrome/utils.js | 2 +- .../extensions/ChromeManifestParser.jsm | 16 +- toolkit/mozapps/extensions/content/list.js | 8 +- .../extensions/content/selectAddons.xml | 2 +- .../mozapps/extensions/content/setting.xml | 2 +- .../extensions/content/xpinstallConfirm.js | 8 +- .../test/browser/browser_bug557956.js | 2 +- .../test/browser/browser_bug562797.js | 2 +- .../test/browser/browser_bug562890.js | 2 +- .../test/browser/browser_bug567127.js | 2 +- .../test/browser/browser_bug570760.js | 2 +- .../test/browser/browser_bug573062.js | 2 +- .../test/browser/browser_bug587970.js | 10 +- .../test/browser/browser_bug593535.js | 10 +- .../test/browser/browser_bug608316.js | 2 +- .../test/browser/browser_bug618502.js | 2 +- .../test/browser/browser_discovery.js | 2 +- .../extensions/test/browser/browser_list.js | 2 +- .../test/browser/browser_manualupdates.js | 6 +- .../test/browser/browser_recentupdates.js | 2 +- .../test/browser/browser_searching.js | 6 +- .../test/xpcshell/test_AddonRepository.js | 2 +- .../xpcshell/test_ChromeManifestParser.js | 2 +- .../test/xpcshell/test_bug455906.js | 14 +- .../test/xpcshell/test_bug468528.js | 2 +- .../test/xpcshell/test_bug514327_3.js | 12 +- .../test/xpcshell/test_bug563256.js | 2 +- .../test/xpcshell/test_bug594058.js | 2 +- .../test/xpcshell/test_bug619730.js | 2 +- .../test/xpcshell/test_compatoverrides.js | 2 +- .../test/xpcshell/test_dictionary.js | 4 +- .../test/xpcshell/test_duplicateplugins.js | 2 +- .../test/xpcshell/test_filepointer.js | 4 +- .../test/xpcshell/test_hasbinarycomponents.js | 2 +- .../test/xpcshell/test_isDebuggable.js | 2 +- .../extensions/test/xpcshell/test_migrate4.js | 6 +- .../test/xpcshell/test_migrate_max_version.js | 2 +- .../extensions/test/xpcshell/test_plugins.js | 2 +- .../test/xpcshell/test_strictcompatibility.js | 2 +- .../test/xpinstall/browser_localfile2.js | 6 +- .../test/xpinstall/browser_signed_multiple.js | 2 +- toolkit/mozapps/handling/content/dialog.js | 14 +- .../handling/nsContentDispatchChooser.js | 2 +- toolkit/mozapps/preferences/changemp.js | 26 +- toolkit/mozapps/preferences/fontbuilder.js | 22 +- toolkit/mozapps/preferences/removemp.js | 14 +- toolkit/mozapps/update/content/history.js | 18 +- toolkit/mozapps/update/content/updates.xml | 28 +- .../downloadCompleteAfterPartialFailure.js | 2 +- .../tests/unit_aus_update/updateManagerXML.js | 2 +- .../marAppInUseStageSuccessComplete_unix.js | 2 +- .../marStageSuccessComplete.js | 2 +- .../marStageSuccessCompleteSvc.js | 2 +- toolkit/obsolete/content/dialogOverlay.js | 20 +- toolkit/obsolete/content/nsClipboard.js | 20 +- toolkit/obsolete/content/nsUserSettings.js | 12 +- toolkit/obsolete/content/strres.js | 6 +- .../profile/content/createProfileWizard.js | 8 +- 393 files changed, 3076 insertions(+), 3076 deletions(-) diff --git a/browser/base/content/browser-places.js b/browser/base/content/browser-places.js index 35e21365c954..d327bfe840e4 100644 --- a/browser/base/content/browser-places.js +++ b/browser/base/content/browser-places.js @@ -352,7 +352,7 @@ var PlacesCommandHook = { var parent = aParent !== undefined ? aParent : PlacesUtils.unfiledBookmarksFolderId; var descAnno = { name: PlacesUIUtils.DESCRIPTION_ANNO, value: description }; - var txn = new PlacesCreateBookmarkTransaction(uri, parent, + var txn = new PlacesCreateBookmarkTransaction(uri, parent, PlacesUtils.bookmarks.DEFAULT_INDEX, title, null, [descAnno]); PlacesUtils.transactionManager.doTransaction(txn); @@ -478,7 +478,7 @@ var PlacesCommandHook = { }, /** - * Adds a bookmark to the page loaded in the current tab. + * Adds a bookmark to the page loaded in the current tab. */ bookmarkCurrentPage: function PCH_bookmarkCurrentPage(aShowEditUI, aParent) { this.bookmarkPage(gBrowser.selectedBrowser, aParent, aShowEditUI); @@ -540,7 +540,7 @@ var PlacesCommandHook = { }, /** - * Adds a folder with bookmarks to all of the currently open tabs in this + * Adds a folder with bookmarks to all of the currently open tabs in this * window. */ bookmarkCurrentPages: function PCH_bookmarkCurrentPages() { @@ -570,7 +570,7 @@ var PlacesCommandHook = { }, /** - * Adds a Live Bookmark to a feed associated with the current page. + * Adds a Live Bookmark to a feed associated with the current page. * @param url * The nsIURI of the page the feed was attached to * @title title @@ -604,7 +604,7 @@ var PlacesCommandHook = { }), /** - * Opens the Places Organizer. + * Opens the Places Organizer. * @param aLeftPaneRoot * The query to select in the organizer window - options * are: History, AllBookmarks, BookmarksMenu, BookmarksToolbar, @@ -615,7 +615,7 @@ var PlacesCommandHook = { // Due to bug 528706, getMostRecentWindow can return closed windows. if (!organizer || organizer.closed) { // No currently open places window, so open one with the specified mode. - openDialog("chrome://browser/content/places/places.xul", + openDialog("chrome://browser/content/places/places.xul", "", "chrome,toolbar=yes,dialog=no,resizable", aLeftPaneRoot); } else { @@ -826,7 +826,7 @@ var BookmarksEventHandler = { * Handler for command event for an item in the bookmarks toolbar. * Menus and submenus from the folder buttons bubble up to this handler. * Opens the item. - * @param aEvent + * @param aEvent * DOMEvent for the command * @param aView * The places view which aEvent should be associated with. @@ -908,7 +908,7 @@ var PlacesMenuDNDHandler = { /** * Called when the user enters the element during a drag. * @param event - * The DragEnter event that spawned the opening. + * The DragEnter event that spawned the opening. */ onDragEnter: function PMDH_onDragEnter(event) { // Opening menus in a Places popup is handled by the view itself. @@ -979,7 +979,7 @@ var PlacesMenuDNDHandler = { /** * Determines if a XUL element represents a static container. - * @returns true if the element is a container element (menu or + * @returns true if the element is a container element (menu or *` menu-toolbarbutton), false otherwise. */ _isStaticContainer: function PMDH__isContainer(node) { @@ -996,7 +996,7 @@ var PlacesMenuDNDHandler = { /** * Called when the user drags over the element. * @param event - * The DragOver event. + * The DragOver event. */ onDragOver: function PMDH_onDragOver(event) { let ip = new InsertionPoint(PlacesUtils.bookmarksMenuFolderId, @@ -1011,7 +1011,7 @@ var PlacesMenuDNDHandler = { /** * Called when the user drops on the element. * @param event - * The Drop event. + * The Drop event. */ onDrop: function PMDH_onDrop(event) { // Put the item at the end of bookmark menu. diff --git a/browser/base/content/content.js b/browser/base/content/content.js index 58c4f6e0843e..4f4c073fb705 100644 --- a/browser/base/content/content.js +++ b/browser/base/content/content.js @@ -130,7 +130,7 @@ var handleContentContextMenu = function (event) { disableSetDesktopBg = disableSetDesktopBackground(event.target); try { - let imageCache = + let imageCache = Cc["@mozilla.org/image/tools;1"].getService(Ci.imgITools) .getImgCacheForDocument(doc); let props = diff --git a/browser/base/content/pageinfo/security.js b/browser/base/content/pageinfo/security.js index 81890c6531e9..9dcd66000157 100644 --- a/browser/base/content/pageinfo/security.js +++ b/browser/base/content/pageinfo/security.js @@ -127,7 +127,7 @@ var security = { // No mapping required return name; }, - + /** * Open the cookie manager window */ @@ -183,7 +183,7 @@ function securityOnLoad(uri, windowInfo) { /* Set Identity section text */ setText("security-identity-domain-value", info.hostName); - + var owner, verifier; if (info.cert && !info.isBroken) { // Try to pull out meaningful values. Technically these fields are optional @@ -231,7 +231,7 @@ function securityOnLoad(uri, windowInfo) { hostHasCookies(uri) ? yesStr : noStr); setText("security-privacy-passwords-value", realmHasPasswords(uri) ? yesStr : noStr); - + var visitCount = previousVisitCount(info.hostName); if(visitCount > 1) { setText("security-privacy-history-value", @@ -242,7 +242,7 @@ function securityOnLoad(uri, windowInfo) { pageInfoBundle.getString("securityOneVisit")); } else { - setText("security-privacy-history-value", noStr); + setText("security-privacy-history-value", noStr); } /* Set the Technical Detail section messages */ @@ -283,7 +283,7 @@ function securityOnLoad(uri, windowInfo) { } setText("security-technical-shortform", hdr); setText("security-technical-longform1", msg1); - setText("security-technical-longform2", msg2); + setText("security-technical-longform2", msg2); } function setText(id, value) @@ -338,13 +338,13 @@ function realmHasPasswords(uri) { function previousVisitCount(host, endTimeReference) { if (!host) return false; - + var historyService = Components.classes["@mozilla.org/browser/nav-history-service;1"] .getService(Components.interfaces.nsINavHistoryService); - + var options = historyService.getNewQueryOptions(); options.resultType = options.RESULTS_AS_VISIT; - + // Search for visits to this host before today var query = historyService.getNewQuery(); query.endTimeReference = query.TIME_RELATIVE_TODAY; diff --git a/browser/base/content/sync/genericChange.js b/browser/base/content/sync/genericChange.js index a71efc3f4d1d..08cd086e4d44 100644 --- a/browser/base/content/sync/genericChange.js +++ b/browser/base/content/sync/genericChange.js @@ -121,7 +121,7 @@ var Change = { _updateStatus: function Change__updateStatus(str, state) { this._updateStatusWithString(this._str(str), state); }, - + _updateStatusWithString: function Change__updateStatusWithString(string, state) { this._statusRow.hidden = false; this._status.value = string; diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml index be4a971f1404..8e8b43a2eea7 100644 --- a/browser/base/content/urlbarBindings.xml +++ b/browser/base/content/urlbarBindings.xml @@ -1591,7 +1591,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. ]]> - document.getElementById("addon-progress-notification-progressmeter"); + document.getElementById("addon-progress-notification-progressmeter"); document.getElementById("addon-progress-notification-progresstext"); diff --git a/browser/base/content/utilityOverlay.js b/browser/base/content/utilityOverlay.js index 68c0111e99f9..93096e5a0630 100644 --- a/browser/base/content/utilityOverlay.js +++ b/browser/base/content/utilityOverlay.js @@ -114,8 +114,8 @@ function openUILink(url, event, aIgnoreButton, aIgnoreAlt, aAllowThirdPartyFixup * * Middle-clicking is the same as Ctrl+clicking (it opens a new tab). * - * Exceptions: - * - Alt is ignored for menu items selected using the keyboard so you don't accidentally save stuff. + * Exceptions: + * - Alt is ignored for menu items selected using the keyboard so you don't accidentally save stuff. * (Currently, the Alt isn't sent here at all for menu items, but that will change in bug 126189.) * - Alt is hard to use in context menus, because pressing Alt closes the menu. * - Alt can't be used on the bookmarks toolbar because Alt is used for "treat this as something draggable". @@ -416,7 +416,7 @@ function closeMenus(node) } // Gather all descendent text under given document node. -function gatherTextUnder ( root ) +function gatherTextUnder ( root ) { var text = ""; var node = root.firstChild; @@ -673,7 +673,7 @@ function makeURLAbsolute(aBase, aUrl) * This will be used as the referrer. There will be no security check. * @param [optional] aReferrerPolicy * Referrer policy - Ci.nsIHttpChannel.REFERRER_POLICY_*. - */ + */ function openNewTabWith(aURL, aDocument, aPostData, aEvent, aAllowThirdPartyFixup, aReferrer, aReferrerPolicy) { @@ -728,7 +728,7 @@ function openHelpLink(aHelpTopic, aCalledFromModal, aWhere) { } function openPrefsHelp() { - // non-instant apply prefwindows are usually modal, so we can't open in the topmost window, + // non-instant apply prefwindows are usually modal, so we can't open in the topmost window, // since its probably behind the window. var instantApply = getBoolPref("browser.preferences.instantApply"); diff --git a/browser/base/content/web-panels.js b/browser/base/content/web-panels.js index 4db5de41e9f5..6ce836168458 100644 --- a/browser/base/content/web-panels.js +++ b/browser/base/content/web-panels.js @@ -17,7 +17,7 @@ var panelProgressListener = { aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) { }, - + onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus) { if (!aRequest) @@ -27,7 +27,7 @@ var panelProgressListener = { if (aStatus == NS_NET_STATUS_READ_FROM || aStatus == NS_NET_STATUS_WROTE_TO) return; - if (aStateFlags & Ci.nsIWebProgressListener.STATE_START && + if (aStateFlags & Ci.nsIWebProgressListener.STATE_START && aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) { window.parent.document.getElementById('sidebar-throbber').setAttribute("loading", "true"); } @@ -45,7 +45,7 @@ var panelProgressListener = { onStatusChange : function(aWebProgress, aRequest, aStatus, aMessage) { }, - onSecurityChange : function(aWebProgress, aRequest, aState) { + onSecurityChange : function(aWebProgress, aRequest, aState) { }, QueryInterface : function(aIID) diff --git a/browser/branding/aurora/pref/firefox-branding.js b/browser/branding/aurora/pref/firefox-branding.js index b508fe1f1c6f..2240d4c28305 100644 --- a/browser/branding/aurora/pref/firefox-branding.js +++ b/browser/branding/aurora/pref/firefox-branding.js @@ -19,7 +19,7 @@ pref("app.update.promptWaitTime", 604800); // attempts fail. pref("app.update.url.manual", "https://www.mozilla.org/firefox/aurora/"); // A default value for the "More information about this update" link -// supplied in the "An update is available" page of the update wizard. +// supplied in the "An update is available" page of the update wizard. pref("app.update.url.details", "https://www.mozilla.org/firefox/aurora/"); // The number of days a binary is permitted to be old diff --git a/browser/branding/nightly/pref/firefox-branding.js b/browser/branding/nightly/pref/firefox-branding.js index aaac45a6f202..104d79e18175 100644 --- a/browser/branding/nightly/pref/firefox-branding.js +++ b/browser/branding/nightly/pref/firefox-branding.js @@ -17,7 +17,7 @@ pref("app.update.promptWaitTime", 43200); // attempts fail. pref("app.update.url.manual", "https://nightly.mozilla.org"); // A default value for the "More information about this update" link -// supplied in the "An update is available" page of the update wizard. +// supplied in the "An update is available" page of the update wizard. pref("app.update.url.details", "https://nightly.mozilla.org"); // The number of days a binary is permitted to be old diff --git a/browser/branding/official/pref/firefox-branding.js b/browser/branding/official/pref/firefox-branding.js index 8955aa5f29ba..5885dfbf81cf 100644 --- a/browser/branding/official/pref/firefox-branding.js +++ b/browser/branding/official/pref/firefox-branding.js @@ -16,7 +16,7 @@ pref("app.update.promptWaitTime", 172800); // attempts fail. pref("app.update.url.manual", "https://www.mozilla.org/firefox/"); // A default value for the "More information about this update" link -// supplied in the "An update is available" page of the update wizard. +// supplied in the "An update is available" page of the update wizard. pref("app.update.url.details", "https://www.mozilla.org/%LOCALE%/firefox/notes"); // The number of days a binary is permitted to be old diff --git a/browser/branding/unofficial/pref/firefox-branding.js b/browser/branding/unofficial/pref/firefox-branding.js index 1f6df76bbe87..82cd1eb0c1a4 100644 --- a/browser/branding/unofficial/pref/firefox-branding.js +++ b/browser/branding/unofficial/pref/firefox-branding.js @@ -16,7 +16,7 @@ pref("app.update.promptWaitTime", 86400); // attempts fail. pref("app.update.url.manual", "https://nightly.mozilla.org"); // A default value for the "More information about this update" link -// supplied in the "An update is available" page of the update wizard. +// supplied in the "An update is available" page of the update wizard. pref("app.update.url.details", "https://nightly.mozilla.org"); // The number of days a binary is permitted to be old diff --git a/browser/components/customizableui/test/browser_945739_showInPrivateBrowsing_customize_mode.js b/browser/components/customizableui/test/browser_945739_showInPrivateBrowsing_customize_mode.js index 02d628dd3242..6b8acbee0372 100644 --- a/browser/components/customizableui/test/browser_945739_showInPrivateBrowsing_customize_mode.js +++ b/browser/components/customizableui/test/browser_945739_showInPrivateBrowsing_customize_mode.js @@ -27,7 +27,7 @@ add_task(function* testPrivateBrowsingCustomizeModeWidget() { "Widget should not appear as unused in private window"); yield promiseWindowClosed(privateWindow); - CustomizableUI.destroyWidget(kWidgetId); + CustomizableUI.destroyWidget(kWidgetId); }); add_task(function* asyncCleanup() { diff --git a/browser/components/customizableui/test/head.js b/browser/components/customizableui/test/head.js index 9f32622ffd08..a094ad80f6d2 100644 --- a/browser/components/customizableui/test/head.js +++ b/browser/components/customizableui/test/head.js @@ -143,7 +143,7 @@ function placementArraysEqual(areaId, actualPlacements, expectedPlacements) { } else if (expectedPlacements[i] instanceof RegExp) { ok(expectedPlacements[i].test(actualPlacements[i]), "Item " + i + " (" + actualPlacements[i] + ") in " + - areaId + " should match " + expectedPlacements[i]); + areaId + " should match " + expectedPlacements[i]); } else { ok(false, "Unknown type of expected placement passed to " + " assertAreaPlacements. Is your test broken?"); diff --git a/browser/components/nsBrowserContentHandler.js b/browser/components/nsBrowserContentHandler.js index 02bdfe1a1280..d44284377401 100644 --- a/browser/components/nsBrowserContentHandler.js +++ b/browser/components/nsBrowserContentHandler.js @@ -77,7 +77,7 @@ function resolveURIInternal(aCmdLine, aArgument) { // We have interpreted the argument as a relative file URI, but the file // doesn't exist. Try URI fixup heuristics: see bug 290782. - + try { uri = urifixup.createFixupURI(aArgument, 0); } @@ -129,7 +129,7 @@ function needHomepageOverride(prefb) { // a way to make existing profiles retain the default that we removed. if (savedmstone) prefb.setBoolPref("browser.rights.3.shown", true); - + prefb.setCharPref("browser.startup.homepage_override.mstone", mstone); prefb.setCharPref("browser.startup.homepage_override.buildID", buildID); return (savedmstone ? OVERRIDE_NEW_MSTONE : OVERRIDE_NEW_PROFILE); @@ -195,7 +195,7 @@ function openWindow(parent, url, target, features, args, noExternalArgs) { return wwatch.openWindow(parent, url, target, features, argstring); } - + // Pass an array to avoid the browser "|"-splitting behavior. var argArray = Components.classes["@mozilla.org/supports-array;1"] .createInstance(Components.interfaces.nsISupportsArray); diff --git a/browser/components/places/content/browserPlacesViews.js b/browser/components/places/content/browserPlacesViews.js index 6d421f7af599..5e68c9dbc97d 100644 --- a/browser/components/places/content/browserPlacesViews.js +++ b/browser/components/places/content/browserPlacesViews.js @@ -1232,7 +1232,7 @@ PlacesToolbar.prototype = { let childRect = child.getBoundingClientRect(); childOverflowed = this.isRTL ? (childRect.left < scrollRect.left) : (childRect.right > scrollRect.right); - + } child.style.visibility = childOverflowed ? "hidden" : "visible"; } diff --git a/browser/components/places/content/controller.js b/browser/components/places/content/controller.js index ce13c65fbd10..2e8011afa3d9 100644 --- a/browser/components/places/content/controller.js +++ b/browser/components/places/content/controller.js @@ -970,7 +970,7 @@ PlacesController.prototype = { while (aURIs.length) { let URIslice = aURIs.splice(0, REMOVE_PAGES_CHUNKLEN); PlacesUtils.bhistory.removePages(URIslice, URIslice.length); - Services.tm.mainThread.dispatch(() => gen.next(), + Services.tm.mainThread.dispatch(() => gen.next(), Ci.nsIThread.DISPATCH_NORMAL); yield unefined; } diff --git a/browser/components/places/content/history-panel.js b/browser/components/places/content/history-panel.js index 29f207f286ff..20dbbb5bd5fd 100644 --- a/browser/components/places/content/history-panel.js +++ b/browser/components/places/content/history-panel.js @@ -20,7 +20,7 @@ function HistorySidebarInit() if (gHistoryGrouping == "site") document.getElementById("bysite").setAttribute("checked", "true"); - else if (gHistoryGrouping == "visited") + else if (gHistoryGrouping == "visited") document.getElementById("byvisited").setAttribute("checked", "true"); else if (gHistoryGrouping == "lastvisited") document.getElementById("bylastvisited").setAttribute("checked", "true"); @@ -28,7 +28,7 @@ function HistorySidebarInit() document.getElementById("bydayandsite").setAttribute("checked", "true"); else document.getElementById("byday").setAttribute("checked", "true"); - + searchHistory(""); } diff --git a/browser/components/places/content/places.js b/browser/components/places/content/places.js index 43e6f83631bc..2c3e21c955eb 100644 --- a/browser/components/places/content/places.js +++ b/browser/components/places/content/places.js @@ -774,7 +774,7 @@ var PlacesSearchBox = { get searchFilter() { return document.getElementById("searchFilter"); }, - + /** * Folders to include when searching. */ @@ -894,7 +894,7 @@ var PlacesSearchBox = { title = PlacesUIUtils.getString("searchDownloads"); break; default: - title = PlacesUIUtils.getString("searchBookmarks"); + title = PlacesUIUtils.getString("searchBookmarks"); } this.searchFilter.placeholder = title; }, diff --git a/browser/components/places/content/treeView.js b/browser/components/places/content/treeView.js index bb400c089233..04c7dff0404b 100644 --- a/browser/components/places/content/treeView.js +++ b/browser/components/places/content/treeView.js @@ -230,7 +230,7 @@ PlacesTreeView.prototype = { if (aRow < 0) { return null; } - + let node = this._rows[aRow]; if (node !== undefined) return node; @@ -885,7 +885,7 @@ PlacesTreeView.prototype = { PlacesUtils.livemarks.getLivemark({ id: aNode.itemId }) .then(aLivemark => { - let shouldInvalidate = + let shouldInvalidate = !this._controller.hasCachedLivemarkInfo(aNode); this._controller.cacheLivemarkInfo(aNode, aLivemark); if (aNewState == Components.interfaces.nsINavHistoryContainerResultNode.STATE_OPENED) { diff --git a/browser/components/places/tests/browser/browser_475045.js b/browser/components/places/tests/browser/browser_475045.js index 601b9e704ef4..e7ea58a01143 100644 --- a/browser/components/places/tests/browser/browser_475045.js +++ b/browser/components/places/tests/browser/browser_475045.js @@ -26,9 +26,9 @@ add_task(function* test() { ok(placesItems.localName == "scrollbox", "PlacesToolbarItems should not be null"); ok(placesItems.childNodes[0], "PlacesToolbarItems must have at least one child"); - /** + /** * Simulates a drop of a URI onto the bookmarks bar. - * + * * @param aEffect * The effect to use for the drop operation: move, copy, or link. * @param aMimeType @@ -38,22 +38,22 @@ add_task(function* test() { const uriSpec = "http://www.mozilla.org/D1995729-A152-4e30-8329-469B01F30AA7"; let uri = makeURI(uriSpec); ChromeUtils.synthesizeDrop(placesItems.childNodes[0], - placesItems, - [[{type: aMimeType, - data: uriSpec}]], + placesItems, + [[{type: aMimeType, + data: uriSpec}]], aEffect, window); // Verify that the drop produces exactly one bookmark. let bookmarkIds = PlacesUtils.bookmarks .getBookmarkIdsForURI(uri); ok(bookmarkIds.length == 1, "There should be exactly one bookmark"); - + PlacesUtils.bookmarks.removeItem(bookmarkIds[0]); // Verify that we removed the bookmark successfully. ok(!PlacesUtils.bookmarks.isBookmarked(uri), "URI should be removed"); - } - + } + // Simulate a bookmark drop for all of the mime types and effects. let mimeTypes = ["text/plain", "text/unicode", "text/x-moz-url"]; let effects = ["move", "copy", "link"]; diff --git a/browser/components/places/tests/browser/browser_views_liveupdate.js b/browser/components/places/tests/browser/browser_views_liveupdate.js index bbf81028077c..58960ab70a8a 100644 --- a/browser/components/places/tests/browser/browser_views_liveupdate.js +++ b/browser/components/places/tests/browser/browser_views_liveupdate.js @@ -49,7 +49,7 @@ function fakeOpenPopup(aPopup) { popupEvent.initMouseEvent("popupshowing", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); - aPopup.dispatchEvent(popupEvent); + aPopup.dispatchEvent(popupEvent); } /** @@ -474,7 +474,7 @@ function getViewsForFolder(aFolderId) { break; case PlacesUtils.unfiledBookmarksFolderId: return ["sidebar"] - break; + break; } return new Array(); } diff --git a/browser/components/places/tests/unit/test_PUIU_makeTransaction.js b/browser/components/places/tests/unit/test_PUIU_makeTransaction.js index 20029a441a5d..a328af1345e9 100644 --- a/browser/components/places/tests/unit/test_PUIU_makeTransaction.js +++ b/browser/components/places/tests/unit/test_PUIU_makeTransaction.js @@ -228,7 +228,7 @@ add_test(function test_separator() let id = PlacesUtils.bookmarks.insertSeparator(PlacesUtils.unfiledBookmarksFolderId, PlacesUtils.bookmarks.DEFAULT_INDEX); PlacesUtils.annotations.setItemAnnotation(id, "random-anno", - "random-value", 0, + "random-value", 0, PlacesUtils.annotations.EXPIRE_NEVER); }); diff --git a/browser/components/safebrowsing/content/test/browser_bug400731.js b/browser/components/safebrowsing/content/test/browser_bug400731.js index 2f2c2739b0f8..1abfc3b943f5 100644 --- a/browser/components/safebrowsing/content/test/browser_bug400731.js +++ b/browser/components/safebrowsing/content/test/browser_bug400731.js @@ -2,9 +2,9 @@ function test() { waitForExplicitFinish(); - + gBrowser.selectedTab = gBrowser.addTab(); - + // Navigate to malware site. Can't use an onload listener here since // error pages don't fire onload. Also can't register the DOMContentLoaded // handler here because registering it too soon would mean that we might @@ -30,7 +30,7 @@ function testMalware(event) { // Confirm that "Ignore this warning" is visible - bug 422410 var el = content.document.getElementById("ignoreWarningButton"); ok(el, "Ignore warning button should be present for malware"); - + var style = content.getComputedStyle(el, null); is(style.display, "inline-block", "Ignore Warning button should be display:inline-block for malware"); @@ -65,13 +65,13 @@ function testPhishing(event) { } window.removeEventListener("DOMContentLoaded", testPhishing, true); - + var el = content.document.getElementById("ignoreWarningButton"); ok(el, "Ignore warning button should be present for phishing"); - + var style = content.getComputedStyle(el, null); is(style.display, "inline-block", "Ignore Warning button should be display:inline-block for phishing"); - + gBrowser.removeCurrentTab(); finish(); } diff --git a/browser/components/safebrowsing/content/test/browser_bug415846.js b/browser/components/safebrowsing/content/test/browser_bug415846.js index db278143bd0a..4c19ca81ff68 100644 --- a/browser/components/safebrowsing/content/test/browser_bug415846.js +++ b/browser/components/safebrowsing/content/test/browser_bug415846.js @@ -21,20 +21,20 @@ function testNormal() { // open the menu, to force it to update menu = document.getElementById("menu_HelpPopup"); ok(menu, "Help menu should exist!"); - + menu.addEventListener("popupshown", testNormal_PopupListener, false); menu.openPopup(null, "", 0, 0, false, null); } function testNormal_PopupListener() { menu.removeEventListener("popupshown", testNormal_PopupListener, false); - + var reportMenu = document.getElementById("menu_HelpPopup_reportPhishingtoolmenu"); var errorMenu = document.getElementById("menu_HelpPopup_reportPhishingErrortoolmenu"); is(reportMenu.hidden, false, "Report phishing menu should be visible on normal sites"); is(errorMenu.hidden, true, "Report error menu item should be hidden on normal sites"); menu.hidePopup(); - + // Now launch the phishing test. Can't use onload here because error pages don't // fire normal load events. window.addEventListener("DOMContentLoaded", testPhishing, true); @@ -50,13 +50,13 @@ function testPhishing() { function testPhishing_PopupListener() { menu.removeEventListener("popupshown", testPhishing_PopupListener, false); - + var reportMenu = document.getElementById("menu_HelpPopup_reportPhishingtoolmenu"); var errorMenu = document.getElementById("menu_HelpPopup_reportPhishingErrortoolmenu"); is(reportMenu.hidden, true, "Report phishing menu should be hidden on phishing sites"); is(errorMenu.hidden, false, "Report error menu item should be visible on phishing sites"); menu.hidePopup(); - + gBrowser.removeCurrentTab(); finish(); } diff --git a/browser/components/search/test/browser_bing_behavior.js b/browser/components/search/test/browser_bing_behavior.js index c7d9b75ec51a..1ea6a9d401b6 100644 --- a/browser/components/search/test/browser_bing_behavior.js +++ b/browser/components/search/test/browser_bing_behavior.js @@ -17,7 +17,7 @@ function test() { let previouslySelectedEngine = Services.search.currentEngine; Services.search.currentEngine = engine; engine.alias = "b"; - + let base = "https://www.bing.com/search?q=foo&pc=MOZI"; let url; diff --git a/browser/extensions/pocket/content/panels/js/saved.js b/browser/extensions/pocket/content/panels/js/saved.js index 8079df160543..83b8180539c3 100644 --- a/browser/extensions/pocket/content/panels/js/saved.js +++ b/browser/extensions/pocket/content/panels/js/saved.js @@ -2,7 +2,7 @@ PKT_SAVED_OVERLAY is the view itself and contains all of the methods to manipute the overlay and messaging. It does not contain any logic for saving or communication with the extension or server. */ -var PKT_SAVED_OVERLAY = function (options) +var PKT_SAVED_OVERLAY = function (options) { var myself = this; this.inited = false; @@ -49,7 +49,7 @@ var PKT_SAVED_OVERLAY = function (options) }; this.fillSuggestedTags = function() { - if (!$('.pkt_ext_suggestedtag_detail').length) + if (!$('.pkt_ext_suggestedtag_detail').length) { myself.suggestedTagsLoaded = true; myself.startCloseTimer(); @@ -59,16 +59,16 @@ var PKT_SAVED_OVERLAY = function (options) thePKT_SAVED.sendMessage("getSuggestedTags", { url: myself.savedUrl - }, function(resp) + }, function(resp) { $('.pkt_ext_suggestedtag_detail').removeClass('pkt_ext_suggestedtag_detail_loading'); - if (resp.status == 'success') + if (resp.status == 'success') { var newtags = []; for (var i = 0; i < resp.value.suggestedTags.length; i++) { newtags.push(resp.value.suggestedTags[i].tag); - } + } myself.suggestedTagsLoaded = true; if (!myself.mouseInside) { myself.startCloseTimer(); @@ -99,25 +99,25 @@ var PKT_SAVED_OVERLAY = function (options) myself.closeValid = false; }); }; - this.startCloseTimer = function(manualtime) + this.startCloseTimer = function(manualtime) { var settime = manualtime ? manualtime : myself.autocloseTiming; - if (typeof myself.autocloseTimer == 'number') + if (typeof myself.autocloseTimer == 'number') { clearTimeout(myself.autocloseTimer); } - myself.autocloseTimer = setTimeout(function() + myself.autocloseTimer = setTimeout(function() { - if (myself.closeValid || myself.preventCloseTimerCancel) + if (myself.closeValid || myself.preventCloseTimerCancel) { myself.preventCloseTimerCancel = false; myself.closePopup(); } }, settime); }; - this.stopCloseTimer = function() + this.stopCloseTimer = function() { - if (myself.preventCloseTimerCancel) + if (myself.preventCloseTimerCancel) { return; } @@ -183,7 +183,7 @@ var PKT_SAVED_OVERLAY = function (options) if (r.test(myself.userTags[i]) && limit > 0) { returnlist.push({name:myself.userTags[i]}); limit--; - } + } } } if (!$('.token-input-dropdown-tag').data('init')) { @@ -206,7 +206,7 @@ var PKT_SAVED_OVERLAY = function (options) else { myself.hideTagsError(); return {name:myself.sanitizeText(text.toLowerCase())}; - } + } }, onReady: function() { $('.token-input-dropdown').addClass('token-input-dropdown-tag'); @@ -317,11 +317,11 @@ var PKT_SAVED_OVERLAY = function (options) tags: originaltags }, function(resp) { - if (resp.status == 'success') + if (resp.status == 'success') { myself.showStateFinalMsg(myself.dictJSON.tagssaved); } - else if (resp.status == 'error') + else if (resp.status == 'error') { $('.pkt_ext_edit_msg').addClass('pkt_ext_edit_msg_error pkt_ext_edit_msg_active').text(resp.error.message); } @@ -381,7 +381,7 @@ var PKT_SAVED_OVERLAY = function (options) $('.token-input-token').each(function(index, element) { activetokenstext += $(element).find('p').text() + '|'; }); - + var inactivetags = $('.pkt_ext_suggestedtag_detail').find('.token_tag_inactive'); inactivetags.each(function(index,element) { if (activetokenstext.indexOf('|' + $(element).text() + '|') == -1) { @@ -465,7 +465,7 @@ var PKT_SAVED_OVERLAY = function (options) }; PKT_SAVED_OVERLAY.prototype = { - create : function() + create : function() { if (this.active) { @@ -580,11 +580,11 @@ PKT_SAVED.prototype = { { myself.overlay.showStateError(myself.overlay.dictJSON.pagenotsaved,resp.error.message); } - } + } else { myself.overlay.showStateError(myself.overlay.dictJSON.pagenotsaved,myself.overlay.dictJSON.errorgeneric); - } + } return; } diff --git a/browser/extensions/pocket/content/panels/js/signup.js b/browser/extensions/pocket/content/panels/js/signup.js index ab5b0896bfff..75c4427aec98 100644 --- a/browser/extensions/pocket/content/panels/js/signup.js +++ b/browser/extensions/pocket/content/panels/js/signup.js @@ -2,7 +2,7 @@ PKT_SIGNUP_OVERLAY is the view itself and contains all of the methods to manipute the overlay and messaging. It does not contain any logic for saving or communication with the extension or server. */ -var PKT_SIGNUP_OVERLAY = function (options) +var PKT_SIGNUP_OVERLAY = function (options) { var myself = this; this.inited = false; @@ -62,7 +62,7 @@ var PKT_SIGNUP_OVERLAY = function (options) }; PKT_SIGNUP_OVERLAY.prototype = { - create : function() + create : function() { var myself = this; diff --git a/browser/extensions/pocket/content/pktApi.jsm b/browser/extensions/pocket/content/pktApi.jsm index c5e89431cca5..c78413fe2504 100644 --- a/browser/extensions/pocket/content/pktApi.jsm +++ b/browser/extensions/pocket/content/pktApi.jsm @@ -15,10 +15,10 @@ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -96,7 +96,7 @@ var pktApi = (function() { // Handle non-exception-throwing cases: // Neither JSON.parse(false) or JSON.parse(1234) throw errors, hence the type-checking, - // but... JSON.parse(null) returns 'null', and typeof null === "object", + // but... JSON.parse(null) returns 'null', and typeof null === "object", // so we must check for that, too. if (o && typeof o === "object" && o !== null) { return o; @@ -121,10 +121,10 @@ var pktApi = (function() { function getSetting(key) { // TODO : Move this to sqlite or a local file so it's not editable (and is safer) // https://developer.mozilla.org/en-US/Add-ons/Overlay_Extensions/XUL_School/Local_Storage - + if (!prefBranch.prefHasUserValue(key)) return undefined; - + return prefBranch.getComplexValue(key, Components.interfaces.nsISupportsString).data; } @@ -138,7 +138,7 @@ var pktApi = (function() { function setSetting(key, value) { // TODO : Move this to sqlite or a local file so it's not editable (and is safer) // https://developer.mozilla.org/en-US/Add-ons/Overlay_Extensions/XUL_School/Local_Storage - + if (!value) prefBranch.clearUserPref(key); else @@ -159,7 +159,7 @@ var pktApi = (function() { * The return format: { cookieName:cookieValue, cookieName:cookieValue, ... } */ function getCookiesFromPocket() { - + var cookieManager = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager2); var pocketCookies = cookieManager.getCookiesFromHost(pocketSiteHost); var cookies = {}; diff --git a/browser/modules/FormSubmitObserver.jsm b/browser/modules/FormSubmitObserver.jsm index e4d3e765edf2..88c12327e819 100644 --- a/browser/modules/FormSubmitObserver.jsm +++ b/browser/modules/FormSubmitObserver.jsm @@ -42,7 +42,7 @@ FormSubmitObserver.prototype = { this._content = aWindow; this._tab = aTabChildGlobal; - this._mm = + this._mm = this._content.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDocShell) .sameTypeRootTreeItem @@ -103,7 +103,7 @@ FormSubmitObserver.prototype = if (!aInvalidElements.length) { return; } - + // Insure that this is the FormSubmitObserver associated with the form // element / window this notification is about. if (this._content != aFormElement.ownerDocument.defaultView.top.document.defaultView) { @@ -142,7 +142,7 @@ FormSubmitObserver.prototype = /* * Internal */ - + /* * Handles input changes on the form element we've associated a popup * with. Updates the validation message or closes the popup if form data diff --git a/browser/modules/WindowsJumpLists.jsm b/browser/modules/WindowsJumpLists.jsm index 181f47765509..d6c8ffb3855a 100644 --- a/browser/modules/WindowsJumpLists.jsm +++ b/browser/modules/WindowsJumpLists.jsm @@ -146,7 +146,7 @@ this.WinTaskbarJumpList = /** * Startup, shutdown, and update - */ + */ startup: function WTBJL_startup() { // exit if this isn't win7 or higher. @@ -155,7 +155,7 @@ this.WinTaskbarJumpList = // Win shell shortcut maintenance. If we've gone through an update, // this will update any pinned taskbar shortcuts. Not specific to - // jump lists, but this was a convienent place to call it. + // jump lists, but this was a convienent place to call it. try { // dev builds may not have helper.exe, ignore failures. this._shortcutMaintenance(); @@ -253,13 +253,13 @@ this.WinTaskbarJumpList = /** * Taskbar api wrappers - */ + */ _startBuild: function WTBJL__startBuild() { var removedItems = Cc["@mozilla.org/array;1"]. createInstance(Ci.nsIMutableArray); this._builder.abortListBuild(); - if (this._builder.initListBuild(removedItems)) { + if (this._builder.initListBuild(removedItems)) { // Prior to building, delete removed items from history. this._clearHistory(removedItems); return true; @@ -283,7 +283,7 @@ this.WinTaskbarJumpList = task.args, task.iconIndex, null); items.appendElement(item, false); }, this); - + if (items.length > 0) this._builder.addListToBuild(this._builder.JUMPLIST_CATEGORY_TASKS, items); }, @@ -324,7 +324,7 @@ this.WinTaskbarJumpList = let title = aResult.title || aResult.uri; let faviconPageUri = Services.io.newURI(aResult.uri, null, null); - let shortcut = this._getHandlerAppItem(title, title, aResult.uri, 1, + let shortcut = this._getHandlerAppItem(title, title, aResult.uri, 1, faviconPageUri); items.appendElement(shortcut, false); this._frequentHashList.push(aResult.uri); @@ -386,8 +386,8 @@ this.WinTaskbarJumpList = * Jump list item creation helpers */ - _getHandlerAppItem: function WTBJL__getHandlerAppItem(name, description, - args, iconIndex, + _getHandlerAppItem: function WTBJL__getHandlerAppItem(name, description, + args, iconIndex, faviconPageUri) { var file = Services.dirsvc.get("XREExeF", Ci.nsILocalFile); @@ -469,7 +469,7 @@ this.WinTaskbarJumpList = /** * Prefs utilities - */ + */ _refreshPrefs: function WTBJL__refreshPrefs() { this._enabled = _prefs.getBoolPref(PREF_TASKBAR_ENABLED); @@ -481,7 +481,7 @@ this.WinTaskbarJumpList = /** * Init and shutdown utilities - */ + */ _initTaskbar: function WTBJL__initTaskbar() { this._builder = _taskbarService.createJumpListBuilder(); @@ -499,7 +499,7 @@ this.WinTaskbarJumpList = Services.obs.addObserver(this, "browser:purge-session-history", false); _prefs.addObserver("", this, false); }, - + _freeObs: function WTBJL__freeObs() { Services.obs.removeObserver(this, "profile-before-change"); Services.obs.removeObserver(this, "browser:purge-session-history"); diff --git a/browser/modules/WindowsPreviewPerTab.jsm b/browser/modules/WindowsPreviewPerTab.jsm index 3a0114256919..665d7b8c7f82 100644 --- a/browser/modules/WindowsPreviewPerTab.jsm +++ b/browser/modules/WindowsPreviewPerTab.jsm @@ -31,7 +31,7 @@ * Screen real estate is limited so when there are too many thumbnails to fit * on the screen, the taskbar stops displaying thumbnails and instead displays * just the title, icon and close button in a similar fashion to previous - * versions of the taskbar. If there are still too many previews to fit on the + * versions of the taskbar. If there are still too many previews to fit on the * screen, the taskbar resorts to a scroll up and scroll down button pair to let * the user scroll through the list of tabs. Since this is undoubtedly * inconvenient for users with many tabs, the AeroPeek objects turns off all of diff --git a/browser/modules/offlineAppCache.jsm b/browser/modules/offlineAppCache.jsm index 00ded0956901..41212a07142d 100644 --- a/browser/modules/offlineAppCache.jsm +++ b/browser/modules/offlineAppCache.jsm @@ -1,7 +1,7 @@ /* 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/. */ - + this.EXPORTED_SYMBOLS = ["OfflineAppCacheHelper"]; Components.utils.import('resource://gre/modules/LoadContextInfo.jsm'); diff --git a/storage/test/unit/test_storage_statement.js b/storage/test/unit/test_storage_statement.js index 08f5889a9329..7e2841f9a3fc 100644 --- a/storage/test/unit/test_storage_statement.js +++ b/storage/test/unit/test_storage_statement.js @@ -168,7 +168,7 @@ function test_failed_execute() function test_bind_undefined() { var stmt = createStatement("INSERT INTO test (name) VALUES ('foo')"); - + expectError(Cr.NS_ERROR_ILLEGAL_VALUE, () => stmt.bindParameters(undefined)); diff --git a/toolkit/.eslintrc b/toolkit/.eslintrc index 402c0f359341..e32893b3fd5a 100644 --- a/toolkit/.eslintrc +++ b/toolkit/.eslintrc @@ -137,7 +137,7 @@ // "no-spaced-func": 2, // No trailing whitespace - // "no-trailing-spaces": 2, + "no-trailing-spaces": 2, // No using undeclared variables // "no-undef": 2, diff --git a/toolkit/components/alerts/test/test_alerts.html b/toolkit/components/alerts/test/test_alerts.html index dc0ed90c6777..cb087e48acef 100644 --- a/toolkit/components/alerts/test/test_alerts.html +++ b/toolkit/components/alerts/test/test_alerts.html @@ -52,7 +52,7 @@ function runTest() { getService(Ci.nsIAlertsService); ok(true, "Alerts service is available"); } catch (ex) { - todo(false, + todo(false, "Alerts service is not available.", ex); return; } diff --git a/toolkit/components/apppicker/content/appPicker.js b/toolkit/components/apppicker/content/appPicker.js index e799dee62df3..f28e31e58ef6 100644 --- a/toolkit/components/apppicker/content/appPicker.js +++ b/toolkit/components/apppicker/content/appPicker.js @@ -6,14 +6,14 @@ Components.utils.import("resource://gre/modules/AppConstants.jsm"); function AppPicker() {}; -AppPicker.prototype = +AppPicker.prototype = { // Class members _incomingParams:null, - /** + /** * Init the dialog and populate the application list - */ + */ appPickerLoad: function appPickerLoad() { const nsILocalHandlerApp = Components.interfaces.nsILocalHandlerApp; @@ -22,9 +22,9 @@ AppPicker.prototype = document.title = this._incomingParams.title; - // Header creation - at the very least, we must have + // Header creation - at the very least, we must have // a mime type: - // + // // (icon) Zip File // (icon) filename // @@ -44,9 +44,9 @@ AppPicker.prototype = description = filename; filename = ""; } - + // Setup the dialog header information - document.getElementById("content-description").setAttribute("value", + document.getElementById("content-description").setAttribute("value", description); document.getElementById("suggested-filename").setAttribute("value", filename); @@ -60,13 +60,13 @@ AppPicker.prototype = var list = document.getElementById("app-picker-listbox"); var primaryCount = 0; - + if (!fileList || fileList.length == 0) { // display a message saying nothing is configured document.getElementById("app-picker-notfound").removeAttribute("hidden"); return; } - + for (var idx = 0; idx < fileList.length; idx++) { var file = fileList.queryElementAt(idx, nsILocalHandlerApp); try { @@ -92,9 +92,9 @@ AppPicker.prototype = } }, - /** + /** * Retrieve the moz-icon for the app - */ + */ getFileIconURL: function getFileIconURL(file) { var ios = Components.classes["@mozilla.org/network/io-service;1"]. getService(Components.interfaces.nsIIOService); @@ -111,9 +111,9 @@ AppPicker.prototype = return "moz-icon://" + urlSpec + "?size=32"; }, - /** + /** * Retrieve the pretty description from the file - */ + */ getFileDisplayName: function getFileDisplayName(file) { if (AppConstants.platform == "win") { if (file instanceof Components.interfaces.nsILocalFileWin) { @@ -179,7 +179,7 @@ AppPicker.prototype = fp.init(window, this._incomingParams.title, nsIFilePicker.modeOpen); fp.appendFilters(nsIFilePicker.filterApps); - + var fileLoc = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties); var startLocation; @@ -190,11 +190,11 @@ AppPicker.prototype = } else { startLocation = "Home"; } - fp.displayDirectory = + fp.displayDirectory = fileLoc.get(startLocation, Components.interfaces.nsILocalFile); - + if (fp.show() == nsIFilePicker.returnOK && fp.file) { - var localHandlerApp = + var localHandlerApp = Components.classes["@mozilla.org/uriloader/local-handler-app;1"]. createInstance(Components.interfaces.nsILocalHandlerApp); localHandlerApp.executable = fp.file; diff --git a/toolkit/components/autocomplete/tests/unit/head_autocomplete.js b/toolkit/components/autocomplete/tests/unit/head_autocomplete.js index b5a01ff61210..7d5b13f2c562 100644 --- a/toolkit/components/autocomplete/tests/unit/head_autocomplete.js +++ b/toolkit/components/autocomplete/tests/unit/head_autocomplete.js @@ -8,23 +8,23 @@ var Ci = Components.interfaces; /** * Dummy nsIAutoCompleteInput source that returns - * the given list of AutoCompleteSearch names. - * + * the given list of AutoCompleteSearch names. + * * Implements only the methods needed for this test. */ function AutoCompleteInputBase(aSearches) { this.searches = aSearches; } AutoCompleteInputBase.prototype = { - + // Array of AutoCompleteSearch names searches: null, - + minResultsForPopup: 0, timeout: 10, searchParam: "", textValue: "", - disableAutoComplete: false, + disableAutoComplete: false, completeDefaultIndex: false, // Text selection range @@ -40,20 +40,20 @@ AutoCompleteInputBase.prototype = { this._selStart = aStart; this._selEnd = aEnd; }, - + get searchCount() { return this.searches.length; }, - + getSearchAt: function(aIndex) { return this.searches[aIndex]; }, - + onSearchBegin: function() {}, onSearchComplete: function() {}, - - popupOpen: false, - + + popupOpen: false, + get popup() { if (!this._popup) { this._popup = new AutocompletePopupBase(this); @@ -65,14 +65,14 @@ AutoCompleteInputBase.prototype = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteInput]) } -/** +/** * nsIAutoCompleteResult implementation */ function AutoCompleteResultBase(aValues) { this._values = aValues; } AutoCompleteResultBase.prototype = { - + // Arrays _values: null, _comments: [], @@ -81,9 +81,9 @@ AutoCompleteResultBase.prototype = { searchString: "", searchResult: null, - + defaultIndex: -1, - + _typeAheadResult: false, get typeAheadResult() { return this._typeAheadResult; @@ -100,15 +100,15 @@ AutoCompleteResultBase.prototype = { getLabelAt: function(aIndex) { return this.getValueAt(aIndex); }, - + getCommentAt: function(aIndex) { return this._comments[aIndex]; }, - + getStyleAt: function(aIndex) { return this._styles[aIndex]; }, - + getImageAt: function(aIndex) { return ""; }, @@ -123,7 +123,7 @@ AutoCompleteResultBase.prototype = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteResult]) } -/** +/** * nsIAutoCompleteSearch implementation that always returns * the same result set. */ @@ -132,29 +132,29 @@ function AutoCompleteSearchBase(aName, aResult) { this._result = aResult; } AutoCompleteSearchBase.prototype = { - + // Search name. Used by AutoCompleteController name: null, // AutoCompleteResult _result: null, - startSearch: function(aSearchString, - aSearchParam, - aPreviousResult, + startSearch: function(aSearchString, + aSearchParam, + aPreviousResult, aListener) { var result = this._result; result.searchResult = Ci.nsIAutoCompleteResult.RESULT_SUCCESS; aListener.onSearchResult(this, result); }, - + stopSearch: function() {}, // nsISupports implementation QueryInterface: XPCOMUtils.generateQI([Ci.nsIFactory, Ci.nsIAutoCompleteSearch]), - + // nsIFactory implementation createInstance: function(outer, iid) { return this.QueryInterface(iid); @@ -180,7 +180,7 @@ AutocompletePopupBase.prototype = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompletePopup]), }; -/** +/** * Helper to register an AutoCompleteSearch with the given name. * Allows the AutoCompleteController to find the search. */ @@ -196,15 +196,15 @@ function registerAutoCompleteSearch(aSearch) { componentManager.registerFactory(cid, desc, name, aSearch); // Keep the id on the object so we can unregister later - aSearch.cid = cid; + aSearch.cid = cid; } -/** - * Helper to unregister an AutoCompleteSearch. +/** + * Helper to unregister an AutoCompleteSearch. */ function unregisterAutoCompleteSearch(aSearch) { var componentManager = Components.manager - .QueryInterface(Ci.nsIComponentRegistrar); + .QueryInterface(Ci.nsIComponentRegistrar); componentManager.unregisterFactory(aSearch.cid, aSearch); } diff --git a/toolkit/components/autocomplete/tests/unit/test_378079.js b/toolkit/components/autocomplete/tests/unit/test_378079.js index 75510980a45c..ad7e5590f21b 100644 --- a/toolkit/components/autocomplete/tests/unit/test_378079.js +++ b/toolkit/components/autocomplete/tests/unit/test_378079.js @@ -13,40 +13,40 @@ /** * Dummy nsIAutoCompleteInput source that returns - * the given list of AutoCompleteSearch names. - * + * the given list of AutoCompleteSearch names. + * * Implements only the methods needed for this test. */ function AutoCompleteInput(aSearches) { this.searches = aSearches; } AutoCompleteInput.prototype = { - constructor: AutoCompleteInput, - + constructor: AutoCompleteInput, + // Array of AutoCompleteSearch names searches: null, - + minResultsForPopup: 0, timeout: 10, searchParam: "", textValue: "", - disableAutoComplete: false, + disableAutoComplete: false, completeDefaultIndex: false, - + get searchCount() { return this.searches.length; }, - + getSearchAt: function(aIndex) { return this.searches[aIndex]; }, - + onSearchBegin: function() {}, onSearchComplete: function() {}, - - popupOpen: false, - - popup: { + + popupOpen: false, + + popup: { setSelectedIndex: function(aIndex) {}, invalidate: function() {}, @@ -57,9 +57,9 @@ AutoCompleteInput.prototype = { return this; throw Components.results.NS_ERROR_NO_INTERFACE; - } + } }, - + // nsISupports implementation QueryInterface: function(iid) { if (iid.equals(Ci.nsISupports) || @@ -72,14 +72,14 @@ AutoCompleteInput.prototype = { -/** +/** * nsIAutoCompleteResult implementation */ function AutoCompleteResult(aValues, aComments, aStyles) { this._values = aValues; this._comments = aComments; this._styles = aStyles; - + if (this._values.length > 0) { this.searchResult = Ci.nsIAutoCompleteResult.RESULT_SUCCESS; } else { @@ -88,15 +88,15 @@ function AutoCompleteResult(aValues, aComments, aStyles) { } AutoCompleteResult.prototype = { constructor: AutoCompleteResult, - + // Arrays _values: null, _comments: null, _styles: null, - + searchString: "", searchResult: null, - + defaultIndex: 0, get matchCount() { @@ -106,19 +106,19 @@ AutoCompleteResult.prototype = { getValueAt: function(aIndex) { return this._values[aIndex]; }, - + getLabelAt: function(aIndex) { return this.getValueAt(aIndex); }, - + getCommentAt: function(aIndex) { return this._comments[aIndex]; }, - + getStyleAt: function(aIndex) { return this._styles[aIndex]; }, - + getImageAt: function(aIndex) { return ""; }, @@ -136,12 +136,12 @@ AutoCompleteResult.prototype = { return this; throw Components.results.NS_ERROR_NO_INTERFACE; - } + } } -/** +/** * nsIAutoCompleteSearch implementation that always returns * the same result set. */ @@ -151,25 +151,25 @@ function AutoCompleteSearch(aName, aResult) { } AutoCompleteSearch.prototype = { constructor: AutoCompleteSearch, - + // Search name. Used by AutoCompleteController name: null, // AutoCompleteResult - _result:null, - - + _result:null, + + /** * Return the same result set for every search */ - startSearch: function(aSearchString, - aSearchParam, - aPreviousResult, - aListener) + startSearch: function(aSearchString, + aSearchParam, + aPreviousResult, + aListener) { aListener.onSearchResult(this, this._result); }, - + stopSearch: function() {}, // nsISupports implementation @@ -181,7 +181,7 @@ AutoCompleteSearch.prototype = { throw Components.results.NS_ERROR_NO_INTERFACE; }, - + // nsIFactory implementation createInstance: function(outer, iid) { return this.QueryInterface(iid); @@ -190,7 +190,7 @@ AutoCompleteSearch.prototype = { -/** +/** * Helper to register an AutoCompleteSearch with the given name. * Allows the AutoCompleteController to find the search. */ @@ -202,49 +202,49 @@ function registerAutoCompleteSearch(aSearch) { var cid = uuidGenerator.generateUUID(); var desc = "Test AutoCompleteSearch"; - + var componentManager = Components.manager .QueryInterface(Ci.nsIComponentRegistrar); componentManager.registerFactory(cid, desc, name, aSearch); // Keep the id on the object so we can unregister later - aSearch.cid = cid; + aSearch.cid = cid; } -/** - * Helper to unregister an AutoCompleteSearch. +/** + * Helper to unregister an AutoCompleteSearch. */ function unregisterAutoCompleteSearch(aSearch) { var componentManager = Components.manager - .QueryInterface(Ci.nsIComponentRegistrar); + .QueryInterface(Ci.nsIComponentRegistrar); componentManager.unregisterFactory(aSearch.cid, aSearch); } -/** +/** * Test AutoComplete with multiple AutoCompleteSearch sources. */ function run_test() { - + // Make an AutoCompleteSearch that always returns nothing - var emptySearch = new AutoCompleteSearch("test-empty-search", + var emptySearch = new AutoCompleteSearch("test-empty-search", new AutoCompleteResult([], [], [])); - + // Make an AutoCompleteSearch that returns two values var expectedValues = ["test1", "test2"]; var regularSearch = new AutoCompleteSearch("test-regular-search", new AutoCompleteResult(expectedValues, [], [])); - + // Register searches so AutoCompleteController can find them registerAutoCompleteSearch(emptySearch); registerAutoCompleteSearch(regularSearch); - + var controller = Components.classes["@mozilla.org/autocomplete/controller;1"]. - getService(Components.interfaces.nsIAutoCompleteController); - + getService(Components.interfaces.nsIAutoCompleteController); + // Make an AutoCompleteInput that uses our searches // and confirms results on search complete var input = new AutoCompleteInput([emptySearch.name, regularSearch.name]); @@ -259,13 +259,13 @@ function run_test() { do_check_eq(numSearchesStarted, 1); - do_check_eq(controller.searchStatus, + do_check_eq(controller.searchStatus, Ci.nsIAutoCompleteController.STATUS_COMPLETE_MATCH); do_check_eq(controller.matchCount, 2); // Confirm expected result values for (var i = 0; i < expectedValues.length; i++) { - do_check_eq(expectedValues[i], controller.getValueAt(i)); + do_check_eq(expectedValues[i], controller.getValueAt(i)); } // Unregister searches @@ -279,7 +279,7 @@ function run_test() { // Search is asynchronous, so don't let the test finish immediately do_test_pending(); - + controller.startSearch("test"); } diff --git a/toolkit/components/autocomplete/tests/unit/test_393191.js b/toolkit/components/autocomplete/tests/unit/test_393191.js index 30c782e71777..6fb57e6c4a75 100644 --- a/toolkit/components/autocomplete/tests/unit/test_393191.js +++ b/toolkit/components/autocomplete/tests/unit/test_393191.js @@ -12,40 +12,40 @@ /** * Dummy nsIAutoCompleteInput source that returns - * the given list of AutoCompleteSearch names. - * + * the given list of AutoCompleteSearch names. + * * Implements only the methods needed for this test. */ function AutoCompleteInput(aSearches) { this.searches = aSearches; } AutoCompleteInput.prototype = { - constructor: AutoCompleteInput, - + constructor: AutoCompleteInput, + // Array of AutoCompleteSearch names searches: null, - + minResultsForPopup: 0, timeout: 10, searchParam: "", textValue: "", - disableAutoComplete: false, + disableAutoComplete: false, completeDefaultIndex: false, - + get searchCount() { return this.searches.length; }, - + getSearchAt: function(aIndex) { return this.searches[aIndex]; }, - + onSearchBegin: function() {}, onSearchComplete: function() {}, - - popupOpen: false, - - popup: { + + popupOpen: false, + + popup: { setSelectedIndex: function(aIndex) {}, invalidate: function() {}, @@ -56,9 +56,9 @@ AutoCompleteInput.prototype = { return this; throw Components.results.NS_ERROR_NO_INTERFACE; - } + } }, - + // nsISupports implementation QueryInterface: function(iid) { if (iid.equals(Ci.nsISupports) || @@ -71,14 +71,14 @@ AutoCompleteInput.prototype = { -/** +/** * nsIAutoCompleteResult implementation */ function AutoCompleteResult(aValues, aComments, aStyles) { this._values = aValues; this._comments = aComments; this._styles = aStyles; - + if (this._values.length > 0) { this.searchResult = Ci.nsIAutoCompleteResult.RESULT_SUCCESS; } else { @@ -87,15 +87,15 @@ function AutoCompleteResult(aValues, aComments, aStyles) { } AutoCompleteResult.prototype = { constructor: AutoCompleteResult, - + // Arrays _values: null, _comments: null, _styles: null, - + searchString: "", searchResult: null, - + defaultIndex: 0, get matchCount() { @@ -109,15 +109,15 @@ AutoCompleteResult.prototype = { getLabelAt: function(aIndex) { return this.getValueAt(aIndex); }, - + getCommentAt: function(aIndex) { return this._comments[aIndex]; }, - + getStyleAt: function(aIndex) { return this._styles[aIndex]; }, - + getImageAt: function(aIndex) { return ""; }, @@ -135,12 +135,12 @@ AutoCompleteResult.prototype = { return this; throw Components.results.NS_ERROR_NO_INTERFACE; - } + } } -/** +/** * nsIAutoCompleteSearch implementation that always returns * the same result set. */ @@ -150,25 +150,25 @@ function AutoCompleteSearch(aName, aResult) { } AutoCompleteSearch.prototype = { constructor: AutoCompleteSearch, - + // Search name. Used by AutoCompleteController name: null, // AutoCompleteResult _result: null, - - + + /** * Return the same result set for every search */ - startSearch: function(aSearchString, - aSearchParam, - aPreviousResult, - aListener) + startSearch: function(aSearchString, + aSearchParam, + aPreviousResult, + aListener) { aListener.onSearchResult(this, this._result); }, - + stopSearch: function() {}, // nsISupports implementation @@ -180,7 +180,7 @@ AutoCompleteSearch.prototype = { throw Components.results.NS_ERROR_NO_INTERFACE; }, - + // nsIFactory implementation createInstance: function(outer, iid) { return this.QueryInterface(iid); @@ -189,7 +189,7 @@ AutoCompleteSearch.prototype = { -/** +/** * Helper to register an AutoCompleteSearch with the given name. * Allows the AutoCompleteController to find the search. */ @@ -201,43 +201,43 @@ function registerAutoCompleteSearch(aSearch) { var cid = uuidGenerator.generateUUID(); var desc = "Test AutoCompleteSearch"; - + var componentManager = Components.manager .QueryInterface(Ci.nsIComponentRegistrar); componentManager.registerFactory(cid, desc, name, aSearch); // Keep the id on the object so we can unregister later - aSearch.cid = cid; + aSearch.cid = cid; } -/** - * Helper to unregister an AutoCompleteSearch. +/** + * Helper to unregister an AutoCompleteSearch. */ function unregisterAutoCompleteSearch(aSearch) { var componentManager = Components.manager - .QueryInterface(Ci.nsIComponentRegistrar); + .QueryInterface(Ci.nsIComponentRegistrar); componentManager.unregisterFactory(aSearch.cid, aSearch); } -/** +/** * Test AutoComplete with a search that returns a null result */ function run_test() { - + // Make an AutoCompleteSearch that always returns nothing - var emptySearch = new AutoCompleteSearch("test-empty-search", + var emptySearch = new AutoCompleteSearch("test-empty-search", new AutoCompleteResult([], [], [])); - + // Register search so AutoCompleteController can find them registerAutoCompleteSearch(emptySearch); - + var controller = Components.classes["@mozilla.org/autocomplete/controller;1"]. - getService(Components.interfaces.nsIAutoCompleteController); - + getService(Components.interfaces.nsIAutoCompleteController); + // Make an AutoCompleteInput that uses our search // and confirms results on search complete var input = new AutoCompleteInput([emptySearch.name]); @@ -252,7 +252,7 @@ function run_test() { do_check_eq(numSearchesStarted, 1); - do_check_eq(controller.searchStatus, + do_check_eq(controller.searchStatus, Ci.nsIAutoCompleteController.STATUS_COMPLETE_NO_MATCH); do_check_eq(controller.matchCount, 0); @@ -266,7 +266,7 @@ function run_test() { // Search is asynchronous, so don't let the test finish immediately do_test_pending(); - + controller.startSearch("test"); } diff --git a/toolkit/components/autocomplete/tests/unit/test_autocomplete_multiple.js b/toolkit/components/autocomplete/tests/unit/test_autocomplete_multiple.js index 87c3dff7aae4..b7698364845c 100644 --- a/toolkit/components/autocomplete/tests/unit/test_autocomplete_multiple.js +++ b/toolkit/components/autocomplete/tests/unit/test_autocomplete_multiple.js @@ -6,40 +6,40 @@ /** * Dummy nsIAutoCompleteInput source that returns - * the given list of AutoCompleteSearch names. - * + * the given list of AutoCompleteSearch names. + * * Implements only the methods needed for this test. */ function AutoCompleteInput(aSearches) { this.searches = aSearches; } AutoCompleteInput.prototype = { - constructor: AutoCompleteInput, - + constructor: AutoCompleteInput, + // Array of AutoCompleteSearch names searches: null, - + minResultsForPopup: 0, timeout: 10, searchParam: "", textValue: "", - disableAutoComplete: false, + disableAutoComplete: false, completeDefaultIndex: false, - + get searchCount() { return this.searches.length; }, - + getSearchAt: function(aIndex) { return this.searches[aIndex]; }, - + onSearchBegin: function() {}, onSearchComplete: function() {}, - - popupOpen: false, - - popup: { + + popupOpen: false, + + popup: { setSelectedIndex: function(aIndex) {}, invalidate: function() {}, @@ -50,9 +50,9 @@ AutoCompleteInput.prototype = { return this; throw Components.results.NS_ERROR_NO_INTERFACE; - } + } }, - + // nsISupports implementation QueryInterface: function(iid) { if (iid.equals(Ci.nsISupports) || @@ -65,7 +65,7 @@ AutoCompleteInput.prototype = { -/** +/** * nsIAutoCompleteResult implementation */ function AutoCompleteResult(aValues, aComments, aStyles) { @@ -75,15 +75,15 @@ function AutoCompleteResult(aValues, aComments, aStyles) { } AutoCompleteResult.prototype = { constructor: AutoCompleteResult, - + // Arrays _values: null, _comments: null, _styles: null, - + searchString: "", searchResult: null, - + defaultIndex: 0, get matchCount() { @@ -97,15 +97,15 @@ AutoCompleteResult.prototype = { getLabelAt: function(aIndex) { return this.getValueAt(aIndex); }, - + getCommentAt: function(aIndex) { return this._comments[aIndex]; }, - + getStyleAt: function(aIndex) { return this._styles[aIndex]; }, - + getImageAt: function(aIndex) { return ""; }, @@ -123,12 +123,12 @@ AutoCompleteResult.prototype = { return this; throw Components.results.NS_ERROR_NO_INTERFACE; - } + } } -/** +/** * nsIAutoCompleteSearch implementation that always returns * the same result set. */ @@ -138,21 +138,21 @@ function AutoCompleteSearch(aName, aResult) { } AutoCompleteSearch.prototype = { constructor: AutoCompleteSearch, - + // Search name. Used by AutoCompleteController name: null, // AutoCompleteResult - _result:null, - - + _result:null, + + /** * Return the same result set for every search */ - startSearch: function(aSearchString, - aSearchParam, - aPreviousResult, - aListener) + startSearch: function(aSearchString, + aSearchParam, + aPreviousResult, + aListener) { var result = this._result; if (result._values.length > 0) { @@ -169,7 +169,7 @@ AutoCompleteSearch.prototype = { } aListener.onSearchResult(this, result); }, - + stopSearch: function() {}, // nsISupports implementation @@ -181,7 +181,7 @@ AutoCompleteSearch.prototype = { throw Components.results.NS_ERROR_NO_INTERFACE; }, - + // nsIFactory implementation createInstance: function(outer, iid) { return this.QueryInterface(iid); @@ -190,7 +190,7 @@ AutoCompleteSearch.prototype = { -/** +/** * Helper to register an AutoCompleteSearch with the given name. * Allows the AutoCompleteController to find the search. */ @@ -202,46 +202,46 @@ function registerAutoCompleteSearch(aSearch) { var cid = uuidGenerator.generateUUID(); var desc = "Test AutoCompleteSearch"; - + var componentManager = Components.manager .QueryInterface(Ci.nsIComponentRegistrar); componentManager.registerFactory(cid, desc, name, aSearch); // Keep the id on the object so we can unregister later - aSearch.cid = cid; + aSearch.cid = cid; } -/** - * Helper to unregister an AutoCompleteSearch. +/** + * Helper to unregister an AutoCompleteSearch. */ function unregisterAutoCompleteSearch(aSearch) { var componentManager = Components.manager - .QueryInterface(Ci.nsIComponentRegistrar); + .QueryInterface(Ci.nsIComponentRegistrar); componentManager.unregisterFactory(aSearch.cid, aSearch); } -/** +/** * Test AutoComplete with multiple AutoCompleteSearch sources. */ function run_test() { var expected1 = ["1","2","3"]; var expected2 = ["a","b","c"]; - var search1 = new AutoCompleteSearch("search1", + var search1 = new AutoCompleteSearch("search1", new AutoCompleteResult(expected1, [], [])); var search2 = new AutoCompleteSearch("search2", new AutoCompleteResult(expected2, [], [])); - + // Register searches so AutoCompleteController can find them registerAutoCompleteSearch(search1); registerAutoCompleteSearch(search2); - + var controller = Components.classes["@mozilla.org/autocomplete/controller;1"]. - getService(Components.interfaces.nsIAutoCompleteController); - + getService(Components.interfaces.nsIAutoCompleteController); + // Make an AutoCompleteInput that uses our searches // and confirms results on search complete var input = new AutoCompleteInput([search1.name, search2.name]); @@ -256,7 +256,7 @@ function run_test() { do_check_eq(numSearchesStarted, 1); - do_check_eq(controller.searchStatus, + do_check_eq(controller.searchStatus, Ci.nsIAutoCompleteController.STATUS_COMPLETE_MATCH); do_check_eq(controller.matchCount, expected1.length + expected2.length); @@ -271,6 +271,6 @@ function run_test() { // Search is asynchronous, so don't let the test finish immediately do_test_pending(); - + controller.startSearch("test"); } diff --git a/toolkit/components/autocomplete/tests/unit/test_badDefaultIndex.js b/toolkit/components/autocomplete/tests/unit/test_badDefaultIndex.js index 0ccbae319f1a..17f735388e6f 100644 --- a/toolkit/components/autocomplete/tests/unit/test_badDefaultIndex.js +++ b/toolkit/components/autocomplete/tests/unit/test_badDefaultIndex.js @@ -42,7 +42,7 @@ add_test(function autocomplete_noMatch_success() { do_check_eq(input.selectionEnd, strLen); let controller = Cc["@mozilla.org/autocomplete/controller;1"]. - getService(Ci.nsIAutoCompleteController); + getService(Ci.nsIAutoCompleteController); controller.input = input; controller.startSearch(INPUT_STR); @@ -77,7 +77,7 @@ add_test(function autocomplete_defaultIndex_exceeds_matchCount() { do_check_eq(input.selectionEnd, strLen); let controller = Cc["@mozilla.org/autocomplete/controller;1"]. - getService(Ci.nsIAutoCompleteController); + getService(Ci.nsIAutoCompleteController); controller.input = input; controller.startSearch(INPUT_STR); diff --git a/toolkit/components/autocomplete/tests/unit/test_completeDefaultIndex_casing.js b/toolkit/components/autocomplete/tests/unit/test_completeDefaultIndex_casing.js index b4478a00dc4d..c25b009071ac 100644 --- a/toolkit/components/autocomplete/tests/unit/test_completeDefaultIndex_casing.js +++ b/toolkit/components/autocomplete/tests/unit/test_completeDefaultIndex_casing.js @@ -41,8 +41,8 @@ function doSearch(aSearchString, aResultValue, aOnCompleteCallback) { registerAutoCompleteSearch(search); let controller = Cc["@mozilla.org/autocomplete/controller;1"]. - getService(Ci.nsIAutoCompleteController); - + getService(Ci.nsIAutoCompleteController); + // Make an AutoCompleteInput that uses our searches and confirms results. let input = new AutoCompleteInput([ search.name ]); input.textValue = aSearchString; diff --git a/toolkit/components/autocomplete/tests/unit/test_finalCompleteValue.js b/toolkit/components/autocomplete/tests/unit/test_finalCompleteValue.js index 1b75980acdf4..fcac8ae43f38 100644 --- a/toolkit/components/autocomplete/tests/unit/test_finalCompleteValue.js +++ b/toolkit/components/autocomplete/tests/unit/test_finalCompleteValue.js @@ -29,8 +29,8 @@ function doSearch(aSearchString, aResultValue, aFinalCompleteValue, aOnCompleteC registerAutoCompleteSearch(search); let controller = Cc["@mozilla.org/autocomplete/controller;1"]. - getService(Ci.nsIAutoCompleteController); - + getService(Ci.nsIAutoCompleteController); + // Make an AutoCompleteInput that uses our searches and confirms results. let input = new AutoCompleteInput([ search.name ]); input.textValue = aSearchString; diff --git a/toolkit/components/autocomplete/tests/unit/test_finalCompleteValue_forceComplete.js b/toolkit/components/autocomplete/tests/unit/test_finalCompleteValue_forceComplete.js index 56dc0905453f..5642d3e3ec84 100644 --- a/toolkit/components/autocomplete/tests/unit/test_finalCompleteValue_forceComplete.js +++ b/toolkit/components/autocomplete/tests/unit/test_finalCompleteValue_forceComplete.js @@ -79,8 +79,8 @@ function doSearch(aSearchString, aResultValue, aFinalCompleteValue, registerAutoCompleteSearch(search); let controller = Cc["@mozilla.org/autocomplete/controller;1"]. - getService(Ci.nsIAutoCompleteController); - + getService(Ci.nsIAutoCompleteController); + // Make an AutoCompleteInput that uses our searches and confirms results. let input = new AutoCompleteInput([ search.name ]); for (var p in aInputProps) { diff --git a/toolkit/components/autocomplete/tests/unit/test_finalDefaultCompleteValue.js b/toolkit/components/autocomplete/tests/unit/test_finalDefaultCompleteValue.js index c6302351d99d..c983d969b3b2 100644 --- a/toolkit/components/autocomplete/tests/unit/test_finalDefaultCompleteValue.js +++ b/toolkit/components/autocomplete/tests/unit/test_finalDefaultCompleteValue.js @@ -44,8 +44,8 @@ function doSearch(aSearchString, aResultValue, aFinalCompleteValue, aOnCompleteC registerAutoCompleteSearch(search); let controller = Cc["@mozilla.org/autocomplete/controller;1"]. - getService(Ci.nsIAutoCompleteController); - + getService(Ci.nsIAutoCompleteController); + // Make an AutoCompleteInput that uses our searches and confirms results. let input = new AutoCompleteInput([ search.name ]); input.textValue = aSearchString; diff --git a/toolkit/components/autocomplete/tests/unit/test_hiddenResult.js b/toolkit/components/autocomplete/tests/unit/test_hiddenResult.js index ed466021460b..8e2485716596 100644 --- a/toolkit/components/autocomplete/tests/unit/test_hiddenResult.js +++ b/toolkit/components/autocomplete/tests/unit/test_hiddenResult.js @@ -16,7 +16,7 @@ function AutoCompleteTypeAheadResult(aValues) { AutoCompleteTypeAheadResult.prototype = Object.create(AutoCompleteResultBase.prototype); -/** +/** * Test AutoComplete with multiple AutoCompleteSearch sources, with one of them * being hidden from the popup, but can still do typeahead completion. */ @@ -31,11 +31,11 @@ function run_test() { // Regular result var searchNormal = new AutoCompleteSearchBase("search2", new AutoCompleteResult(["mozillaTest2"])); - + // Register searches so AutoCompleteController can find them registerAutoCompleteSearch(searchNormal); registerAutoCompleteSearch(searchTypeAhead); - + // Make an AutoCompleteInput that uses our searches // and confirms results on search complete. var input = new AutoCompleteInputBase([searchTypeAhead.name, searchNormal.name]); @@ -50,7 +50,7 @@ function run_test() { do_check_eq(input.selectionEnd, strLen); var controller = Cc["@mozilla.org/autocomplete/controller;1"]. - getService(Ci.nsIAutoCompleteController); + getService(Ci.nsIAutoCompleteController); controller.input = input; controller.startSearch(inputStr); diff --git a/toolkit/components/autocomplete/tests/unit/test_immediate_search.js b/toolkit/components/autocomplete/tests/unit/test_immediate_search.js index 4c2d0edfbd4e..17016cefb855 100644 --- a/toolkit/components/autocomplete/tests/unit/test_immediate_search.js +++ b/toolkit/components/autocomplete/tests/unit/test_immediate_search.js @@ -46,7 +46,7 @@ add_test(function test_immediate_search() { registerAutoCompleteSearch(delayedSearch); let controller = Cc["@mozilla.org/autocomplete/controller;1"]. - getService(Ci.nsIAutoCompleteController); + getService(Ci.nsIAutoCompleteController); let input = new AutoCompleteInputBase([delayedSearch.name, immediateSearch.name]); @@ -91,7 +91,7 @@ add_test(function test_immediate_search_notimeout() { registerAutoCompleteSearch(delayedSearch); let controller = Cc["@mozilla.org/autocomplete/controller;1"]. - getService(Ci.nsIAutoCompleteController); + getService(Ci.nsIAutoCompleteController); let input = new AutoCompleteInputBase([delayedSearch.name, immediateSearch.name]); @@ -132,7 +132,7 @@ add_test(function test_delayed_search_notimeout() { registerAutoCompleteSearch(delayedSearch); let controller = Cc["@mozilla.org/autocomplete/controller;1"]. - getService(Ci.nsIAutoCompleteController); + getService(Ci.nsIAutoCompleteController); let input = new AutoCompleteInputBase([delayedSearch.name]); input.completeDefaultIndex = true; diff --git a/toolkit/components/autocomplete/tests/unit/test_previousResult.js b/toolkit/components/autocomplete/tests/unit/test_previousResult.js index 3038e778568f..426d4397ee13 100644 --- a/toolkit/components/autocomplete/tests/unit/test_previousResult.js +++ b/toolkit/components/autocomplete/tests/unit/test_previousResult.js @@ -12,40 +12,40 @@ /** * Dummy nsIAutoCompleteInput source that returns - * the given list of AutoCompleteSearch names. - * + * the given list of AutoCompleteSearch names. + * * Implements only the methods needed for this test. */ function AutoCompleteInput(aSearches) { this.searches = aSearches; } AutoCompleteInput.prototype = { - constructor: AutoCompleteInput, - + constructor: AutoCompleteInput, + // Array of AutoCompleteSearch names searches: null, - + minResultsForPopup: 0, timeout: 10, searchParam: "", textValue: "", - disableAutoComplete: false, + disableAutoComplete: false, completeDefaultIndex: false, - + get searchCount() { return this.searches.length; }, - + getSearchAt: function(aIndex) { return this.searches[aIndex]; }, - + onSearchBegin: function() {}, onSearchComplete: function() {}, - - popupOpen: false, - - popup: { + + popupOpen: false, + + popup: { setSelectedIndex: function(aIndex) {}, invalidate: function() {}, @@ -56,9 +56,9 @@ AutoCompleteInput.prototype = { return this; throw Components.results.NS_ERROR_NO_INTERFACE; - } + } }, - + // nsISupports implementation QueryInterface: function(iid) { if (iid.equals(Ci.nsISupports) || @@ -71,7 +71,7 @@ AutoCompleteInput.prototype = { -/** +/** * nsIAutoCompleteResult implementation */ function AutoCompleteResult(aValues, aComments, aStyles) { @@ -86,15 +86,15 @@ function AutoCompleteResult(aValues, aComments, aStyles) { } AutoCompleteResult.prototype = { constructor: AutoCompleteResult, - + // Arrays _values: null, _comments: null, _styles: null, - + searchString: "", searchResult: null, - + defaultIndex: 0, get matchCount() { @@ -108,15 +108,15 @@ AutoCompleteResult.prototype = { getLabelAt: function(aIndex) { return this.getValueAt(aIndex); }, - + getCommentAt: function(aIndex) { return this._comments[aIndex]; }, - + getStyleAt: function(aIndex) { return this._styles[aIndex]; }, - + getImageAt: function(aIndex) { return ""; }, @@ -134,11 +134,11 @@ AutoCompleteResult.prototype = { return this; throw Components.results.NS_ERROR_NO_INTERFACE; - } + } } -/** +/** * nsIAutoCompleteSearch implementation that always returns * the same result set. */ @@ -148,7 +148,7 @@ function AutoCompleteSearch(aName, aResult) { } AutoCompleteSearch.prototype = { constructor: AutoCompleteSearch, - + // Search name. Used by AutoCompleteController name: null, @@ -156,20 +156,20 @@ AutoCompleteSearch.prototype = { _result: null, _previousResult: null, - - + + /** * Return the same result set for every search */ - startSearch: function(aSearchString, - aSearchParam, - aPreviousResult, - aListener) + startSearch: function(aSearchString, + aSearchParam, + aPreviousResult, + aListener) { this._previousResult = aPreviousResult; aListener.onSearchResult(this, this._result); }, - + stopSearch: function() {}, // nsISupports implementation @@ -181,7 +181,7 @@ AutoCompleteSearch.prototype = { throw Components.results.NS_ERROR_NO_INTERFACE; }, - + // nsIFactory implementation createInstance: function(outer, iid) { return this.QueryInterface(iid); @@ -189,7 +189,7 @@ AutoCompleteSearch.prototype = { } -/** +/** * Helper to register an AutoCompleteSearch with the given name. * Allows the AutoCompleteController to find the search. */ @@ -201,34 +201,34 @@ function registerAutoCompleteSearch(aSearch) { var cid = uuidGenerator.generateUUID(); var desc = "Test AutoCompleteSearch"; - + var componentManager = Components.manager .QueryInterface(Ci.nsIComponentRegistrar); componentManager.registerFactory(cid, desc, name, aSearch); // Keep the id on the object so we can unregister later - aSearch.cid = cid; + aSearch.cid = cid; } -/** - * Helper to unregister an AutoCompleteSearch. +/** + * Helper to unregister an AutoCompleteSearch. */ function unregisterAutoCompleteSearch(aSearch) { var componentManager = Components.manager - .QueryInterface(Ci.nsIComponentRegistrar); + .QueryInterface(Ci.nsIComponentRegistrar); componentManager.unregisterFactory(aSearch.cid, aSearch); } -/** +/** */ function run_test() { // Make an AutoCompleteSearch that always returns nothing var search1 = new AutoCompleteSearch("test-previous-result1", new AutoCompleteResult(["hello1"], [""], [""])); - var search2 = new AutoCompleteSearch("test-previous-result2", + var search2 = new AutoCompleteSearch("test-previous-result2", new AutoCompleteResult(["hello2"], [""], [""])); // Register search so AutoCompleteController can find them @@ -250,7 +250,7 @@ function run_test() { }; input.onSearchComplete = function() { - do_check_eq(controller.searchStatus, + do_check_eq(controller.searchStatus, Ci.nsIAutoCompleteController.STATUS_COMPLETE_MATCH); do_check_eq(controller.matchCount, 2); @@ -278,7 +278,7 @@ function run_test() { // Search is asynchronous, so don't let the test finish immediately do_test_pending(); - + controller.startSearch("test"); } diff --git a/toolkit/components/autocomplete/tests/unit/test_stopSearch.js b/toolkit/components/autocomplete/tests/unit/test_stopSearch.js index 50e4c69248a9..5ef3454b4936 100644 --- a/toolkit/components/autocomplete/tests/unit/test_stopSearch.js +++ b/toolkit/components/autocomplete/tests/unit/test_stopSearch.js @@ -27,7 +27,7 @@ AutoCompleteInput.prototype = { timeout: 10, searchParam: "", textValue: "hello", - disableAutoComplete: false, + disableAutoComplete: false, completeDefaultIndex: false, set popupOpen(val) { return val; }, // ignore get popupOpen() { return false; }, @@ -79,7 +79,7 @@ AutoCompleteSearch.prototype = { } -/** +/** * Helper to register an AutoCompleteSearch with the given name. * Allows the AutoCompleteController to find the search. */ @@ -94,16 +94,16 @@ function registerAutoCompleteSearch(aSearch) .QueryInterface(Ci.nsIComponentRegistrar); componentManager.registerFactory(cid, desc, name, aSearch); // Keep the id on the object so we can unregister later - aSearch.cid = cid; + aSearch.cid = cid; } -/** - * Helper to unregister an AutoCompleteSearch. +/** + * Helper to unregister an AutoCompleteSearch. */ function unregisterAutoCompleteSearch(aSearch) { let componentManager = Components.manager - .QueryInterface(Ci.nsIComponentRegistrar); + .QueryInterface(Ci.nsIComponentRegistrar); componentManager.unregisterFactory(aSearch.cid, aSearch); } diff --git a/toolkit/components/commandlines/test/unit/test_bug666224.js b/toolkit/components/commandlines/test/unit/test_bug666224.js index e4a0d0db32da..e65e13edb61c 100644 --- a/toolkit/components/commandlines/test/unit/test_bug666224.js +++ b/toolkit/components/commandlines/test/unit/test_bug666224.js @@ -2,5 +2,5 @@ function run_test() { var cmdLine=Components.classes["@mozilla.org/toolkit/command-line;1"].createInstance(Components.interfaces.nsICommandLine); try { cmdLine.getArgument(cmdLine.length); - } catch(e) {} + } catch(e) {} } diff --git a/toolkit/components/console/content/console.js b/toolkit/components/console/content/console.js index ad680260780f..7bb5261beef3 100644 --- a/toolkit/components/console/content/console.js +++ b/toolkit/components/console/content/console.js @@ -18,7 +18,7 @@ window.onload = function() gTextBoxEval = document.getElementById("TextboxEval"); gEvaluator = document.getElementById("Evaluator"); gFilter = document.getElementById("Filter"); - + updateSortCommand(gConsole.sortOrder); updateModeCommand(gConsole.mode); @@ -45,7 +45,7 @@ function changeMode(aMode) case "All": gConsole.mode = null; } - + document.persist("ConsoleBox", "mode"); } @@ -63,7 +63,7 @@ function updateSortCommand(aOrder) { var orderString = aOrder == 'reverse' ? "Descend" : "Ascend"; var bc = document.getElementById("Console:sort"+orderString); - bc.setAttribute("checked", true); + bc.setAttribute("checked", true); orderString = aOrder == 'reverse' ? "Ascend" : "Descend"; bc = document.getElementById("Console:sort"+orderString); diff --git a/toolkit/components/console/content/consoleBindings.xml b/toolkit/components/console/content/consoleBindings.xml index 532ed0fc2fc6..40c1894df393 100644 --- a/toolkit/components/console/content/consoleBindings.xml +++ b/toolkit/components/console/content/consoleBindings.xml @@ -12,7 +12,7 @@ xmlns:xbl="http://www.mozilla.org/xbl"> - + @@ -89,7 +89,7 @@ this.mCount = 0; this.mConsoleListener = { - console: this, + console: this, observe : function(aObject) { // The message can arrive a little bit after the xbl binding has been // unbind. So node.appendItem will not be available anymore. @@ -360,7 +360,7 @@ - + @@ -390,9 +390,9 @@ }); ]]> - - this.init(); - this.destroy(); + + this.init(); + this.destroy(); lawyer@boyer.net (Lawyer Boyer) // // or, delightfully, a field like this: @@ -780,7 +780,7 @@ function rssAuthor(s,author) { // check for RSS2 string format var chars = s.trim(); var matches = chars.match(/(.*)\((.*)\)/); - var emailCheck = + var emailCheck = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; if (matches) { var match1 = matches[1].trim(); @@ -836,7 +836,7 @@ function dateParse(aDateString) { return date.toUTCString(); } return null; -} +} const XHTML_NS = "http://www.w3.org/1999/xhtml"; @@ -854,7 +854,7 @@ function XHTMLHandler(processor, isAtom) { // SVG and MathML. XXX XHTMLHandler.prototype = { - // look back up at the declared namespaces + // look back up at the declared namespaces // we always use the same prefixes for our safe stuff _isInScope: function XH__isInScope(ns) { for (var i in this._inScopeNS) { @@ -874,7 +874,7 @@ XHTMLHandler.prototype = { ++this._depth; this._inScopeNS.push([]); - // RFC4287 requires XHTML to be wrapped in a div that is *not* part of + // RFC4287 requires XHTML to be wrapped in a div that is *not* part of // the content. This prevents people from screwing up namespaces, but // we need to skip it here. if (this._isAtom && this._depth == 1 && localName == "div") @@ -887,7 +887,7 @@ XHTMLHandler.prototype = { for (var i=0; i < attributes.length; ++i) { uri = attributes.getURI(i); // XHTML attributes aren't in a namespace - if (uri == "") { + if (uri == "") { this._buf += (" " + attributes.getLocalName(i) + "='" + xmlEscape(attributes.getValue(i)) + "'"); } else { @@ -897,10 +897,10 @@ XHTMLHandler.prototype = { // The attribute value we'll attempt to write var attributeValue = xmlEscape(attributes.getValue(i)); - // it's an allowed attribute NS. + // it's an allowed attribute NS. // write the attribute - this._buf += (" " + prefix + ":" + - attributes.getLocalName(i) + + this._buf += (" " + prefix + ":" + + attributes.getLocalName(i) + "='" + attributeValue + "'"); // write an xmlns declaration if necessary @@ -941,7 +941,7 @@ XHTMLHandler.prototype = { endPrefixMapping: function FP_endPrefixMapping(prefix) { }, processingInstruction: function XH_processingInstruction() { - }, + }, } /** @@ -972,23 +972,23 @@ ExtensionHandler.prototype = { ++this._depth; var prefix = gNamespaces[uri] ? gNamespaces[uri] + ":" : ""; var key = prefix + localName; - + if (this._depth == 1) { this._uri = uri; this._localName = localName; this._qName = qName; this._attrs = attrs; } - + // if we descend into another element, we won't send text this._hasChildElements = (this._depth > 1); - + }, endElement: function EH_endElement(uri, localName, qName) { --this._depth; if (this._depth == 0) { var text = this._hasChildElements ? null : this._buf.trim(); - this._processor.returnFromExtHandler(this._uri, this._localName, + this._processor.returnFromExtHandler(this._uri, this._localName, text, this._attrs); } }, @@ -1001,7 +1001,7 @@ ExtensionHandler.prototype = { endPrefixMapping: function EH_endPrefixMapping() { }, processingInstruction: function EH_processingInstruction() { - }, + }, }; @@ -1010,7 +1010,7 @@ ExtensionHandler.prototype = { * some characteristics of a feed element. For example, it * says whether an element can be expected to appear more * than once inside a given entry or feed. - */ + */ function ElementInfo(fieldName, containerClass, closeFunc, isArray) { this.fieldName = fieldName; this.containerClass = containerClass; @@ -1051,7 +1051,7 @@ function FeedProcessor() { this._extensionHandler = null; this._xhtmlHandler = null; this._haveSentResult = false; - + // The nsIFeedResultListener waiting for the parse results this.listener = null; @@ -1074,7 +1074,7 @@ function FeedProcessor() { "atom03:content":"text"}; this._stack = []; - this._trans = { + this._trans = { "START": { //If we hit a root RSS element, treat as RSS2. "rss": new FeedElementInfo("RSS2", "rss2"), @@ -1089,7 +1089,7 @@ function FeedProcessor() { // Treat as Atom 0.3 "atom03:feed": new FeedElementInfo("Atom03", "atom03"), }, - + /********* RSS2 **********/ "IN_RSS2": { "channel": new WrapperElementInfo("channel") @@ -1144,7 +1144,7 @@ function FeedProcessor() { "media:content": new ElementInfo("mediacontent", null, null, true), "media:thumbnail": new ElementInfo("mediathumbnail", null, null, true) }, - + /********* RSS1 **********/ "IN_RDF": { // If we hit a rss1:channel, we can verify that we have RSS1 @@ -1216,8 +1216,8 @@ function FeedProcessor() { } // See startElement for a long description of how feeds are processed. -FeedProcessor.prototype = { - +FeedProcessor.prototype = { + // Set ourselves as the SAX handler, and set the base URI _init: function FP_init(uri) { this._reader.contentHandler = this; @@ -1235,7 +1235,7 @@ FeedProcessor.prototype = { // than the root. _docVerified: function FP_docVerified(version) { this._result.doc = Cc[FEED_CONTRACTID].createInstance(Ci.nsIFeed); - this._result.doc.baseURI = + this._result.doc.baseURI = this._xmlBaseStack[this._xmlBaseStack.length - 1]; this._result.doc.fields = this._feed; this._result.version = version; @@ -1266,7 +1266,7 @@ FeedProcessor.prototype = { // Parsing functions parseFromStream: function FP_parseFromStream(stream, uri) { this._init(uri); - this._reader.parseFromStream(stream, null, stream.available(), + this._reader.parseFromStream(stream, null, stream.available(), "application/xml"); this._reader = null; }, @@ -1282,7 +1282,7 @@ FeedProcessor.prototype = { this._reader.parseAsync(requestObserver); }, - // nsIStreamListener + // nsIStreamListener // The XMLReader will throw sensible exceptions if these get called // out of order. @@ -1342,7 +1342,7 @@ FeedProcessor.prototype = { // multiple times, such as the RSS category element and the Atom // link element. Most of the RSS1/DC elements can occur multiple // times in theory, but in practice, the only ones that do have - // analogues in Atom. + // analogues in Atom. // // Some elements are also groups of attributes or sub-elements, // while others are simple text fields. For the most part, we don't @@ -1354,7 +1354,7 @@ FeedProcessor.prototype = { // being dictionaries, whether they are based on attributes like RSS // cloud, sub-elements like Atom author, or even items and // entries. These elements are treated as "containers". It's - // theoretically possible for a container to have an attribute with + // theoretically possible for a container to have an attribute with // the same universal name as a sub-element, but none of the feed // formats allow this by default, and I don't of any extension that // works this way. @@ -1383,7 +1383,7 @@ FeedProcessor.prototype = { // Check to see if we need to hand this off to our XHTML handler. // The elements we're dealing with will look like this: - // + // // // <div xmlns="http://www.w3.org/1999/xhtml"> // A title with <b>bold</b> and <i>italics</i>. @@ -1391,18 +1391,18 @@ FeedProcessor.prototype = { // // // When it returns in returnFromXHTMLHandler, the handler should - // give us back a string like this: - // + // give us back a string like this: + // // "A title with bold and italics." // // The Atom spec explicitly says the div is not part of the content, // and explicitly allows whitespace collapsing. - // + // if ((this._result.version == "atom" || this._result.version == "atom03") && this._textConstructs[key] != null) { var type = attributes.getValueFromName("","type"); if (type != null && type.indexOf("xhtml") >= 0) { - this._xhtmlHandler = + this._xhtmlHandler = new XHTMLHandler(this, (this._result.version == "atom")); this._reader.contentHandler = this._xhtmlHandler; return; @@ -1422,14 +1422,14 @@ FeedProcessor.prototype = { this._extensionHandler.startElement(uri, localName, qName, attributes); return; } - + // This distinguishes wrappers like 'channel' from elements // we'd actually like to do something with (which will test true). - this._handlerStack[this._depth] = elementInfo; + this._handlerStack[this._depth] = elementInfo; if (elementInfo.isWrapper) { this._state = "IN_" + elementInfo.fieldName.toUpperCase(); this._stack.push([this._feed, this._state]); - } + } else if (elementInfo.feedVersion) { this._state = "IN_" + elementInfo.fieldName.toUpperCase(); @@ -1458,7 +1458,7 @@ FeedProcessor.prototype = { //LOG(""); if (elementInfo && !elementInfo.isWrapper) this._closeComplexElement(elementInfo); - + // cut down xml:base context if (this._xmlBaseStack.length == this._depth + 1) this._xmlBaseStack = this._xmlBaseStack.slice(0, this._depth); @@ -1476,18 +1476,18 @@ FeedProcessor.prototype = { this._buf += data; }, // TODO: It would be nice to check new prefixes here, and if they - // don't conflict with the ones we've defined, throw them in a + // don't conflict with the ones we've defined, throw them in a // dictionary to check. startPrefixMapping: function FP_startPrefixMapping(prefix, uri) { }, - + endPrefixMapping: function FP_endPrefixMapping(prefix) { }, - + processingInstruction: function FP_processingInstruction(target, data) { if (target == "xml-stylesheet") { var hrefAttribute = data.match(/href=[\"\'](.*?)[\"\']/); - if (hrefAttribute && hrefAttribute.length == 2) + if (hrefAttribute && hrefAttribute.length == 2) this._result.stylesheet = strToURI(hrefAttribute[1], this._result.uri); } }, @@ -1500,7 +1500,7 @@ FeedProcessor.prototype = { function FP__processComplexElement(elementInfo, attributes) { var obj, key, prefix; - // If the container is an entry/item, it'll need to have its + // If the container is an entry/item, it'll need to have its // more esoteric properties put in the 'fields' property bag. if (elementInfo.containerClass == Cc[ENTRY_CONTRACTID]) { obj = elementInfo.containerClass.createInstance(Ci.nsIFeedEntry); @@ -1532,7 +1532,7 @@ FeedProcessor.prototype = { } catch(e) { } - + if (elementInfo.isArray) { if (!prop) { container.setPropertyAsInterface(elementInfo.fieldName, @@ -1546,11 +1546,11 @@ FeedProcessor.prototype = { // on large files. Bug 335638. newProp.QueryInterface(Ci.nsIMutableArray); newProp.appendElement(obj,false); - + // If new object is an nsIFeedContainer, we want to deal with // its member nsIPropertyBag instead. if (isIFeedContainer(obj)) - newProp = obj.fields; + newProp = obj.fields; } else { @@ -1560,7 +1560,7 @@ FeedProcessor.prototype = { } newProp = container.getProperty(elementInfo.fieldName); } - + // make our new state name, and push the property onto the stack var newState = "IN_" + elementInfo.fieldName.toUpperCase(); this._stack.push([newProp, newState, obj]); @@ -1598,7 +1598,7 @@ FeedProcessor.prototype = { if (isArray) container.replaceElementAt(element, container.length - 1, false); }, - + _prefixForNS: function FP_prefixForNS(uri) { if (!uri) return ""; @@ -1649,10 +1649,10 @@ FeedProcessor.prototype = { // we don't take random elements inside rdf:RDF if (this._state == "IN_RDF") return; - + // Grab the top of the stack var top = this._stack[this._stack.length - 1]; - if (!top) + if (!top) return; var container = top[0]; @@ -1661,10 +1661,10 @@ FeedProcessor.prototype = { var contract = this._handlerStack[this._depth].containerClass; // check if it's something specific, but not an entry if (contract && contract != Cc[ENTRY_CONTRACTID]) { - var el = container.queryElementAt(container.length - 1, + var el = container.queryElementAt(container.length - 1, Ci.nsIFeedElementBase); // XXX there must be a way to flatten these interfaces - if (contract == Cc[PERSON_CONTRACTID]) + if (contract == Cc[PERSON_CONTRACTID]) el.QueryInterface(Ci.nsIFeedPerson); else return; // don't know about this interface @@ -1673,13 +1673,13 @@ FeedProcessor.prototype = { var prefix = gNamespaces[uri]; // synonyms - if ((uri == "" || + if ((uri == "" || prefix && ((prefix.indexOf("atom") > -1) || - (prefix.indexOf("rss") > -1))) && + (prefix.indexOf("rss") > -1))) && (propName == "url" || propName == "href")) propName = "uri"; - + try { if (el[propName] !== "undefined") { var propValue = chars; @@ -1695,14 +1695,14 @@ FeedProcessor.prototype = { // ignore XPConnect errors } // the rest of the function deals with entry- and feed-level stuff - return; - } + return; + } else { - container = container.queryElementAt(container.length - 1, + container = container.queryElementAt(container.length - 1, Ci.nsIWritablePropertyBag2); } } - + // Make the buffer our new property var propName = this._prefixForNS(uri) + localName; @@ -1730,7 +1730,7 @@ FeedProcessor.prototype = { type = "text"; } } - + // If it's rss feed-level description, it's not supposed to have html if (this._result.version.indexOf("rss") >= 0 && this._handlerStack[this._depth].containerClass != ENTRY_CONTRACTID) { @@ -1756,7 +1756,7 @@ FeedProcessor.prototype = { // Grab the top of the stack var top = this._stack[this._stack.length - 1]; - if (!top) + if (!top) return; var container = top[0]; @@ -1768,7 +1768,7 @@ FeedProcessor.prototype = { newProp.base = this._xmlBaseStack[this._xmlBaseStack.length - 1]; container.setPropertyAsInterface(this._prefixForNS(uri) + localName, newProp); - + // XHTML will cause us to peek too far. The XHTML handler will // send us an end element to call. RFC4287-valid feeds allow a // more graceful way to handle this. Unfortunately, we can't count diff --git a/toolkit/components/feeds/test/test_xml.js b/toolkit/components/feeds/test/test_xml.js index c46b6d371c21..13a02c6dcb8d 100644 --- a/toolkit/components/feeds/test/test_xml.js +++ b/toolkit/components/feeds/test/test_xml.js @@ -14,7 +14,7 @@ * | * - head.js * | - * - xml/ -- rss1/... + * - xml/ -- rss1/... * | * -- rss2/... * | diff --git a/toolkit/components/filepicker/content/filepicker.js b/toolkit/components/filepicker/content/filepicker.js index 37d4f038cd80..9bfff234cc95 100644 --- a/toolkit/components/filepicker/content/filepicker.js +++ b/toolkit/components/filepicker/content/filepicker.js @@ -71,7 +71,7 @@ function filepickerLoad() { textInputLabel.value = gFilePickerBundle.getString("dirTextInputLabel"); textInputLabel.accessKey = gFilePickerBundle.getString("dirTextInputAccesskey"); } - + if ((filePickerMode == nsIFilePicker.modeOpen) || (filePickerMode == nsIFilePicker.modeOpenMultiple) || (filePickerMode == nsIFilePicker.modeSave)) { @@ -297,7 +297,7 @@ function selectOnOK() var message = gFilePickerBundle.getFormattedString("confirmFileReplacing", [file.path]); - + promptService = Components.classes[NS_PROMPTSERVICE_CONTRACTID].getService(Components.interfaces.nsIPromptService); var rv = promptService.confirm(window, confirmTitle, message); if (rv) { @@ -360,7 +360,7 @@ function selectOnOK() retvals.files = gFilesEnumerator; retvals.buttonStatus = ret; - + return (ret != nsIFilePicker.returnCancel); } @@ -420,7 +420,7 @@ function onClick(e) { function convertColumnIDtoSortType(columnID) { var sortKey; - + switch (columnID) { case "FilenameColumn": sortKey = nsIFileView.sortName; @@ -436,7 +436,7 @@ function convertColumnIDtoSortType(columnID) { sortKey = 0; break; } - + return sortKey; } @@ -444,7 +444,7 @@ function handleColumnClick(columnID) { var sortType = convertColumnIDtoSortType(columnID); var sortOrder = (treeView.sortType == sortType) ? !treeView.reverseSort : false; treeView.sort(sortType, sortOrder); - + // set the sort indicator on the column we are sorted by var sortedColumn = document.getElementById(columnID); if (treeView.reverseSort) { @@ -452,7 +452,7 @@ function handleColumnClick(columnID) { } else { sortedColumn.setAttribute("sortDirection", "ascending"); } - + // remove the sort indicator from the rest of the columns var currCol = sortedColumn.parentNode.firstChild; while (currCol) { @@ -597,7 +597,7 @@ function populateAncestorList(directory) { while (menu.hasChildNodes()) { menu.removeChild(menu.firstChild); } - + var menuItem = document.createElement("menuitem"); menuItem.setAttribute("label", directory.path); menuItem.setAttribute("crop", "start"); @@ -613,7 +613,7 @@ function populateAncestorList(directory) { directory = parent; parent = directory.parent; } - + var menuList = document.getElementById("lookInMenuList"); menuList.selectedIndex = 0; } @@ -650,7 +650,7 @@ function newDir() { file); return false; } - + file = file[0].QueryInterface(nsIFile); if (file.exists()) { showErrorDialog("errorNewDirDoesExistTitle", @@ -681,7 +681,7 @@ function newDir() { } try { - file.create(nsIFile.DIRECTORY_TYPE, 0755); + file.create(nsIFile.DIRECTORY_TYPE, 0755); } catch (e) { showErrorDialog("errorCreateNewDirTitle", "errorCreateNewDirMessage", @@ -693,7 +693,7 @@ function newDir() { // we remember and reshow a dirname if something goes wrong // so that errors can be corrected more easily. If all went well, // reset the default value to blank - gNewDirName = { value: "" }; + gNewDirName = { value: "" }; } return true; } @@ -750,7 +750,7 @@ function processPath(path) nextQuote = path.indexOf('"', quoteSearchStart); quoteSearchStart = nextQuote + 1; } while (nextQuote != -1 && path[nextQuote - 1] == '\\'); - + if (nextQuote == -1) { // we have a filename with no trailing quote. // just assume that the filename ends at the end of the string. @@ -807,7 +807,7 @@ function processPathEntry(path, fileArray) // Unescape quotes filePath = filePath.replace(/\\\"/g, "\""); - + if (filePath[0] == '/') /* an absolute path was entered */ file.initWithPath(filePath); else if ((filePath.indexOf("/../") > 0) || diff --git a/toolkit/components/gfx/SanityTest.js b/toolkit/components/gfx/SanityTest.js index 46d5e83f3c4b..6326bf17b820 100644 --- a/toolkit/components/gfx/SanityTest.js +++ b/toolkit/components/gfx/SanityTest.js @@ -228,7 +228,7 @@ var listener = { this.mm = null; } - + // Remove the annotation after we've cleaned everything up, to catch any // incidental crashes from having performed the sanity test. annotateCrashReport(false); diff --git a/toolkit/components/microformats/Microformats.js b/toolkit/components/microformats/Microformats.js index b8cd8b087668..14f4e1e5d1e0 100644 --- a/toolkit/components/microformats/Microformats.js +++ b/toolkit/components/microformats/Microformats.js @@ -16,7 +16,7 @@ this.Microformats = { }, /** * Retrieves microformats objects of the given type from a document - * + * * @param name The name of the microformat (required) * @param rootElement The DOM element at which to start searching (required) * @param options Literal object with the following options: @@ -28,7 +28,7 @@ this.Microformats = { * debug - Whether or not we are in debug mode (optional * - defaults to false) * @param targetArray An array of microformat objects to which is added the results (optional) - * @return A new array of microformat objects or the passed in microformat + * @return A new array of microformat objects or the passed in microformat * object array with the new objects added */ get: function(name, rootElement, options, targetArray) { @@ -74,7 +74,7 @@ this.Microformats = { if ((microformatNodes.length == 0) && Microformats[name].alternateClassName) { var altClass = Microformats.getElementsByClassName(rootElement, Microformats[name].alternateClassName); if (altClass.length > 0) { - microformatNodes.push(rootElement); + microformatNodes.push(rootElement); } } } else if (Microformats[name].attributeValues) { @@ -82,9 +82,9 @@ this.Microformats = { Microformats.getElementsByAttribute(rootElement, Microformats[name].attributeName, Microformats[name].attributeValues); - + } - + function isVisible(node, checkChildren) { if (node.getBoundingClientRect) { @@ -109,7 +109,7 @@ this.Microformats = { } return true; } - + /* Create objects for the microformat nodes and put them into the microformats */ /* array */ for (let i = 0; i < microformatNodes.length; i++) { @@ -138,7 +138,7 @@ this.Microformats = { }, /** * Counts microformats objects of the given type from a document - * + * * @param name The name of the microformat (required) * @param rootElement The DOM element at which to start searching (required) * @param options Literal object with the following options: @@ -226,7 +226,7 @@ this.Microformats = { return null; }, /** - * If the passed in node is a microformat, this function returns a space + * If the passed in node is a microformat, this function returns a space * separated list of the microformat names that correspond to this node * * @param node DOM node to check @@ -276,7 +276,7 @@ this.Microformats = { } var toreturn = ""; var testArray = []; - + for (let i in item) { if (testArray[i]) { @@ -354,9 +354,9 @@ this.Microformats = { outstring = outstring.replace(/\s+$/, ''); return outstring; } - - - if (((((propnode.localName.toLowerCase() == "abbr") || (propnode.localName.toLowerCase() == "html:abbr")) && !propnode.namespaceURI) || + + + if (((((propnode.localName.toLowerCase() == "abbr") || (propnode.localName.toLowerCase() == "html:abbr")) && !propnode.namespaceURI) || ((propnode.localName.toLowerCase() == "abbr") && (propnode.namespaceURI == "http://www.w3.org/1999/xhtml"))) && (propnode.hasAttribute("title"))) { return propnode.getAttribute("title"); } else if ((propnode.nodeName.toLowerCase() == "img") && (propnode.hasAttribute("alt"))) { @@ -441,7 +441,7 @@ this.Microformats = { * Basically this is to handle the face that telephone numbers use value * as the name as one of their subproperties, but value is also used for * value excerpting (http://microformats.org/wiki/hcard#Value_excerpting) - + * @param propnode The DOMNode to check * @param parentnode The parent node of the property. If it is a subproperty, * this is the parent property node. If it is not, this is the @@ -668,11 +668,11 @@ this.Microformats = { for (let i in Microformats[microformat].properties) { object.__defineGetter__(i, Microformats.parser.getMicroformatPropertyGenerator(node, microformat, i, object)); } - + /* The node in the object should be the original node */ object.node = in_node; /* we also store the node that has been "resolved" */ - object.resolvedNode = node; + object.resolvedNode = node; object.semanticType = microformat; if (validate) { Microformats.parser.validate(node, microformat); @@ -683,7 +683,7 @@ this.Microformats = { return function() { var result = Microformats.parser.getMicroformatProperty(node, name, property); // delete microformat[property]; -// microformat[property] = result; +// microformat[property] = result; return result; }; }, @@ -915,7 +915,7 @@ this.Microformats = { normalizeISO8601: function normalizeISO8601(string) { var dateArray = string.match(/(\d\d\d\d)(?:-?(\d\d)(?:-?(\d\d)(?:[T ](\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(?:([-+Z])(?:(\d\d)(?::?(\d\d))?)?)?)?)?)?/); - + var dateString; var tzOffset = 0; if (!dateArray) { @@ -965,13 +965,13 @@ this.Microformats = { * offset and Z if present to convert the date to local time * NOTE: I'm using an extra parameter on the date object for this function. * I set date.time to true if there is a date, otherwise date.time is false. - * + * * @param string ISO8601 formatted date - * @return JavaScript date object that represents the ISO date. + * @return JavaScript date object that represents the ISO date. */ dateFromISO8601: function dateFromISO8601(string) { var dateArray = string.match(/(\d\d\d\d)(?:-?(\d\d)(?:-?(\d\d)(?:[T ](\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(?:([-+Z])(?:(\d\d)(?::?(\d\d))?)?)?)?)?)?/); - + var date = new Date(dateArray[1], 0, 1); date.time = false; @@ -1011,9 +1011,9 @@ this.Microformats = { if (dateArray[8]) { var tzOffset = date.getTimezoneOffset(); if (tzOffset < 0) { - date.setMinutes(date.getMinutes() + tzOffset); + date.setMinutes(date.getMinutes() + tzOffset); } else if (tzOffset > 0) { - date.setMinutes(date.getMinutes() - tzOffset); + date.setMinutes(date.getMinutes() - tzOffset); } } } @@ -1023,10 +1023,10 @@ this.Microformats = { * Converts a Javascript date object into an ISO 8601 formatted date * NOTE: I'm using an extra parameter on the date object for this function. * If date.time is NOT true, this function only outputs the date. - * + * * @param date Javascript Date object * @param punctuation true if the date should have -/: - * @return string with the ISO date. + * @return string with the ISO date. */ iso8601FromDate: function iso8601FromDate(date, punctuation) { var string = date.getFullYear().toString(); @@ -1077,7 +1077,7 @@ this.Microformats = { * * Retrieve elements matching all classes listed in a space-separated string. * I had to implement my own because I need an Array, not an nsIDomNodeList - * + * * @param rootElement The DOM element at which to start searching (optional) * @param className A space separated list of classenames * @return microformatNodes An array of DOM Nodes, each representing a @@ -1119,7 +1119,7 @@ this.Microformats = { * Not intended for external consumption. Microformat implementations might use it. * * Retrieve elements matching an attribute and an attribute list in a space-separated string. - * + * * @param rootElement The DOM element at which to start searching (optional) * @param atributeName The attribute name to match against * @param attributeValues A space separated list of attribute values @@ -1142,7 +1142,7 @@ this.Microformats = { } xpathExpression += "contains(concat(' ', @" + attributeName + ", ' '), ' " + attributeList[i] + " ')"; } - xpathExpression += "]"; + xpathExpression += "]"; var xpathResult = (rootNode.ownerDocument || rootNode).evaluate(xpathExpression, rootNode, null, 0, null); @@ -1314,7 +1314,7 @@ var hCard_definition = { virtual: true } }, - plural: true + plural: true }, "fn" : { required: true diff --git a/toolkit/components/microformats/microformat-shiv.js b/toolkit/components/microformats/microformat-shiv.js index 8d126fb2a69f..95a388fed617 100644 --- a/toolkit/components/microformats/microformat-shiv.js +++ b/toolkit/components/microformats/microformat-shiv.js @@ -3,7 +3,7 @@ microformat-shiv - v1.3.3 Built: 2015-12-31 01:12 - http://microformat-shiv.com Copyright (c) 2015 Glenn Jones - Licensed MIT + Licensed MIT */ @@ -18,9 +18,9 @@ var Microformats; // jshint ignore:line root.Microformats = factory(); } }(this, function () { - + var modules = {}; - + modules.version = '1.3.3'; modules.livingStandard = '2015-09-25T12:26:04Z'; @@ -1463,9 +1463,9 @@ var Microformats; // jshint ignore:line // check parser module is loaded if(modules.Parser){ - + /** - * applies "implied rules" microformat output structure i.e. feed-title, name, photo, url and date + * applies "implied rules" microformat output structure i.e. feed-title, name, photo, url and date * * @param {DOM Node} node * @param {Object} uf (microformat output structure) @@ -1475,40 +1475,40 @@ var Microformats; // jshint ignore:line */ modules.Parser.prototype.impliedRules = function(node, uf, parentClasses) { var typeVersion = (uf.typeVersion)? uf.typeVersion: 'v2'; - + // TEMP: override to allow v1 implied properties while spec changes if(this.options.impliedPropertiesByVersion === false){ typeVersion = 'v2'; } - + if(node && uf && uf.properties) { - uf = this.impliedBackwardComp( node, uf, parentClasses ); + uf = this.impliedBackwardComp( node, uf, parentClasses ); if(typeVersion === 'v2'){ uf = this.impliedhFeedTitle( uf ); - uf = this.impliedName( node, uf ); - uf = this.impliedPhoto( node, uf ); + uf = this.impliedName( node, uf ); + uf = this.impliedPhoto( node, uf ); uf = this.impliedUrl( node, uf ); } uf = this.impliedValue( node, uf, parentClasses ); uf = this.impliedDate( uf ); - + // TEMP: flagged while spec changes are put forward if(this.options.parseLatLonGeo === true){ uf = this.impliedGeo( uf ); - } + } } return uf; }; - - + + /** * apply implied name rule * * @param {DOM Node} node * @param {Object} uf * @return {Object} - */ + */ modules.Parser.prototype.impliedName = function(node, uf) { // implied name rule /* @@ -1526,7 +1526,7 @@ var Microformats; // jshint ignore:line */ var name, value; - + if(!uf.properties.name) { value = this.getImpliedProperty(node, ['img', 'area', 'abbr'], this.getNameAttr); var textFormat = this.options.textFormat; @@ -1540,27 +1540,27 @@ var Microformats; // jshint ignore:line uf.properties.name = name; } } - + return uf; }; - - + + /** * apply implied photo rule * * @param {DOM Node} node * @param {Object} uf * @return {Object} - */ + */ modules.Parser.prototype.impliedPhoto = function(node, uf) { // implied photo rule /* img.h-x[src] Jane Doe object.h-x[data] Jane Doe - .h-x>img[src]:only-of-type:not[.h-*]
Jane Doe
- .h-x>object[data]:only-of-type:not[.h-*]
Jane Doe
- .h-x>:only-child>img[src]:only-of-type:not[.h-*]
Jane Doe
- .h-x>:only-child>object[data]:only-of-type:not[.h-*]
Jane Doe
+ .h-x>img[src]:only-of-type:not[.h-*]
Jane Doe
+ .h-x>object[data]:only-of-type:not[.h-*]
Jane Doe
+ .h-x>:only-child>img[src]:only-of-type:not[.h-*]
Jane Doe
+ .h-x>:only-child>object[data]:only-of-type:not[.h-*]
Jane Doe
*/ var value; if(!uf.properties.photo) { @@ -1572,24 +1572,24 @@ var Microformats; // jshint ignore:line } uf.properties.photo = [modules.utils.trim(value)]; } - } + } return uf; }; - - + + /** * apply implied URL rule * * @param {DOM Node} node * @param {Object} uf * @return {Object} - */ + */ modules.Parser.prototype.impliedUrl = function(node, uf) { // implied URL rule /* a.h-x[href] Glenn area.h-x[href] Glenn - .h-x>a[href]:only-of-type:not[.h-*] + .h-x>a[href]:only-of-type:not[.h-*] .h-x>area[href]:only-of-type:not[.h-*]
Glenn

...

*/ var value; @@ -1602,18 +1602,18 @@ var Microformats; // jshint ignore:line } uf.properties.url = [modules.utils.trim(value)]; } - } + } return uf; }; - - + + /** * apply implied date rule - if there is a time only property try to concat it with any date property * * @param {DOM Node} node * @param {Object} uf * @return {Object} - */ + */ modules.Parser.prototype.impliedDate = function(uf) { // implied date rule // http://microformats.org/wiki/value-class-pattern#microformats2_parsers @@ -1628,8 +1628,8 @@ var Microformats; // jshint ignore:line delete uf.dates; return uf; }; - - + + /** * get an implied property value from pre-defined tag/attriubte combinations * @@ -1640,10 +1640,10 @@ var Microformats; // jshint ignore:line */ modules.Parser.prototype.getImpliedProperty = function(node, tagList, getAttrFunction) { // i.e. img.h-card - var value = getAttrFunction(node), + var value = getAttrFunction(node), descendant, child; - + if(!value) { // i.e. .h-card>img:only-of-type:not(.h-card) descendant = modules.domUtils.getSingleDescendantOfType( node, tagList); @@ -1661,17 +1661,17 @@ var Microformats; // jshint ignore:line } } } - + return value; }; - - + + /** * get an implied name value from a node * * @param {DOM Node} node * @return {String || null} - */ + */ modules.Parser.prototype.getNameAttr = function(node) { var value = modules.domUtils.getAttrValFromTagList(node, ['img','area'], 'alt'); if(!value) { @@ -1679,14 +1679,14 @@ var Microformats; // jshint ignore:line } return value; }; - - + + /** * get an implied photo value from a node * * @param {DOM Node} node * @return {String || null} - */ + */ modules.Parser.prototype.getPhotoAttr = function(node) { var value = modules.domUtils.getAttrValFromTagList(node, ['img'], 'src'); if(!value && modules.domUtils.hasAttributeValue(node, 'class', 'include') === false) { @@ -1694,62 +1694,62 @@ var Microformats; // jshint ignore:line } return value; }; - - + + /** * get an implied photo value from a node * * @param {DOM Node} node * @return {String || null} - */ + */ modules.Parser.prototype.getURLAttr = function(node) { var value = null; if(modules.domUtils.hasAttributeValue(node, 'class', 'include') === false){ - + value = modules.domUtils.getAttrValFromTagList(node, ['a'], 'href'); if(!value) { value = modules.domUtils.getAttrValFromTagList(node, ['area'], 'href'); } - + } return value; }; - - + + /** - * + * * * @param {DOM Node} node * @param {Object} uf * @return {Object} - */ + */ modules.Parser.prototype.impliedValue = function(node, uf, parentClasses){ - + // intersection of implied name and implied value rules - if(uf.properties.name) { + if(uf.properties.name) { if(uf.value && parentClasses.root.length > 0 && parentClasses.properties.length === 1){ uf = this.getAltValue(uf, parentClasses.properties[0][0], 'p-name', uf.properties.name[0]); } } - + // intersection of implied URL and implied value rules if(uf.properties.url) { if(parentClasses && parentClasses.root.length === 1 && parentClasses.properties.length === 1){ uf = this.getAltValue(uf, parentClasses.properties[0][0], 'u-url', uf.properties.url[0]); } - } - + } + // apply alt value if(uf.altValue !== null){ uf.value = uf.altValue.value; } delete uf.altValue; - - + + return uf; }; - - + + /** * get alt value based on rules about parent property prefix * @@ -1758,7 +1758,7 @@ var Microformats; // jshint ignore:line * @param {String} propertyName * @param {String} value * @return {Object} - */ + */ modules.Parser.prototype.getAltValue = function(uf, parentPropertyName, propertyName, value){ if(uf.value && !uf.altValue){ // first p-name of the h-* child @@ -1776,14 +1776,14 @@ var Microformats; // jshint ignore:line } return uf; }; - - + + /** * if a h-feed does not have a title use the title tag of a page * * @param {Object} uf * @return {Object} - */ + */ modules.Parser.prototype.impliedhFeedTitle = function( uf ){ if(uf.type && uf.type.indexOf('h-feed') > -1){ // has no name property @@ -1797,80 +1797,80 @@ var Microformats; // jshint ignore:line } return uf; }; - - - + + + /** * implied Geo from pattern * * @param {Object} uf * @return {Object} - */ + */ modules.Parser.prototype.impliedGeo = function( uf ){ var geoPair, parts, longitude, latitude, valid = true; - + if(uf.type && uf.type.indexOf('h-geo') > -1){ - + // has no latitude or longitude property if(uf.properties.latitude === undefined || uf.properties.longitude === undefined ){ geoPair = (uf.properties.name)? uf.properties.name[0] : null; geoPair = (!geoPair && uf.properties.value)? uf.properties.value : geoPair; - + if(geoPair){ // allow for the use of a ';' as in microformats and also ',' as in Geo URL geoPair = geoPair.replace(';',','); - + // has sep char if(geoPair.indexOf(',') > -1 ){ parts = geoPair.split(','); - + // only correct if we have two or more parts if(parts.length > 1){ - // latitude no value outside the range -90 or 90 + // latitude no value outside the range -90 or 90 latitude = parseFloat( parts[0] ); if(modules.utils.isNumber(latitude) && latitude > 90 || latitude < -90){ valid = false; } - + // longitude no value outside the range -180 to 180 longitude = parseFloat( parts[1] ); if(modules.utils.isNumber(longitude) && longitude > 180 || longitude < -180){ valid = false; } - + if(valid){ uf.properties.latitude = [latitude]; uf.properties.longitude = [longitude]; } } - + } } } } return uf; }; - - + + /** * if a backwards compat built structure has no properties add name through this.impliedName * * @param {Object} uf * @return {Object} - */ + */ modules.Parser.prototype.impliedBackwardComp = function(node, uf, parentClasses){ - + // look for pattern in parent classes like "p-geo h-geo" // these are structures built from backwards compat parsing of geo if(parentClasses.root.length === 1 && parentClasses.properties.length === 1) { if(parentClasses.root[0].replace('h-','') === this.removePropPrefix(parentClasses.properties[0][0])) { - + // if microformat has no properties apply the impliedName rule to get value from containing node // this will get value from html such as Brighton if( modules.utils.hasProperties(uf.properties) === false ){ @@ -1878,31 +1878,31 @@ var Microformats; // jshint ignore:line } } } - + return uf; }; - - - + + + } // check parser module is loaded if(modules.Parser){ - - + + /** * appends clones of include Nodes into the DOM structure * * @param {DOM node} rootNode - */ + */ modules.Parser.prototype.addIncludes = function(rootNode) { this.addAttributeIncludes(rootNode, 'itemref'); this.addAttributeIncludes(rootNode, 'headers'); this.addClassIncludes(rootNode); }; - - + + /** * appends clones of include Nodes into the DOM structure for attribute based includes * @@ -1916,7 +1916,7 @@ var Microformats; // jshint ignore:line x, z, y; - + arr = modules.domUtils.getNodesByAttribute(rootNode, attributeName); x = 0; i = arr.length; @@ -1933,8 +1933,8 @@ var Microformats; // jshint ignore:line x++; } }; - - + + /** * appends clones of include Nodes into the DOM structure for class based includes * @@ -1945,7 +1945,7 @@ var Microformats; // jshint ignore:line arr, x = 0, i; - + arr = modules.domUtils.getNodesByAttributeValue(rootNode, 'class', 'include'); i = arr.length; while(x < i) { @@ -1957,8 +1957,8 @@ var Microformats; // jshint ignore:line x++; } }; - - + + /** * appends a clone of an include into another Node using Id * @@ -1968,7 +1968,7 @@ var Microformats; // jshint ignore:line modules.Parser.prototype.apppendInclude = function(node, id){ var include, clone; - + id = modules.utils.trim(id.replace('#', '')); include = modules.domUtils.getElementById(this.document, id); if(include) { @@ -1977,18 +1977,18 @@ var Microformats; // jshint ignore:line modules.domUtils.appendChild(node, clone); } }; - - + + /** - * adds an attribute marker to all the child microformat roots + * adds an attribute marker to all the child microformat roots * * @param {DOM node} rootNode - */ + */ modules.Parser.prototype.markIncludeChildren = function(rootNode) { var arr, x, i; - + // loop the array and add the attribute arr = this.findRootNodes(rootNode); x = 0; @@ -2000,17 +2000,17 @@ var Microformats; // jshint ignore:line x++; } }; - - + + /** - * removes all appended include clones from DOM + * removes all appended include clones from DOM * * @param {DOM node} rootNode - */ + */ modules.Parser.prototype.removeIncludes = function(rootNode){ var arr, i; - + // remove all the items that were added as includes arr = modules.domUtils.getNodesByAttribute(rootNode, 'data-include'); i = arr.length; @@ -2018,14 +2018,14 @@ var Microformats; // jshint ignore:line modules.domUtils.removeChild(rootNode,arr[i]); } }; - - + + } // check parser module is loaded if(modules.Parser){ - + /** * finds rel=* structures * @@ -2047,36 +2047,36 @@ var Microformats; // jshint ignore:line item, value, arr; - + arr = modules.domUtils.getNodesByAttribute(rootNode, 'rel'); x = 0; i = arr.length; while(x < i) { relList = modules.domUtils.getAttribute(arr[x], 'rel'); - + if(relList) { items = relList.split(' '); - - + + // add rels z = 0; y = items.length; while(z < y) { item = modules.utils.trim(items[z]); - + // get rel value value = modules.domUtils.getAttrValFromTagList(arr[x], ['a', 'area'], 'href'); if(!value) { value = modules.domUtils.getAttrValFromTagList(arr[x], ['link'], 'href'); } - + // create the key if(!out.rels[item]) { out.rels[item] = []; } - + if(typeof this.options.baseUrl === 'string' && typeof value === 'string') { - + var resolved = modules.url.resolve(value, this.options.baseUrl); // do not add duplicate rels - based on resolved URLs if(out.rels[item].indexOf(resolved) === -1){ @@ -2085,8 +2085,8 @@ var Microformats; // jshint ignore:line } z++; } - - + + var url = null; if(modules.domUtils.hasAttribute(arr[x], 'href')){ url = modules.domUtils.getAttribute(arr[x], 'href'); @@ -2094,8 +2094,8 @@ var Microformats; // jshint ignore:line url = modules.url.resolve(url, this.options.baseUrl ); } } - - + + // add to rel-urls var relUrl = this.getRelProperties(arr[x]); relUrl.rels = items; @@ -2103,15 +2103,15 @@ var Microformats; // jshint ignore:line if(url && out['rel-urls'][url] === undefined){ out['rel-urls'][url] = relUrl; } - - + + } x++; } return out; }; - - + + /** * gets the properties of a rel=* * @@ -2120,7 +2120,7 @@ var Microformats; // jshint ignore:line */ modules.Parser.prototype.getRelProperties = function(node){ var obj = {}; - + if(modules.domUtils.hasAttribute(node, 'media')){ obj.media = modules.domUtils.getAttribute(node, 'media'); } @@ -2135,12 +2135,12 @@ var Microformats; // jshint ignore:line } if(modules.utils.trim(this.getPValue(node, false)) !== ''){ obj.text = this.getPValue(node, false); - } - + } + return obj; }; - - + + /** * finds any alt rel=* mappings for a given node/microformat * @@ -2152,7 +2152,7 @@ var Microformats; // jshint ignore:line var out, map, i; - + map = this.getMapping(ufName); if(map) { for(var key in map.properties) { @@ -2160,8 +2160,8 @@ var Microformats; // jshint ignore:line var prop = map.properties[key], propName = (prop.map) ? prop.map : 'p-' + key, relCount = 0; - - // is property an alt rel=* mapping + + // is property an alt rel=* mapping if(prop.relAlt && modules.domUtils.hasAttribute(node, 'rel')) { i = prop.relAlt.length; while(i--) { @@ -2178,8 +2178,8 @@ var Microformats; // jshint ignore:line } return out; }; - - + + /** * returns whether a node or its children has rel=* microformat * @@ -2189,8 +2189,8 @@ var Microformats; // jshint ignore:line modules.Parser.prototype.hasRel = function(node) { return (this.countRels(node) > 0); }; - - + + /** * returns the number of rel=* microformats * @@ -2203,14 +2203,14 @@ var Microformats; // jshint ignore:line } return 0; }; - - - + + + } modules.utils = { - + /** * is the object a string * @@ -2220,7 +2220,7 @@ var Microformats; // jshint ignore:line isString: function( obj ) { return typeof( obj ) === 'string'; }, - + /** * is the object a number * @@ -2230,8 +2230,8 @@ var Microformats; // jshint ignore:line isNumber: function( obj ) { return !isNaN(parseFloat( obj )) && isFinite( obj ); }, - - + + /** * is the object an array * @@ -2241,8 +2241,8 @@ var Microformats; // jshint ignore:line isArray: function( obj ) { return obj && !( obj.propertyIsEnumerable( 'length' ) ) && typeof obj === 'object' && typeof obj.length === 'number'; }, - - + + /** * is the object a function * @@ -2252,8 +2252,8 @@ var Microformats; // jshint ignore:line isFunction: function(obj) { return !!(obj && obj.constructor && obj.call && obj.apply); }, - - + + /** * does the text start with a test string * @@ -2264,8 +2264,8 @@ var Microformats; // jshint ignore:line startWith: function( text, test ) { return(text.indexOf(test) === 0); }, - - + + /** * removes spaces at front and back of text * @@ -2279,8 +2279,8 @@ var Microformats; // jshint ignore:line return ''; } }, - - + + /** * replaces a character in text * @@ -2291,13 +2291,13 @@ var Microformats; // jshint ignore:line */ replaceCharAt: function( text, index, character ) { if(text && text.length > index){ - return text.substr(0, index) + character + text.substr(index+character.length); + return text.substr(0, index) + character + text.substr(index+character.length); }else{ return text; } }, - - + + /** * removes whitespace, tabs and returns from start and end of text * @@ -2308,7 +2308,7 @@ var Microformats; // jshint ignore:line if(text && text.length){ var i = text.length, x = 0; - + // turn all whitespace chars at end into spaces while (i--) { if(this.isOnlyWhiteSpace(text[i])){ @@ -2317,7 +2317,7 @@ var Microformats; // jshint ignore:line break; } } - + // turn all whitespace chars at start into spaces i = text.length; while (x < i) { @@ -2331,8 +2331,8 @@ var Microformats; // jshint ignore:line } return this.trim(text); }, - - + + /** * does text only contain whitespace characters * @@ -2342,8 +2342,8 @@ var Microformats; // jshint ignore:line isOnlyWhiteSpace: function( text ){ return !(/[^\t\n\r ]/.test( text )); }, - - + + /** * removes whitespace from text (leaves a single space) * @@ -2353,14 +2353,14 @@ var Microformats; // jshint ignore:line collapseWhiteSpace: function( text ){ return text.replace(/[\t\n\r ]+/g, ' '); }, - - + + /** * does an object have any of its own properties * * @param {Object} obj * @return {Boolean} - */ + */ hasProperties: function( obj ) { var key; for(key in obj) { @@ -2370,15 +2370,15 @@ var Microformats; // jshint ignore:line } return false; }, - - + + /** * a sort function - to sort objects in an array by a given property * * @param {String} property * @param {Boolean} reverse * @return {Int} - */ + */ sortObjects: function(property, reverse) { reverse = (reverse) ? -1 : 1; return function (a, b) { @@ -2393,7 +2393,7 @@ var Microformats; // jshint ignore:line return 0; }; } - + }; @@ -3058,75 +3058,75 @@ var Microformats; // jshint ignore:line * @param {String} dateString * @param {String} format * @return {String} - */ + */ modules.ISODate = function ( dateString, format ) { this.clear(); - + this.format = (format)? format : 'auto'; // auto or W3C or RFC3339 or HTML5 this.setFormatSep(); - - // optional should be full iso date/time string + + // optional should be full iso date/time string if(arguments[0]) { this.parse(dateString, format); } }; - + modules.ISODate.prototype = { - - + + /** * clear all states * - */ + */ clear: function(){ this.clearDate(); this.clearTime(); this.clearTimeZone(); this.setAutoProfileState(); }, - - + + /** * clear date states * - */ + */ clearDate: function(){ this.dY = -1; this.dM = -1; this.dD = -1; this.dDDD = -1; }, - - + + /** * clear time states * - */ + */ clearTime: function(){ this.tH = -1; this.tM = -1; this.tS = -1; this.tD = -1; }, - - + + /** * clear timezone states * - */ + */ clearTimeZone: function(){ this.tzH = -1; this.tzM = -1; this.tzPN = '+'; this.z = false; }, - - + + /** * resets the auto profile state * - */ + */ setAutoProfileState: function(){ this.autoProfile = { sep: 'T', @@ -3136,31 +3136,31 @@ var Microformats; // jshint ignore:line tzZulu: 'Z' }; }, - - + + /** * parses text to find ISO date/time string i.e. 2008-05-01T15:45:19Z * * @param {String} dateString * @param {String} format * @return {String} - */ + */ parse: function( dateString, format ) { this.clear(); - + var parts = [], tzArray = [], position = 0, datePart = '', timePart = '', timeZonePart = ''; - + if(format){ this.format = format; } - - - + + + // discover date time separtor for auto profile // Set to 'T' by default if(dateString.indexOf('t') > -1) { @@ -3174,47 +3174,47 @@ var Microformats; // jshint ignore:line } if(dateString.toUpperCase().indexOf('T') === -1) { this.autoProfile.sep = ' '; - } - - + } + + dateString = dateString.toUpperCase().replace(' ','T'); - + // break on 'T' divider or space if(dateString.indexOf('T') > -1) { parts = dateString.split('T'); datePart = parts[0]; timePart = parts[1]; - - // zulu UTC + + // zulu UTC if(timePart.indexOf( 'Z' ) > -1) { this.z = true; } - + // timezone if(timePart.indexOf( '+' ) > -1 || timePart.indexOf( '-' ) > -1) { tzArray = timePart.split( 'Z' ); // incase of incorrect use of Z timePart = tzArray[0]; timeZonePart = tzArray[1]; - + // timezone if(timePart.indexOf( '+' ) > -1 || timePart.indexOf( '-' ) > -1) { position = 0; - + if(timePart.indexOf( '+' ) > -1) { position = timePart.indexOf( '+' ); } else { position = timePart.indexOf( '-' ); } - + timeZonePart = timePart.substring( position, timePart.length ); timePart = timePart.substring( 0, position ); } } - + } else { datePart = dateString; } - + if(datePart !== '') { this.parseDate( datePart ); if(timePart !== '') { @@ -3226,25 +3226,25 @@ var Microformats; // jshint ignore:line } return this.toString( format ); }, - - + + /** * parses text to find just the date element of an ISO date/time string i.e. 2008-05-01 * * @param {String} dateString * @param {String} format * @return {String} - */ + */ parseDate: function( dateString, format ) { this.clearDate(); - + var parts = []; - + // discover timezone separtor for auto profile // default is ':' if(dateString.indexOf('-') === -1) { this.autoProfile.tsep = ''; - } - + } + // YYYY-DDD parts = dateString.match( /(\d\d\d\d)-(\d\d\d)/ ); if(parts) { @@ -3255,7 +3255,7 @@ var Microformats; // jshint ignore:line this.dDDD = parts[2]; } } - + if(this.dDDD === -1) { // YYYY-MM-DD ie 2008-05-01 and YYYYMMDD ie 20080501 parts = dateString.match( /(\d\d\d\d)?-?(\d\d)?-?(\d\d)?/ ); @@ -3271,24 +3271,24 @@ var Microformats; // jshint ignore:line } return this.toString(format); }, - - + + /** * parses text to find just the time element of an ISO date/time string i.e. 13:30:45 * * @param {String} timeString * @param {String} format * @return {String} - */ + */ parseTime: function( timeString, format ) { this.clearTime(); var parts = []; - + // discover date separtor for auto profile // default is ':' if(timeString.indexOf(':') === -1) { this.autoProfile.tsep = ''; - } - + } + // finds timezone HH:MM:SS and HHMMSS ie 13:30:45, 133045 and 13:30:45.0135 parts = timeString.match( /(\d\d)?:?(\d\d)?:?(\d\d)?.?([0-9]+)?/ ); if(parts[1]) { @@ -3305,30 +3305,30 @@ var Microformats; // jshint ignore:line } return this.toTimeString(format); }, - - + + /** * parses text to find just the time element of an ISO date/time string i.e. +08:00 * * @param {String} timeString * @param {String} format * @return {String} - */ + */ parseTimeZone: function( timeString, format ) { this.clearTimeZone(); var parts = []; - + if(timeString.toLowerCase() === 'z'){ this.z = true; // set case for z this.autoProfile.tzZulu = (timeString === 'z')? 'z' : 'Z'; }else{ - + // discover timezone separtor for auto profile // default is ':' if(timeString.indexOf(':') === -1) { this.autoProfile.tzsep = ''; - } - + } + // finds timezone +HH:MM and +HHMM ie +13:30 and +1330 parts = timeString.match( /([\-\+]{1})?(\d\d)?:?(\d\d)?/ ); if(parts[1]) { @@ -3339,29 +3339,29 @@ var Microformats; // jshint ignore:line } if(parts[3]) { this.tzM = parts[3]; - } - - + } + + } - this.tzZulu = 'z'; + this.tzZulu = 'z'; return this.toTimeString( format ); }, - - + + /** * returns ISO date/time string in W3C Note, RFC 3339, HTML5, or auto profile * * @param {String} format * @return {String} - */ + */ toString: function( format ) { var output = ''; - + if(format){ this.format = format; } this.setFormatSep(); - + if(this.dY > -1) { output = this.dY; if(this.dM > 0 && this.dM < 13) { @@ -3379,26 +3379,26 @@ var Microformats; // jshint ignore:line } else if(this.tH > -1) { output += this.toTimeString( format ); } - + return output; }, - - + + /** * returns just the time string element of an ISO date/time * in W3C Note, RFC 3339, HTML5, or auto profile * * @param {String} format * @return {String} - */ + */ toTimeString: function( format ) { var out = ''; - + if(format){ this.format = format; } this.setFormatSep(); - + // time can only be created with a full date if(this.tH) { if(this.tH > -1 && this.tH < 25) { @@ -3412,10 +3412,10 @@ var Microformats; // jshint ignore:line } } } - - - - // time zone offset + + + + // time zone offset if(this.z) { out += this.tzZulu; } else { @@ -3430,12 +3430,12 @@ var Microformats; // jshint ignore:line } return out; }, - - + + /** * set the current profile to W3C Note, RFC 3339, HTML5, or auto profile * - */ + */ setFormatSep: function() { switch( this.format.toLowerCase() ) { case 'rfc3339': @@ -3468,54 +3468,54 @@ var Microformats; // jshint ignore:line this.tzZulu = this.autoProfile.tzZulu; } }, - - + + /** * does current data contain a full date i.e. 2015-03-23 * * @return {Boolean} - */ + */ hasFullDate: function() { return(this.dY !== -1 && this.dM !== -1 && this.dD !== -1); }, - - + + /** * does current data contain a minimum date which is just a year number i.e. 2015 * * @return {Boolean} - */ + */ hasDate: function() { return(this.dY !== -1); }, - - + + /** * does current data contain a minimum time which is just a hour number i.e. 13 * * @return {Boolean} - */ + */ hasTime: function() { return(this.tH !== -1); }, - + /** * does current data contain a minimum timezone i.e. -1 || +1 || z * * @return {Boolean} - */ + */ hasTimeZone: function() { return(this.tzH !== -1); } - + }; - + modules.ISODate.prototype.constructor = modules.ISODate; modules.dates = { - + /** * does text contain am * @@ -3526,8 +3526,8 @@ var Microformats; // jshint ignore:line text = text.toLowerCase(); return(text.indexOf('am') > -1 || text.indexOf('a.m.') > -1); }, - - + + /** * does text contain pm * @@ -3538,8 +3538,8 @@ var Microformats; // jshint ignore:line text = text.toLowerCase(); return(text.indexOf('pm') > -1 || text.indexOf('p.m.') > -1); }, - - + + /** * remove am and pm from text and return it * @@ -3549,8 +3549,8 @@ var Microformats; // jshint ignore:line removeAMPM: function( text ) { return text.replace('pm', '').replace('p.m.', '').replace('am', '').replace('a.m.', ''); }, - - + + /** * simple test of whether ISO date string is a duration i.e. PY17M or PW12 * @@ -3566,15 +3566,15 @@ var Microformats; // jshint ignore:line } return false; }, - - + + /** * is text a time or timezone * i.e. HH-MM-SS or z+-HH-MM-SS 08:43 | 15:23:00:0567 | 10:34pm | 10:34 p.m. | +01:00:00 | -02:00 | z15:00 | 0843 * * @param {String} text * @return {Boolean} - */ + */ isTime: function( text ) { if(modules.utils.isString(text)){ text = text.toLowerCase(); @@ -3584,7 +3584,7 @@ var Microformats; // jshint ignore:line return true; } // has ante meridiem or post meridiem - if( text.match(/^[0-9]/) && + if( text.match(/^[0-9]/) && ( this.hasAM(text) || this.hasPM(text) )) { return true; } @@ -3592,7 +3592,7 @@ var Microformats; // jshint ignore:line if( text.match(':') && !text.match(/t|\s/) ) { return true; } - + // if it's a number of 2, 4 or 6 chars if(modules.utils.isNumber(text)){ if(text.length === 2 || text.length === 4 || text.length === 6){ @@ -3602,7 +3602,7 @@ var Microformats; // jshint ignore:line } return false; }, - + /** * parses a time from text and returns 24hr time string @@ -3610,18 +3610,18 @@ var Microformats; // jshint ignore:line * * @param {String} text * @return {String} - */ + */ parseAmPmTime: function( text ) { var out = text, times = []; - + // if the string has a text : or am or pm if(modules.utils.isString(out)) { //text = text.toLowerCase(); text = text.replace(/[ ]+/g, ''); - + if(text.match(':') || this.hasAM(text) || this.hasPM(text)) { - + if(text.match(':')) { times = text.split(':'); } else { @@ -3629,31 +3629,31 @@ var Microformats; // jshint ignore:line times[0] = text; times[0] = this.removeAMPM(times[0]); } - + // change pm hours to 24hr number if(this.hasPM(text)) { if(times[0] < 12) { times[0] = parseInt(times[0], 10) + 12; } } - + // add leading zero's where needed if(times[0] && times[0].length === 1) { times[0] = '0' + times[0]; } - + // rejoin text elements together if(times[0]) { text = times.join(':'); } } } - + // remove am/pm strings return this.removeAMPM(text); }, - - + + /** * overlays a time on a date to return the union of the two * @@ -3661,11 +3661,11 @@ var Microformats; // jshint ignore:line * @param {String} time * @param {String} format ( Modules.ISODate profile format ) * @return {Object} Modules.ISODate - */ + */ dateTimeUnion: function(date, time, format) { var isodate = new modules.ISODate(date, format), isotime = new modules.ISODate(); - + isotime.parseTime(this.parseAmPmTime(time), format); if(isodate.hasFullDate() && isotime.hasTime()) { isodate.tH = isotime.tH; @@ -3680,8 +3680,8 @@ var Microformats; // jshint ignore:line return new modules.ISODate(); } }, - - + + /** * concatenate an array of date and time text fragments to create an ISODate object * used for microformat value and value-title rules @@ -3689,65 +3689,65 @@ var Microformats; // jshint ignore:line * @param {Array} arr ( Array of Strings ) * @param {String} format ( Modules.ISODate profile format ) * @return {Object} Modules.ISODate - */ + */ concatFragments: function (arr, format) { var out = new modules.ISODate(), i = 0, value = ''; - - // if the fragment already contains a full date just return it once + + // if the fragment already contains a full date just return it once if(arr[0].toUpperCase().match('T')) { return new modules.ISODate(arr[0], format); }else{ for(i = 0; i < arr.length; i++) { value = arr[i]; - + // date pattern if( value.charAt(4) === '-' && out.hasFullDate() === false ){ out.parseDate(value); } - + // time pattern if( (value.indexOf(':') > -1 || modules.utils.isNumber( this.parseAmPmTime(value) )) && out.hasTime() === false ) { // split time and timezone var items = this.splitTimeAndZone(value); value = items[0]; - + // parse any use of am/pm value = this.parseAmPmTime(value); out.parseTime(value); - - // parse any timezone + + // parse any timezone if(items.length > 1){ out.parseTimeZone(items[1], format); } } - + // timezone pattern if(value.charAt(0) === '-' || value.charAt(0) === '+' || value.toUpperCase() === 'Z') { if( out.hasTimeZone() === false ){ out.parseTimeZone(value); } } - + } return out; - + } }, - - + + /** * parses text by splitting it into an array of time and timezone strings * * @param {String} text * @return {Array} Modules.ISODate - */ + */ splitTimeAndZone: function ( text ){ var out = [text], chars = ['-','+','z','Z'], i = chars.length; - + while (i--) { if(text.indexOf(chars[i]) > -1){ out[0] = text.slice( 0, text.indexOf(chars[i]) ); @@ -3757,28 +3757,28 @@ var Microformats; // jshint ignore:line } return out; } - + }; modules.text = { - + // normalised or whitespace or whitespacetrimmed - textFormat: 'whitespacetrimmed', - + textFormat: 'whitespacetrimmed', + // block level tags, used to add line returns blockLevelTags: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'hr', 'pre', 'table', - 'address', 'article', 'aside', 'blockquote', 'caption', 'col', 'colgroup', 'dd', 'div', - 'dt', 'dir', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'header', 'hgroup', 'hr', - 'li', 'map', 'menu', 'nav', 'optgroup', 'option', 'section', 'tbody', 'testarea', + 'address', 'article', 'aside', 'blockquote', 'caption', 'col', 'colgroup', 'dd', 'div', + 'dt', 'dir', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'header', 'hgroup', 'hr', + 'li', 'map', 'menu', 'nav', 'optgroup', 'option', 'section', 'tbody', 'testarea', 'tfoot', 'th', 'thead', 'tr', 'td', 'ul', 'ol', 'dl', 'details'], - // tags to exclude + // tags to exclude excludeTags: ['noframe', 'noscript', 'template', 'script', 'style', 'frames', 'frameset'], - - + + /** - * parses the text from the DOM Node + * parses the text from the DOM Node * * @param {DOM Node} node * @param {String} textFormat @@ -3798,54 +3798,54 @@ var Microformats; // jshint ignore:line return this.formatText( doc, modules.domUtils.textContent(node), this.textFormat ); } }, - - + + /** - * parses the text from a html string + * parses the text from a html string * * @param {DOM Document} doc * @param {String} text * @param {String} textFormat * @return {String} - */ + */ parseText: function( doc, text, textFormat ){ var node = modules.domUtils.createNodeWithText( 'div', text ); return this.parse( doc, node, textFormat ); }, - - + + /** * parses the text from a html string - only for whitespace or whitespacetrimmed formats * * @param {String} text * @param {String} textFormat * @return {String} - */ + */ formatText: function( doc, text, textFormat ){ this.textFormat = (textFormat)? textFormat : this.textFormat; if(text){ var out = '', regex = /(<([^>]+)>)/ig; - - out = text.replace(regex, ''); - if(this.textFormat === 'whitespacetrimmed') { + + out = text.replace(regex, ''); + if(this.textFormat === 'whitespacetrimmed') { out = modules.utils.trimWhitespace( out ); } - + //return entities.decode( out, 2 ); return modules.domUtils.decodeEntities( doc, out ); }else{ - return ''; + return ''; } }, - - + + /** - * normalises whitespace in given text + * normalises whitespace in given text * * @param {String} text * @return {String} - */ + */ normalise: function( doc, text ){ text = text.replace( / /g, ' ') ; // exchanges html entity for space into space char text = modules.utils.collapseWhiteSpace( text ); // removes linefeeds, tabs and addtional spaces @@ -3853,27 +3853,27 @@ var Microformats; // jshint ignore:line text = text.replace( '–', '-' ); // correct dash decoding return modules.utils.trim( text ); }, - - + + /** * walks DOM tree parsing the text from DOM Nodes * * @param {DOM Node} node * @return {String} - */ + */ walkTreeForText: function( node ) { var out = '', j = 0; - + if(node.tagName && this.excludeTags.indexOf( node.tagName.toLowerCase() ) > -1){ return out; } - + // if node is a text node get its text if(node.nodeType && node.nodeType === 3){ - out += modules.domUtils.getElementText( node ); + out += modules.domUtils.getElementText( node ); } - + // get the text of the child nodes if(node.childNodes && node.childNodes.length > 0){ for (j = 0; j < node.childNodes.length; j++) { @@ -3883,34 +3883,34 @@ var Microformats; // jshint ignore:line } } } - + // if it's a block level tag add an additional space at the end if(node.tagName && this.blockLevelTags.indexOf( node.tagName.toLowerCase() ) !== -1){ out += ' '; - } - + } + return (out === '')? undefined : out ; } - + }; modules.html = { - + // elements which are self-closing selfClosingElt: ['area', 'base', 'br', 'col', 'hr', 'img', 'input', 'link', 'meta', 'param', 'command', 'keygen', 'source'], - + /** * parse the html string from DOM Node * * @param {DOM Node} node * @return {String} - */ + */ parse: function( node ){ var out = '', j = 0; - + // we do not want the outer container if(node.childNodes && node.childNodes.length > 0){ for (j = 0; j < node.childNodes.length; j++) { @@ -3920,47 +3920,47 @@ var Microformats; // jshint ignore:line } } } - + return out; }, - - + + /** * walks the DOM tree parsing the html string from the nodes * * @param {DOM Document} doc * @param {DOM Node} node * @return {String} - */ + */ walkTreeForHtml: function( node ) { var out = '', j = 0; - + // if node is a text node get its text if(node.nodeType && node.nodeType === 3){ - out += modules.domUtils.getElementText( node ); + out += modules.domUtils.getElementText( node ); } - - - // exclude text which has been added with include pattern - + + + // exclude text which has been added with include pattern - if(node.nodeType && node.nodeType === 1 && modules.domUtils.hasAttribute(node, 'data-include') === false){ - + // begin tag - out += '<' + node.tagName.toLowerCase(); - + out += '<' + node.tagName.toLowerCase(); + // add attributes var attrs = modules.domUtils.getOrderedAttributes(node); for (j = 0; j < attrs.length; j++) { out += ' ' + attrs[j].name + '=' + '"' + attrs[j].value + '"'; } - + if(this.selfClosingElt.indexOf(node.tagName.toLowerCase()) === -1){ out += '>'; } - + // get the text of the child nodes if(node.childNodes && node.childNodes.length > 0){ - + for (j = 0; j < node.childNodes.length; j++) { var text = this.walkTreeForHtml( node.childNodes[j] ); if(text !== undefined){ @@ -3968,19 +3968,19 @@ var Microformats; // jshint ignore:line } } } - + // end tag if(this.selfClosingElt.indexOf(node.tagName.toLowerCase()) > -1){ - out += ' />'; + out += ' />'; }else{ - out += ''; + out += ''; } - } - + } + return (out === '')? undefined : out; - } - - + } + + }; @@ -4025,7 +4025,7 @@ var Microformats; // jshint ignore:line 'map': 'u-email' }, 'geo': { - 'map': 'p-geo', + 'map': 'p-geo', 'uf': ['h-geo'] }, 'key': { @@ -4092,7 +4092,7 @@ var Microformats; // jshint ignore:line 'updated': { 'map': 'dt-updated' }, - 'author': { + 'author': { 'uf': ['h-card'] }, 'category': { @@ -4100,7 +4100,7 @@ var Microformats; // jshint ignore:line 'relAlt': ['tag'] }, 'geo': { - 'map': 'p-geo', + 'map': 'p-geo', 'uf': ['h-geo'] }, 'latitude': {}, @@ -4113,7 +4113,7 @@ var Microformats; // jshint ignore:line }; - modules.maps['h-event'] = { + modules.maps['h-event'] = { root: 'vevent', name: 'h-event', properties: { @@ -4159,7 +4159,7 @@ var Microformats; // jshint ignore:line 'map': 'u-attach' }, 'status': {}, - 'rdate': {}, + 'rdate': {}, 'rrule': {} } }; @@ -4176,7 +4176,7 @@ var Microformats; // jshint ignore:line 'summary': { 'map': 'p-summary' }, - 'author': { + 'author': { 'uf': ['h-card'] }, 'url': { @@ -4269,7 +4269,7 @@ var Microformats; // jshint ignore:line 'map': 'u-item-license' }, 'principles': { - 'map': 'u-principles', + 'map': 'u-principles', 'relAlt': ['principles'] } } @@ -4396,7 +4396,7 @@ var Microformats; // jshint ignore:line 'rating': {}, 'average': {}, 'best': {}, - 'worst': {}, + 'worst': {}, 'count': {}, 'votes': {}, 'category': { @@ -4448,26 +4448,26 @@ var Microformats; // jshint ignore:line modules.rels = { // xfn - 'friend': [ 'yes','external'], - 'acquaintance': [ 'yes','external'], - 'contact': [ 'yes','external'], - 'met': [ 'yes','external'], - 'co-worker': [ 'yes','external'], - 'colleague': [ 'yes','external'], - 'co-resident': [ 'yes','external'], - 'neighbor': [ 'yes','external'], - 'child': [ 'yes','external'], - 'parent': [ 'yes','external'], - 'sibling': [ 'yes','external'], - 'spouse': [ 'yes','external'], - 'kin': [ 'yes','external'], - 'muse': [ 'yes','external'], - 'crush': [ 'yes','external'], - 'date': [ 'yes','external'], - 'sweetheart': [ 'yes','external'], - 'me': [ 'yes','external'], - - // other rel=* + 'friend': [ 'yes','external'], + 'acquaintance': [ 'yes','external'], + 'contact': [ 'yes','external'], + 'met': [ 'yes','external'], + 'co-worker': [ 'yes','external'], + 'colleague': [ 'yes','external'], + 'co-resident': [ 'yes','external'], + 'neighbor': [ 'yes','external'], + 'child': [ 'yes','external'], + 'parent': [ 'yes','external'], + 'sibling': [ 'yes','external'], + 'spouse': [ 'yes','external'], + 'kin': [ 'yes','external'], + 'muse': [ 'yes','external'], + 'crush': [ 'yes','external'], + 'date': [ 'yes','external'], + 'sweetheart': [ 'yes','external'], + 'me': [ 'yes','external'], + + // other rel=* 'license': [ 'yes','yes'], 'nofollow': [ 'no','external'], 'tag': [ 'no','yes'], @@ -4480,7 +4480,7 @@ var Microformats; // jshint ignore:line 'pronunciation': [ 'no','external'], 'payment': [ 'no','external'], 'principles': [ 'no','external'] - + }; @@ -4489,43 +4489,43 @@ var Microformats; // jshint ignore:line version: modules.version, livingStandard: modules.livingStandard }; - - + + External.get = function(options){ var parser = new modules.Parser(); addV1(parser, options); return parser.get( options ); }; - - + + External.getParent = function(node, options){ var parser = new modules.Parser(); addV1(parser, options); return parser.getParent( node, options ); }; - - + + External.count = function(options){ var parser = new modules.Parser(); addV1(parser, options); return parser.count( options ); }; - - + + External.isMicroformat = function( node, options ){ var parser = new modules.Parser(); addV1(parser, options); return parser.isMicroformat( node, options ); }; - - + + External.hasMicroformats = function( node, options ){ var parser = new modules.Parser(); addV1(parser, options); return parser.hasMicroformats( node, options ); }; - - + + function addV1(parser, options){ if(options && options.maps){ if(Array.isArray(options.maps)){ @@ -4535,11 +4535,11 @@ var Microformats; // jshint ignore:line } } } - - + + return External; - - + + })); try { // mozilla jsm support diff --git a/toolkit/components/microformats/test/interface-tests/count-test.js b/toolkit/components/microformats/test/interface-tests/count-test.js index 74b5a0f0f236..baac56c2b4ba 100644 --- a/toolkit/components/microformats/test/interface-tests/count-test.js +++ b/toolkit/components/microformats/test/interface-tests/count-test.js @@ -6,102 +6,102 @@ assert = chai.assert; describe('Microformat.count', function() { - + it('count', function(){ - + var doc, node, result; - - var html = 'GlennJaneEvent2015-07-01'; - - + + var html = 'GlennJaneEvent2015-07-01'; + + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); node.innerHTML = html; - doc.body.appendChild(node); - + doc.body.appendChild(node); + options ={ 'node': node, }; result = Microformats.count(options); assert.deepEqual( result, {'h-event': 1,'h-card': 2} ); - + }); - - + + it('count rels', function(){ - + var doc, node, result; - - var html = 'GlennJaneEvent2015-07-01'; - - + + var html = 'GlennJaneEvent2015-07-01'; + + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); node.innerHTML = html; - doc.body.appendChild(node); - + doc.body.appendChild(node); + options ={ 'node': node, }; result = Microformats.count(options); assert.deepEqual( result, {'h-event': 1,'h-card': 2, 'rels': 1} ); - + }); - - + + it('count - no results', function(){ - + var doc, node, result; - - var html = 'Jane'; - - + + var html = 'Jane'; + + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); node.innerHTML = html; - doc.body.appendChild(node); - + doc.body.appendChild(node); + options ={ 'node': node, }; result = Microformats.count(options); assert.deepEqual( result, {} ); - + }); - - - + + + it('count - no options', function(){ - + var result; - + result = Microformats.count({}); assert.deepEqual( result, {} ); - + }); - - + + it('count - options.html', function(){ - + var options = {}, result; - - options.html = 'GlennJaneEvent2015-07-01'; + + options.html = 'GlennJaneEvent2015-07-01'; result = Microformats.count(options); assert.deepEqual( result, {'h-event': 1,'h-card': 2} ); - + }); - - - + + + }); diff --git a/toolkit/components/microformats/test/interface-tests/experimental-test.js b/toolkit/components/microformats/test/interface-tests/experimental-test.js index 9eec6d739cb1..4d32b83c0577 100644 --- a/toolkit/components/microformats/test/interface-tests/experimental-test.js +++ b/toolkit/components/microformats/test/interface-tests/experimental-test.js @@ -8,7 +8,7 @@ assert = chai.assert; describe('experimental', function() { it('h-geo - geo data writen as lat;lon', function(){ - + var expected = { 'items': [{ 'type': ['h-geo'], @@ -20,7 +20,7 @@ describe('experimental', function() { }], 'rels': {}, 'rel-urls': {} - }, + }, options = { 'html': '
30.267991;-97.739568
', 'baseUrl': 'http://example.com', @@ -30,8 +30,8 @@ describe('experimental', function() { var result = Microformats.get(options); assert.deepEqual( result, expected ); - + }); - - + + }); diff --git a/toolkit/components/microformats/test/interface-tests/getParent-test.js b/toolkit/components/microformats/test/interface-tests/getParent-test.js index 220f7155cc98..56ccbb2ba721 100644 --- a/toolkit/components/microformats/test/interface-tests/getParent-test.js +++ b/toolkit/components/microformats/test/interface-tests/getParent-test.js @@ -6,7 +6,7 @@ assert = chai.assert; describe('Microformat.getParent', function() { - + var HTML = '
Pub2015-07-01t17:30z
'; var emptyExpected = { "items": [], @@ -33,93 +33,93 @@ describe('Microformat.getParent', function() { "rel-urls": {} }; var options = {'dateFormat': 'html5'}; - - - + + + it('getParent with parent', function(){ - + var doc, node, span, result; - + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); node.innerHTML = HTML; doc.body.appendChild(node); - span = doc.querySelector('.dt-start'); - + span = doc.querySelector('.dt-start'); + result = Microformats.getParent(span,options); assert.deepEqual( result, expected ); - + }); - - - + + + it('getParent without parent', function(){ - + var doc, node, parser, result; - + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); node.innerHTML = HTML; doc.body.appendChild(node); - + result = Microformats.getParent(node,options); assert.deepEqual( result, emptyExpected ); - + }); - - + + it('getParent found with option.filters', function(){ - + var doc, node, span, result; - + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); node.innerHTML = HTML; doc.body.appendChild(node); - span = doc.querySelector('.dt-start'); - + span = doc.querySelector('.dt-start'); + result = Microformats.getParent( span, {'filters': ['h-event'], 'dateFormat': 'html5'} ); assert.deepEqual( result, expected ); - + }); - - + + it('getParent not found with option.filters', function(){ - + var doc, node, span, result; - + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); node.innerHTML = HTML; doc.body.appendChild(node); - span = doc.querySelector('.dt-start'); + span = doc.querySelector('.dt-start'); result = Microformats.getParent( span, {'filters': ['h-card'], 'dateFormat': 'html5'} ); assert.deepEqual( result, emptyExpected ); - + }); - - + + it('getParent use option.filters to up through h-*', function(){ - + var doc, node, span, result; - + var altHTML = '

test

this
Glenn Jones2015-07-01t17:30z
'; var altExpected = { "items": [ @@ -162,27 +162,27 @@ describe('Microformat.getParent', function() { "rels": {}, "rel-urls": {} }; - - + + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); node.innerHTML = altHTML; doc.body.appendChild(node); - span = doc.querySelector('.h-card .p-name'); - + span = doc.querySelector('.h-card .p-name'); + result = Microformats.getParent( span, {'filters': ['h-entry'], 'dateFormat': 'html5'} ); assert.deepEqual( result, altExpected ); - + }); - - + + it('getParent stop at first h-* parent', function(){ - + var doc, node, span, result; - + var altHTML = '

test

this
Glenn Jones2015-07-01t17:30z
'; var altExpected = { "items": [ @@ -198,23 +198,23 @@ describe('Microformat.getParent', function() { "http://glennjones.net" ] } - } + } ], "rels": {}, "rel-urls": {} }; - - + + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); node.innerHTML = altHTML; doc.body.appendChild(node); - span = doc.querySelector('.h-card .p-name'); - + span = doc.querySelector('.h-card .p-name'); + result = Microformats.getParent( span, options ); assert.deepEqual( result, altExpected ); - + }); - - + + }); diff --git a/toolkit/components/microformats/test/interface-tests/hasMicroformats-test.js b/toolkit/components/microformats/test/interface-tests/hasMicroformats-test.js index 84f7e32a43d1..98c79a85514b 100644 --- a/toolkit/components/microformats/test/interface-tests/hasMicroformats-test.js +++ b/toolkit/components/microformats/test/interface-tests/hasMicroformats-test.js @@ -6,180 +6,180 @@ assert = chai.assert; describe('Microformat.hasMicroformats', function() { - + it('true - v2 on node', function(){ - + var doc, node; - - var html = 'Glenn'; - + + var html = 'Glenn'; + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); doc.body.appendChild( node ); node.innerHTML = html; - node = doc.querySelector( 'a' ); + node = doc.querySelector( 'a' ); assert.isTrue( Microformats.hasMicroformats( node ) ); - + }); - - + + it('true - v1 on node', function(){ - + var doc, node; - - var html = 'Glenn'; - + + var html = 'Glenn'; + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); doc.body.appendChild( node ); node.innerHTML = html; - node = doc.querySelector( 'a' ); + node = doc.querySelector( 'a' ); assert.isTrue( Microformats.hasMicroformats( node ) ); - + }); - - + + it('true - v2 filter on node', function(){ - + var doc, node; - - var html = 'Glenn'; - + + var html = 'Glenn'; + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); doc.body.appendChild( node ); node.innerHTML = html; - node = doc.querySelector( 'a' ); + node = doc.querySelector( 'a' ); assert.isTrue( Microformats.hasMicroformats( node, {'filters': ['h-card']} ) ); - + }); - - + + it('true - v1 filter on node', function(){ - + var doc, node; - - var html = 'Glenn'; - + + var html = 'Glenn'; + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); doc.body.appendChild( node ); node.innerHTML = html; - node = doc.querySelector( 'a' ); + node = doc.querySelector( 'a' ); assert.isTrue( Microformats.hasMicroformats( node, {'filters': ['h-card']} ) ); - + }); - - + + it('false - v2 filter on node', function(){ - + var doc, node; - - var html = 'Glenn'; - + + var html = 'Glenn'; + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); doc.body.appendChild( node ); node.innerHTML = html; - node = doc.querySelector( 'a' ); + node = doc.querySelector( 'a' ); assert.isFalse( Microformats.hasMicroformats( node, {'filters': ['h-entry']} ) ); - + }); - - - + + + it('false - property', function(){ - + var doc, node, parser; - - var html = 'Glenn'; - + + var html = 'Glenn'; + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); doc.body.appendChild( node ); node.innerHTML = html; - node = doc.querySelector( 'span' ); + node = doc.querySelector( 'span' ); assert.isFalse( Microformats.hasMicroformats( node ) ); - + }); - - + + it('false - no class', function(){ - + var doc, node, parser; - - var html = 'Glenn'; - + + var html = 'Glenn'; + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); doc.body.appendChild( node ); node.innerHTML = html; - node = doc.querySelector( 'span' ); + node = doc.querySelector( 'span' ); assert.isFalse( Microformats.hasMicroformats( node ) ); - + }); - - + + it('false - no node', function(){ assert.isFalse( Microformats.hasMicroformats( ) ); }); - - + + it('false - undefined node', function(){ assert.isFalse( Microformats.hasMicroformats( undefined ) ); }); - - + + it('true - child', function(){ - + var doc, node; - - var html = '
'; - + + var html = '
'; + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); doc.body.appendChild( node ); node.innerHTML = html; assert.isTrue( Microformats.hasMicroformats( node ) ); - + }); - - - + + + it('true - document', function(){ - + var doc, node; - - var html = '
'; - + + var html = '
'; + var dom = new DOMParser(); doc = dom.parseFromString( html, 'text/html' ); assert.isTrue( Microformats.hasMicroformats( doc ) ); - + }); - - - - - + + + + + }); diff --git a/toolkit/components/microformats/test/interface-tests/isMicroformat-test.js b/toolkit/components/microformats/test/interface-tests/isMicroformat-test.js index 2d8e6f2a63fd..7081b2880407 100644 --- a/toolkit/components/microformats/test/interface-tests/isMicroformat-test.js +++ b/toolkit/components/microformats/test/interface-tests/isMicroformat-test.js @@ -6,141 +6,141 @@ assert = chai.assert; describe('Microformat.isMicroformat', function() { - + it('true - v2', function(){ - + var doc, node; - - var html = 'Glenn'; - + + var html = 'Glenn'; + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); doc.body.appendChild( node ); node.innerHTML = html; - node = doc.querySelector( 'a' ); + node = doc.querySelector( 'a' ); assert.isTrue( Microformats.isMicroformat( node ) ); - + }); - - + + it('true - v1', function(){ - + var doc, node; - - var html = 'Glenn'; - + + var html = 'Glenn'; + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); doc.body.appendChild( node ); node.innerHTML = html; - node = doc.querySelector( 'a' ); + node = doc.querySelector( 'a' ); assert.isTrue( Microformats.isMicroformat( node ) ); - + }); - - + + it('true - v2 filter', function(){ - + var doc, node; - - var html = 'Glenn'; - + + var html = 'Glenn'; + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); doc.body.appendChild( node ); node.innerHTML = html; - node = doc.querySelector( 'a' ); + node = doc.querySelector( 'a' ); assert.isTrue( Microformats.isMicroformat( node, {'filters': ['h-card']} ) ); - + }); - - + + it('true - v1 filter', function(){ - + var doc, node; - - var html = 'Glenn'; - + + var html = 'Glenn'; + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); doc.body.appendChild( node ); node.innerHTML = html; - node = doc.querySelector( 'a' ); + node = doc.querySelector( 'a' ); assert.isTrue( Microformats.isMicroformat( node, {'filters': ['h-card']} ) ); - + }); - - + + it('false - v2 filter', function(){ - + var doc, node; - - var html = 'Glenn'; - + + var html = 'Glenn'; + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); doc.body.appendChild( node ); node.innerHTML = html; - node = doc.querySelector( 'a' ); + node = doc.querySelector( 'a' ); assert.isFalse( Microformats.isMicroformat( node, {'filters': ['h-entry']} ) ); - + }); - - - + + + it('false - property', function(){ - + var doc, node; - - var html = 'Glenn'; - + + var html = 'Glenn'; + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); doc.body.appendChild( node ); node.innerHTML = html; - node = doc.querySelector( 'span' ); + node = doc.querySelector( 'span' ); assert.isFalse( Microformats.isMicroformat( node ) ); - + }); - - + + it('false - no class', function(){ - + var doc, node; - - var html = 'Glenn'; - + + var html = 'Glenn'; + doc = document.implementation.createHTMLDocument('New Document'); node = document.createElement('div'); doc.body.appendChild( node ); node.innerHTML = html; - node = doc.querySelector( 'span' ); + node = doc.querySelector( 'span' ); assert.isFalse( Microformats.isMicroformat( node ) ); - + }); - - + + it('false - no node', function(){ assert.isFalse( Microformats.isMicroformat( ) ); }); - - + + it('false - undefined node', function(){ assert.isFalse( Microformats.isMicroformat( undefined ) ); }); - + }); diff --git a/toolkit/components/microformats/test/lib/dates.js b/toolkit/components/microformats/test/lib/dates.js index 394ac291ba95..6d6129b0837c 100644 --- a/toolkit/components/microformats/test/lib/dates.js +++ b/toolkit/components/microformats/test/lib/dates.js @@ -2,7 +2,7 @@ dates These functions are based on microformats implied rules for parsing date fragments from text. They are not generalist date utilities and should only be used with the isodate.js module of this library. - + Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt Dependencies utilities.js, isodate.js @@ -10,10 +10,10 @@ var Modules = (function (modules) { - + modules.dates = { - + /** * does text contain am * @@ -24,8 +24,8 @@ var Modules = (function (modules) { text = text.toLowerCase(); return(text.indexOf('am') > -1 || text.indexOf('a.m.') > -1); }, - - + + /** * does text contain pm * @@ -36,8 +36,8 @@ var Modules = (function (modules) { text = text.toLowerCase(); return(text.indexOf('pm') > -1 || text.indexOf('p.m.') > -1); }, - - + + /** * remove am and pm from text and return it * @@ -47,8 +47,8 @@ var Modules = (function (modules) { removeAMPM: function( text ) { return text.replace('pm', '').replace('p.m.', '').replace('am', '').replace('a.m.', ''); }, - - + + /** * simple test of whether ISO date string is a duration i.e. PY17M or PW12 * @@ -64,15 +64,15 @@ var Modules = (function (modules) { } return false; }, - - + + /** * is text a time or timezone * i.e. HH-MM-SS or z+-HH-MM-SS 08:43 | 15:23:00:0567 | 10:34pm | 10:34 p.m. | +01:00:00 | -02:00 | z15:00 | 0843 * * @param {String} text * @return {Boolean} - */ + */ isTime: function( text ) { if(modules.utils.isString(text)){ text = text.toLowerCase(); @@ -82,7 +82,7 @@ var Modules = (function (modules) { return true; } // has ante meridiem or post meridiem - if( text.match(/^[0-9]/) && + if( text.match(/^[0-9]/) && ( this.hasAM(text) || this.hasPM(text) )) { return true; } @@ -90,7 +90,7 @@ var Modules = (function (modules) { if( text.match(':') && !text.match(/t|\s/) ) { return true; } - + // if it's a number of 2, 4 or 6 chars if(modules.utils.isNumber(text)){ if(text.length === 2 || text.length === 4 || text.length === 6){ @@ -100,7 +100,7 @@ var Modules = (function (modules) { } return false; }, - + /** * parses a time from text and returns 24hr time string @@ -108,18 +108,18 @@ var Modules = (function (modules) { * * @param {String} text * @return {String} - */ + */ parseAmPmTime: function( text ) { var out = text, times = []; - + // if the string has a text : or am or pm if(modules.utils.isString(out)) { //text = text.toLowerCase(); text = text.replace(/[ ]+/g, ''); - + if(text.match(':') || this.hasAM(text) || this.hasPM(text)) { - + if(text.match(':')) { times = text.split(':'); } else { @@ -127,31 +127,31 @@ var Modules = (function (modules) { times[0] = text; times[0] = this.removeAMPM(times[0]); } - + // change pm hours to 24hr number if(this.hasPM(text)) { if(times[0] < 12) { times[0] = parseInt(times[0], 10) + 12; } } - + // add leading zero's where needed if(times[0] && times[0].length === 1) { times[0] = '0' + times[0]; } - + // rejoin text elements together if(times[0]) { text = times.join(':'); } } } - + // remove am/pm strings return this.removeAMPM(text); }, - - + + /** * overlays a time on a date to return the union of the two * @@ -159,11 +159,11 @@ var Modules = (function (modules) { * @param {String} time * @param {String} format ( Modules.ISODate profile format ) * @return {Object} Modules.ISODate - */ + */ dateTimeUnion: function(date, time, format) { var isodate = new modules.ISODate(date, format), isotime = new modules.ISODate(); - + isotime.parseTime(this.parseAmPmTime(time), format); if(isodate.hasFullDate() && isotime.hasTime()) { isodate.tH = isotime.tH; @@ -178,8 +178,8 @@ var Modules = (function (modules) { return new modules.ISODate(); } }, - - + + /** * concatenate an array of date and time text fragments to create an ISODate object * used for microformat value and value-title rules @@ -187,65 +187,65 @@ var Modules = (function (modules) { * @param {Array} arr ( Array of Strings ) * @param {String} format ( Modules.ISODate profile format ) * @return {Object} Modules.ISODate - */ + */ concatFragments: function (arr, format) { var out = new modules.ISODate(), i = 0, value = ''; - - // if the fragment already contains a full date just return it once + + // if the fragment already contains a full date just return it once if(arr[0].toUpperCase().match('T')) { return new modules.ISODate(arr[0], format); }else{ for(i = 0; i < arr.length; i++) { value = arr[i]; - + // date pattern if( value.charAt(4) === '-' && out.hasFullDate() === false ){ out.parseDate(value); } - + // time pattern if( (value.indexOf(':') > -1 || modules.utils.isNumber( this.parseAmPmTime(value) )) && out.hasTime() === false ) { // split time and timezone var items = this.splitTimeAndZone(value); value = items[0]; - + // parse any use of am/pm value = this.parseAmPmTime(value); out.parseTime(value); - - // parse any timezone + + // parse any timezone if(items.length > 1){ out.parseTimeZone(items[1], format); } } - + // timezone pattern if(value.charAt(0) === '-' || value.charAt(0) === '+' || value.toUpperCase() === 'Z') { if( out.hasTimeZone() === false ){ out.parseTimeZone(value); } } - + } return out; - + } }, - - + + /** * parses text by splitting it into an array of time and timezone strings * * @param {String} text * @return {Array} Modules.ISODate - */ + */ splitTimeAndZone: function ( text ){ var out = [text], chars = ['-','+','z','Z'], i = chars.length; - + while (i--) { if(text.indexOf(chars[i]) > -1){ out[0] = text.slice( 0, text.indexOf(chars[i]) ); @@ -255,7 +255,7 @@ var Modules = (function (modules) { } return out; } - + }; diff --git a/toolkit/components/microformats/test/lib/html.js b/toolkit/components/microformats/test/lib/html.js index 0b1ca516d859..ab150d91e3f5 100644 --- a/toolkit/components/microformats/test/lib/html.js +++ b/toolkit/components/microformats/test/lib/html.js @@ -1,9 +1,9 @@ /* - html - Extracts a HTML string from DOM nodes. Was created to get around the issue of not being able to exclude the content - of nodes with the 'data-include' attribute. DO NOT replace with functions such as innerHTML as it will break a + html + Extracts a HTML string from DOM nodes. Was created to get around the issue of not being able to exclude the content + of nodes with the 'data-include' attribute. DO NOT replace with functions such as innerHTML as it will break a number of microformat include patterns. - + Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. MIT License: https://raw.github.com/glennjones/microformat-node/master/license.txt Dependencies utilities.js, domutils.js @@ -11,23 +11,23 @@ var Modules = (function (modules) { - + modules.html = { - + // elements which are self-closing selfClosingElt: ['area', 'base', 'br', 'col', 'hr', 'img', 'input', 'link', 'meta', 'param', 'command', 'keygen', 'source'], - + /** * parse the html string from DOM Node * * @param {DOM Node} node * @return {String} - */ + */ parse: function( node ){ var out = '', j = 0; - + // we do not want the outer container if(node.childNodes && node.childNodes.length > 0){ for (j = 0; j < node.childNodes.length; j++) { @@ -37,47 +37,47 @@ var Modules = (function (modules) { } } } - + return out; }, - - + + /** * walks the DOM tree parsing the html string from the nodes * * @param {DOM Document} doc * @param {DOM Node} node * @return {String} - */ + */ walkTreeForHtml: function( node ) { var out = '', j = 0; - + // if node is a text node get its text if(node.nodeType && node.nodeType === 3){ - out += modules.domUtils.getElementText( node ); + out += modules.domUtils.getElementText( node ); } - - - // exclude text which has been added with include pattern - + + + // exclude text which has been added with include pattern - if(node.nodeType && node.nodeType === 1 && modules.domUtils.hasAttribute(node, 'data-include') === false){ - + // begin tag - out += '<' + node.tagName.toLowerCase(); - + out += '<' + node.tagName.toLowerCase(); + // add attributes var attrs = modules.domUtils.getOrderedAttributes(node); for (j = 0; j < attrs.length; j++) { out += ' ' + attrs[j].name + '=' + '"' + attrs[j].value + '"'; } - + if(this.selfClosingElt.indexOf(node.tagName.toLowerCase()) === -1){ out += '>'; } - + // get the text of the child nodes if(node.childNodes && node.childNodes.length > 0){ - + for (j = 0; j < node.childNodes.length; j++) { var text = this.walkTreeForHtml( node.childNodes[j] ); if(text !== undefined){ @@ -85,21 +85,21 @@ var Modules = (function (modules) { } } } - + // end tag if(this.selfClosingElt.indexOf(node.tagName.toLowerCase()) > -1){ - out += ' />'; + out += ' />'; }else{ - out += ''; + out += ''; } - } - + } + return (out === '')? undefined : out; - } - - + } + + }; - + return modules; diff --git a/toolkit/components/microformats/test/lib/isodate.js b/toolkit/components/microformats/test/lib/isodate.js index dfb2ba84288c..30f35f35d478 100644 --- a/toolkit/components/microformats/test/lib/isodate.js +++ b/toolkit/components/microformats/test/lib/isodate.js @@ -1,20 +1,20 @@ /*! iso date This module was built for the exact needs of parsing ISO dates to the microformats standard. - - * Parses and builds ISO dates to the W3C note, HTML5 or RFC3339 profiles. - * Also allows for profile detection using 'auto' + + * Parses and builds ISO dates to the W3C note, HTML5 or RFC3339 profiles. + * Also allows for profile detection using 'auto' * Outputs to the same level of specificity of date and time that was input - + Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt */ - - - + + + var Modules = (function (modules) { - - + + /** * constructor * parses text to find just the date element of an ISO date/time string i.e. 2008-05-01 @@ -22,75 +22,75 @@ var Modules = (function (modules) { * @param {String} dateString * @param {String} format * @return {String} - */ + */ modules.ISODate = function ( dateString, format ) { this.clear(); - + this.format = (format)? format : 'auto'; // auto or W3C or RFC3339 or HTML5 this.setFormatSep(); - - // optional should be full iso date/time string + + // optional should be full iso date/time string if(arguments[0]) { this.parse(dateString, format); } }; - + modules.ISODate.prototype = { - - + + /** * clear all states * - */ + */ clear: function(){ this.clearDate(); this.clearTime(); this.clearTimeZone(); this.setAutoProfileState(); }, - - + + /** * clear date states * - */ + */ clearDate: function(){ this.dY = -1; this.dM = -1; this.dD = -1; this.dDDD = -1; }, - - + + /** * clear time states * - */ + */ clearTime: function(){ this.tH = -1; this.tM = -1; this.tS = -1; this.tD = -1; }, - - + + /** * clear timezone states * - */ + */ clearTimeZone: function(){ this.tzH = -1; this.tzM = -1; this.tzPN = '+'; this.z = false; }, - - + + /** * resets the auto profile state * - */ + */ setAutoProfileState: function(){ this.autoProfile = { sep: 'T', @@ -100,31 +100,31 @@ var Modules = (function (modules) { tzZulu: 'Z' }; }, - - + + /** * parses text to find ISO date/time string i.e. 2008-05-01T15:45:19Z * * @param {String} dateString * @param {String} format * @return {String} - */ + */ parse: function( dateString, format ) { this.clear(); - + var parts = [], tzArray = [], position = 0, datePart = '', timePart = '', timeZonePart = ''; - + if(format){ this.format = format; } - - - + + + // discover date time separtor for auto profile // Set to 'T' by default if(dateString.indexOf('t') > -1) { @@ -138,47 +138,47 @@ var Modules = (function (modules) { } if(dateString.toUpperCase().indexOf('T') === -1) { this.autoProfile.sep = ' '; - } - - + } + + dateString = dateString.toUpperCase().replace(' ','T'); - + // break on 'T' divider or space if(dateString.indexOf('T') > -1) { parts = dateString.split('T'); datePart = parts[0]; timePart = parts[1]; - - // zulu UTC + + // zulu UTC if(timePart.indexOf( 'Z' ) > -1) { this.z = true; } - + // timezone if(timePart.indexOf( '+' ) > -1 || timePart.indexOf( '-' ) > -1) { tzArray = timePart.split( 'Z' ); // incase of incorrect use of Z timePart = tzArray[0]; timeZonePart = tzArray[1]; - + // timezone if(timePart.indexOf( '+' ) > -1 || timePart.indexOf( '-' ) > -1) { position = 0; - + if(timePart.indexOf( '+' ) > -1) { position = timePart.indexOf( '+' ); } else { position = timePart.indexOf( '-' ); } - + timeZonePart = timePart.substring( position, timePart.length ); timePart = timePart.substring( 0, position ); } } - + } else { datePart = dateString; } - + if(datePart !== '') { this.parseDate( datePart ); if(timePart !== '') { @@ -190,25 +190,25 @@ var Modules = (function (modules) { } return this.toString( format ); }, - - + + /** * parses text to find just the date element of an ISO date/time string i.e. 2008-05-01 * * @param {String} dateString * @param {String} format * @return {String} - */ + */ parseDate: function( dateString, format ) { this.clearDate(); - + var parts = []; - + // discover timezone separtor for auto profile // default is ':' if(dateString.indexOf('-') === -1) { this.autoProfile.tsep = ''; - } - + } + // YYYY-DDD parts = dateString.match( /(\d\d\d\d)-(\d\d\d)/ ); if(parts) { @@ -219,7 +219,7 @@ var Modules = (function (modules) { this.dDDD = parts[2]; } } - + if(this.dDDD === -1) { // YYYY-MM-DD ie 2008-05-01 and YYYYMMDD ie 20080501 parts = dateString.match( /(\d\d\d\d)?-?(\d\d)?-?(\d\d)?/ ); @@ -235,24 +235,24 @@ var Modules = (function (modules) { } return this.toString(format); }, - - + + /** * parses text to find just the time element of an ISO date/time string i.e. 13:30:45 * * @param {String} timeString * @param {String} format * @return {String} - */ + */ parseTime: function( timeString, format ) { this.clearTime(); var parts = []; - + // discover date separtor for auto profile // default is ':' if(timeString.indexOf(':') === -1) { this.autoProfile.tsep = ''; - } - + } + // finds timezone HH:MM:SS and HHMMSS ie 13:30:45, 133045 and 13:30:45.0135 parts = timeString.match( /(\d\d)?:?(\d\d)?:?(\d\d)?.?([0-9]+)?/ ); if(parts[1]) { @@ -269,30 +269,30 @@ var Modules = (function (modules) { } return this.toTimeString(format); }, - - + + /** * parses text to find just the time element of an ISO date/time string i.e. +08:00 * * @param {String} timeString * @param {String} format * @return {String} - */ + */ parseTimeZone: function( timeString, format ) { this.clearTimeZone(); var parts = []; - + if(timeString.toLowerCase() === 'z'){ this.z = true; // set case for z this.autoProfile.tzZulu = (timeString === 'z')? 'z' : 'Z'; }else{ - + // discover timezone separtor for auto profile // default is ':' if(timeString.indexOf(':') === -1) { this.autoProfile.tzsep = ''; - } - + } + // finds timezone +HH:MM and +HHMM ie +13:30 and +1330 parts = timeString.match( /([\-\+]{1})?(\d\d)?:?(\d\d)?/ ); if(parts[1]) { @@ -303,29 +303,29 @@ var Modules = (function (modules) { } if(parts[3]) { this.tzM = parts[3]; - } - - + } + + } - this.tzZulu = 'z'; + this.tzZulu = 'z'; return this.toTimeString( format ); }, - - + + /** * returns ISO date/time string in W3C Note, RFC 3339, HTML5, or auto profile * * @param {String} format * @return {String} - */ + */ toString: function( format ) { var output = ''; - + if(format){ this.format = format; } this.setFormatSep(); - + if(this.dY > -1) { output = this.dY; if(this.dM > 0 && this.dM < 13) { @@ -343,26 +343,26 @@ var Modules = (function (modules) { } else if(this.tH > -1) { output += this.toTimeString( format ); } - + return output; }, - - + + /** * returns just the time string element of an ISO date/time * in W3C Note, RFC 3339, HTML5, or auto profile * * @param {String} format * @return {String} - */ + */ toTimeString: function( format ) { var out = ''; - + if(format){ this.format = format; } this.setFormatSep(); - + // time can only be created with a full date if(this.tH) { if(this.tH > -1 && this.tH < 25) { @@ -376,10 +376,10 @@ var Modules = (function (modules) { } } } - - - - // time zone offset + + + + // time zone offset if(this.z) { out += this.tzZulu; } else { @@ -394,12 +394,12 @@ var Modules = (function (modules) { } return out; }, - - + + /** * set the current profile to W3C Note, RFC 3339, HTML5, or auto profile * - */ + */ setFormatSep: function() { switch( this.format.toLowerCase() ) { case 'rfc3339': @@ -432,48 +432,48 @@ var Modules = (function (modules) { this.tzZulu = this.autoProfile.tzZulu; } }, - - + + /** * does current data contain a full date i.e. 2015-03-23 * * @return {Boolean} - */ + */ hasFullDate: function() { return(this.dY !== -1 && this.dM !== -1 && this.dD !== -1); }, - - + + /** * does current data contain a minimum date which is just a year number i.e. 2015 * * @return {Boolean} - */ + */ hasDate: function() { return(this.dY !== -1); }, - - + + /** * does current data contain a minimum time which is just a hour number i.e. 13 * * @return {Boolean} - */ + */ hasTime: function() { return(this.tH !== -1); }, - + /** * does current data contain a minimum timezone i.e. -1 || +1 || z * * @return {Boolean} - */ + */ hasTimeZone: function() { return(this.tzH !== -1); } - + }; - + modules.ISODate.prototype.constructor = modules.ISODate; return modules; diff --git a/toolkit/components/microformats/test/lib/maps/h-adr.js b/toolkit/components/microformats/test/lib/maps/h-adr.js index 942f625b04ea..aa3a695c53f3 100644 --- a/toolkit/components/microformats/test/lib/maps/h-adr.js +++ b/toolkit/components/microformats/test/lib/maps/h-adr.js @@ -1,10 +1,10 @@ /* Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. - MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt + MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt */ var Modules = (function (modules) { - + modules.maps = (modules.maps)? modules.maps : {}; modules.maps['h-adr'] = { diff --git a/toolkit/components/microformats/test/lib/maps/h-card.js b/toolkit/components/microformats/test/lib/maps/h-card.js index 89d47d0f9d15..124750a376c4 100644 --- a/toolkit/components/microformats/test/lib/maps/h-card.js +++ b/toolkit/components/microformats/test/lib/maps/h-card.js @@ -1,9 +1,9 @@ /* Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. - MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt + MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt */ var Modules = (function (modules) { - + modules.maps = (modules.maps)? modules.maps : {}; modules.maps['h-card'] = { @@ -32,7 +32,7 @@ var Modules = (function (modules) { 'map': 'u-email' }, 'geo': { - 'map': 'p-geo', + 'map': 'p-geo', 'uf': ['h-geo'] }, 'key': { @@ -82,4 +82,4 @@ var Modules = (function (modules) { return modules; } (Modules || {})); - + diff --git a/toolkit/components/microformats/test/lib/maps/h-entry.js b/toolkit/components/microformats/test/lib/maps/h-entry.js index feb45c351ae2..b82c4c2d9c16 100644 --- a/toolkit/components/microformats/test/lib/maps/h-entry.js +++ b/toolkit/components/microformats/test/lib/maps/h-entry.js @@ -1,10 +1,10 @@ /* Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. - MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt + MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt */ var Modules = (function (modules) { - + modules.maps = (modules.maps)? modules.maps : {}; modules.maps['h-entry'] = { @@ -26,7 +26,7 @@ var Modules = (function (modules) { 'updated': { 'map': 'dt-updated' }, - 'author': { + 'author': { 'uf': ['h-card'] }, 'category': { @@ -34,7 +34,7 @@ var Modules = (function (modules) { 'relAlt': ['tag'] }, 'geo': { - 'map': 'p-geo', + 'map': 'p-geo', 'uf': ['h-geo'] }, 'latitude': {}, @@ -47,6 +47,6 @@ var Modules = (function (modules) { }; return modules; - + } (Modules || {})); diff --git a/toolkit/components/microformats/test/lib/maps/h-event.js b/toolkit/components/microformats/test/lib/maps/h-event.js index 8956dcf8cddc..6599d4549583 100644 --- a/toolkit/components/microformats/test/lib/maps/h-event.js +++ b/toolkit/components/microformats/test/lib/maps/h-event.js @@ -1,13 +1,13 @@ /* Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. - MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt + MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt */ var Modules = (function (modules) { - + modules.maps = (modules.maps)? modules.maps : {}; - modules.maps['h-event'] = { + modules.maps['h-event'] = { root: 'vevent', name: 'h-event', properties: { @@ -53,7 +53,7 @@ var Modules = (function (modules) { 'map': 'u-attach' }, 'status': {}, - 'rdate': {}, + 'rdate': {}, 'rrule': {} } }; diff --git a/toolkit/components/microformats/test/lib/maps/h-feed.js b/toolkit/components/microformats/test/lib/maps/h-feed.js index cc3e5697ad4e..f680228567d1 100644 --- a/toolkit/components/microformats/test/lib/maps/h-feed.js +++ b/toolkit/components/microformats/test/lib/maps/h-feed.js @@ -1,10 +1,10 @@ /* Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. - MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt + MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt */ var Modules = (function (modules) { - + modules.maps = (modules.maps)? modules.maps : {}; modules.maps['h-feed'] = { @@ -18,7 +18,7 @@ var Modules = (function (modules) { 'summary': { 'map': 'p-summary' }, - 'author': { + 'author': { 'uf': ['h-card'] }, 'url': { diff --git a/toolkit/components/microformats/test/lib/maps/h-geo.js b/toolkit/components/microformats/test/lib/maps/h-geo.js index 261eadc72f41..fabb86f07404 100644 --- a/toolkit/components/microformats/test/lib/maps/h-geo.js +++ b/toolkit/components/microformats/test/lib/maps/h-geo.js @@ -1,10 +1,10 @@ /* Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. - MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt + MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt */ var Modules = (function (modules) { - + modules.maps = (modules.maps)? modules.maps : {}; modules.maps['h-geo'] = { diff --git a/toolkit/components/microformats/test/lib/maps/h-item.js b/toolkit/components/microformats/test/lib/maps/h-item.js index 56182751ba55..471a8454e39b 100644 --- a/toolkit/components/microformats/test/lib/maps/h-item.js +++ b/toolkit/components/microformats/test/lib/maps/h-item.js @@ -1,10 +1,10 @@ /* Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. - MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt + MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt */ var Modules = (function (modules) { - + modules.maps = (modules.maps)? modules.maps : {}; modules.maps['h-item'] = { @@ -27,4 +27,4 @@ var Modules = (function (modules) { return modules; } (Modules || {})); - + diff --git a/toolkit/components/microformats/test/lib/maps/h-listing.js b/toolkit/components/microformats/test/lib/maps/h-listing.js index 674ac9c046e1..94783d9ee464 100644 --- a/toolkit/components/microformats/test/lib/maps/h-listing.js +++ b/toolkit/components/microformats/test/lib/maps/h-listing.js @@ -1,10 +1,10 @@ /* Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. - MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt + MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt */ var Modules = (function (modules) { - + modules.maps = (modules.maps)? modules.maps : {}; modules.maps['h-listing'] = { diff --git a/toolkit/components/microformats/test/lib/maps/h-news.js b/toolkit/components/microformats/test/lib/maps/h-news.js index 1a48148aa939..362a5a570964 100644 --- a/toolkit/components/microformats/test/lib/maps/h-news.js +++ b/toolkit/components/microformats/test/lib/maps/h-news.js @@ -1,10 +1,10 @@ /* Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. - MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt + MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt */ var Modules = (function (modules) { - + modules.maps = (modules.maps)? modules.maps : {}; modules.maps['h-news'] = { @@ -29,7 +29,7 @@ var Modules = (function (modules) { 'map': 'u-item-license' }, 'principles': { - 'map': 'u-principles', + 'map': 'u-principles', 'relAlt': ['principles'] } } diff --git a/toolkit/components/microformats/test/lib/maps/h-org.js b/toolkit/components/microformats/test/lib/maps/h-org.js index 8ac64f711acc..d1b4e82450ca 100644 --- a/toolkit/components/microformats/test/lib/maps/h-org.js +++ b/toolkit/components/microformats/test/lib/maps/h-org.js @@ -1,10 +1,10 @@ /* Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. - MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt + MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt */ var Modules = (function (modules) { - + modules.maps = (modules.maps)? modules.maps : {}; modules.maps['h-org'] = { diff --git a/toolkit/components/microformats/test/lib/maps/h-product.js b/toolkit/components/microformats/test/lib/maps/h-product.js index b3001f83b750..18f8eb51a788 100644 --- a/toolkit/components/microformats/test/lib/maps/h-product.js +++ b/toolkit/components/microformats/test/lib/maps/h-product.js @@ -1,10 +1,10 @@ /* Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. - MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt + MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt */ var Modules = (function (modules) { - + modules.maps = (modules.maps)? modules.maps : {}; modules.maps['h-product'] = { diff --git a/toolkit/components/microformats/test/lib/maps/h-recipe.js b/toolkit/components/microformats/test/lib/maps/h-recipe.js index 9f30db1d89b9..e3901ea3e081 100644 --- a/toolkit/components/microformats/test/lib/maps/h-recipe.js +++ b/toolkit/components/microformats/test/lib/maps/h-recipe.js @@ -1,10 +1,10 @@ /* Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. - MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt + MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt */ var Modules = (function (modules) { - + modules.maps = (modules.maps)? modules.maps : {}; modules.maps['h-recipe'] = { diff --git a/toolkit/components/microformats/test/lib/maps/h-resume.js b/toolkit/components/microformats/test/lib/maps/h-resume.js index d096dee21bc5..d6a46cc88059 100644 --- a/toolkit/components/microformats/test/lib/maps/h-resume.js +++ b/toolkit/components/microformats/test/lib/maps/h-resume.js @@ -1,10 +1,10 @@ /* Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. - MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt + MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt */ var Modules = (function (modules) { - + modules.maps = (modules.maps)? modules.maps : {}; modules.maps['h-resume'] = { diff --git a/toolkit/components/microformats/test/lib/maps/h-review-aggregate.js b/toolkit/components/microformats/test/lib/maps/h-review-aggregate.js index e7ef091a60ce..4b6027cbf7cf 100644 --- a/toolkit/components/microformats/test/lib/maps/h-review-aggregate.js +++ b/toolkit/components/microformats/test/lib/maps/h-review-aggregate.js @@ -1,10 +1,10 @@ /* Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. - MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt + MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt */ var Modules = (function (modules) { - + modules.maps = (modules.maps)? modules.maps : {}; modules.maps['h-review-aggregate'] = { @@ -21,7 +21,7 @@ var Modules = (function (modules) { 'rating': {}, 'average': {}, 'best': {}, - 'worst': {}, + 'worst': {}, 'count': {}, 'votes': {}, 'category': { diff --git a/toolkit/components/microformats/test/lib/maps/h-review.js b/toolkit/components/microformats/test/lib/maps/h-review.js index 92f1cbc47a2c..83f4c24bc397 100644 --- a/toolkit/components/microformats/test/lib/maps/h-review.js +++ b/toolkit/components/microformats/test/lib/maps/h-review.js @@ -1,10 +1,10 @@ /* Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. - MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt + MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt */ var Modules = (function (modules) { - + modules.maps = (modules.maps)? modules.maps : {}; modules.maps['h-review'] = { diff --git a/toolkit/components/microformats/test/lib/maps/rel.js b/toolkit/components/microformats/test/lib/maps/rel.js index 427e740dbdcf..8accf8009043 100644 --- a/toolkit/components/microformats/test/lib/maps/rel.js +++ b/toolkit/components/microformats/test/lib/maps/rel.js @@ -1,32 +1,32 @@ /* Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. - MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt + MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt */ var Modules = (function (modules) { - + modules.rels = { // xfn - 'friend': [ 'yes','external'], - 'acquaintance': [ 'yes','external'], - 'contact': [ 'yes','external'], - 'met': [ 'yes','external'], - 'co-worker': [ 'yes','external'], - 'colleague': [ 'yes','external'], - 'co-resident': [ 'yes','external'], - 'neighbor': [ 'yes','external'], - 'child': [ 'yes','external'], - 'parent': [ 'yes','external'], - 'sibling': [ 'yes','external'], - 'spouse': [ 'yes','external'], - 'kin': [ 'yes','external'], - 'muse': [ 'yes','external'], - 'crush': [ 'yes','external'], - 'date': [ 'yes','external'], - 'sweetheart': [ 'yes','external'], - 'me': [ 'yes','external'], - - // other rel=* + 'friend': [ 'yes','external'], + 'acquaintance': [ 'yes','external'], + 'contact': [ 'yes','external'], + 'met': [ 'yes','external'], + 'co-worker': [ 'yes','external'], + 'colleague': [ 'yes','external'], + 'co-resident': [ 'yes','external'], + 'neighbor': [ 'yes','external'], + 'child': [ 'yes','external'], + 'parent': [ 'yes','external'], + 'sibling': [ 'yes','external'], + 'spouse': [ 'yes','external'], + 'kin': [ 'yes','external'], + 'muse': [ 'yes','external'], + 'crush': [ 'yes','external'], + 'date': [ 'yes','external'], + 'sweetheart': [ 'yes','external'], + 'me': [ 'yes','external'], + + // other rel=* 'license': [ 'yes','yes'], 'nofollow': [ 'no','external'], 'tag': [ 'no','yes'], @@ -39,9 +39,9 @@ var Modules = (function (modules) { 'pronunciation': [ 'no','external'], 'payment': [ 'no','external'], 'principles': [ 'no','external'] - + }; - + return modules; } (Modules || {})); diff --git a/toolkit/components/microformats/test/lib/parser-implied.js b/toolkit/components/microformats/test/lib/parser-implied.js index cf6e2db62021..7f67a2ca1ca0 100644 --- a/toolkit/components/microformats/test/lib/parser-implied.js +++ b/toolkit/components/microformats/test/lib/parser-implied.js @@ -1,19 +1,19 @@ /*! Parser implied All the functions that deal with microformats implied rules - + Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt Dependencies dates.js, domutils.js, html.js, isodate,js, text.js, utilities.js, url.js */ var Modules = (function (modules) { - + // check parser module is loaded if(modules.Parser){ - + /** - * applies "implied rules" microformat output structure i.e. feed-title, name, photo, url and date + * applies "implied rules" microformat output structure i.e. feed-title, name, photo, url and date * * @param {DOM Node} node * @param {Object} uf (microformat output structure) @@ -23,40 +23,40 @@ var Modules = (function (modules) { */ modules.Parser.prototype.impliedRules = function(node, uf, parentClasses) { var typeVersion = (uf.typeVersion)? uf.typeVersion: 'v2'; - + // TEMP: override to allow v1 implied properties while spec changes if(this.options.impliedPropertiesByVersion === false){ typeVersion = 'v2'; } - + if(node && uf && uf.properties) { - uf = this.impliedBackwardComp( node, uf, parentClasses ); + uf = this.impliedBackwardComp( node, uf, parentClasses ); if(typeVersion === 'v2'){ uf = this.impliedhFeedTitle( uf ); - uf = this.impliedName( node, uf ); - uf = this.impliedPhoto( node, uf ); + uf = this.impliedName( node, uf ); + uf = this.impliedPhoto( node, uf ); uf = this.impliedUrl( node, uf ); } uf = this.impliedValue( node, uf, parentClasses ); uf = this.impliedDate( uf ); - + // TEMP: flagged while spec changes are put forward if(this.options.parseLatLonGeo === true){ uf = this.impliedGeo( uf ); - } + } } return uf; }; - - + + /** * apply implied name rule * * @param {DOM Node} node * @param {Object} uf * @return {Object} - */ + */ modules.Parser.prototype.impliedName = function(node, uf) { // implied name rule /* @@ -74,7 +74,7 @@ var Modules = (function (modules) { */ var name, value; - + if(!uf.properties.name) { value = this.getImpliedProperty(node, ['img', 'area', 'abbr'], this.getNameAttr); var textFormat = this.options.textFormat; @@ -88,27 +88,27 @@ var Modules = (function (modules) { uf.properties.name = name; } } - + return uf; }; - - + + /** * apply implied photo rule * * @param {DOM Node} node * @param {Object} uf * @return {Object} - */ + */ modules.Parser.prototype.impliedPhoto = function(node, uf) { // implied photo rule /* img.h-x[src] Jane Doe object.h-x[data] Jane Doe - .h-x>img[src]:only-of-type:not[.h-*]
Jane Doe
- .h-x>object[data]:only-of-type:not[.h-*]
Jane Doe
- .h-x>:only-child>img[src]:only-of-type:not[.h-*]
Jane Doe
- .h-x>:only-child>object[data]:only-of-type:not[.h-*]
Jane Doe
+ .h-x>img[src]:only-of-type:not[.h-*]
Jane Doe
+ .h-x>object[data]:only-of-type:not[.h-*]
Jane Doe
+ .h-x>:only-child>img[src]:only-of-type:not[.h-*]
Jane Doe
+ .h-x>:only-child>object[data]:only-of-type:not[.h-*]
Jane Doe
*/ var value; if(!uf.properties.photo) { @@ -120,24 +120,24 @@ var Modules = (function (modules) { } uf.properties.photo = [modules.utils.trim(value)]; } - } + } return uf; }; - - + + /** * apply implied URL rule * * @param {DOM Node} node * @param {Object} uf * @return {Object} - */ + */ modules.Parser.prototype.impliedUrl = function(node, uf) { // implied URL rule /* a.h-x[href] Glenn area.h-x[href] Glenn - .h-x>a[href]:only-of-type:not[.h-*] + .h-x>a[href]:only-of-type:not[.h-*] .h-x>area[href]:only-of-type:not[.h-*]
Glenn

...

*/ var value; @@ -150,18 +150,18 @@ var Modules = (function (modules) { } uf.properties.url = [modules.utils.trim(value)]; } - } + } return uf; }; - - + + /** * apply implied date rule - if there is a time only property try to concat it with any date property * * @param {DOM Node} node * @param {Object} uf * @return {Object} - */ + */ modules.Parser.prototype.impliedDate = function(uf) { // implied date rule // http://microformats.org/wiki/value-class-pattern#microformats2_parsers @@ -176,8 +176,8 @@ var Modules = (function (modules) { delete uf.dates; return uf; }; - - + + /** * get an implied property value from pre-defined tag/attriubte combinations * @@ -188,10 +188,10 @@ var Modules = (function (modules) { */ modules.Parser.prototype.getImpliedProperty = function(node, tagList, getAttrFunction) { // i.e. img.h-card - var value = getAttrFunction(node), + var value = getAttrFunction(node), descendant, child; - + if(!value) { // i.e. .h-card>img:only-of-type:not(.h-card) descendant = modules.domUtils.getSingleDescendantOfType( node, tagList); @@ -209,17 +209,17 @@ var Modules = (function (modules) { } } } - + return value; }; - - + + /** * get an implied name value from a node * * @param {DOM Node} node * @return {String || null} - */ + */ modules.Parser.prototype.getNameAttr = function(node) { var value = modules.domUtils.getAttrValFromTagList(node, ['img','area'], 'alt'); if(!value) { @@ -227,14 +227,14 @@ var Modules = (function (modules) { } return value; }; - - + + /** * get an implied photo value from a node * * @param {DOM Node} node * @return {String || null} - */ + */ modules.Parser.prototype.getPhotoAttr = function(node) { var value = modules.domUtils.getAttrValFromTagList(node, ['img'], 'src'); if(!value && modules.domUtils.hasAttributeValue(node, 'class', 'include') === false) { @@ -242,62 +242,62 @@ var Modules = (function (modules) { } return value; }; - - + + /** * get an implied photo value from a node * * @param {DOM Node} node * @return {String || null} - */ + */ modules.Parser.prototype.getURLAttr = function(node) { var value = null; if(modules.domUtils.hasAttributeValue(node, 'class', 'include') === false){ - + value = modules.domUtils.getAttrValFromTagList(node, ['a'], 'href'); if(!value) { value = modules.domUtils.getAttrValFromTagList(node, ['area'], 'href'); } - + } return value; }; - - + + /** - * + * * * @param {DOM Node} node * @param {Object} uf * @return {Object} - */ + */ modules.Parser.prototype.impliedValue = function(node, uf, parentClasses){ - + // intersection of implied name and implied value rules - if(uf.properties.name) { + if(uf.properties.name) { if(uf.value && parentClasses.root.length > 0 && parentClasses.properties.length === 1){ uf = this.getAltValue(uf, parentClasses.properties[0][0], 'p-name', uf.properties.name[0]); } } - + // intersection of implied URL and implied value rules if(uf.properties.url) { if(parentClasses && parentClasses.root.length === 1 && parentClasses.properties.length === 1){ uf = this.getAltValue(uf, parentClasses.properties[0][0], 'u-url', uf.properties.url[0]); } - } - + } + // apply alt value if(uf.altValue !== null){ uf.value = uf.altValue.value; } delete uf.altValue; - - + + return uf; }; - - + + /** * get alt value based on rules about parent property prefix * @@ -306,7 +306,7 @@ var Modules = (function (modules) { * @param {String} propertyName * @param {String} value * @return {Object} - */ + */ modules.Parser.prototype.getAltValue = function(uf, parentPropertyName, propertyName, value){ if(uf.value && !uf.altValue){ // first p-name of the h-* child @@ -324,14 +324,14 @@ var Modules = (function (modules) { } return uf; }; - - + + /** * if a h-feed does not have a title use the title tag of a page * * @param {Object} uf * @return {Object} - */ + */ modules.Parser.prototype.impliedhFeedTitle = function( uf ){ if(uf.type && uf.type.indexOf('h-feed') > -1){ // has no name property @@ -345,80 +345,80 @@ var Modules = (function (modules) { } return uf; }; - - - + + + /** * implied Geo from pattern * * @param {Object} uf * @return {Object} - */ + */ modules.Parser.prototype.impliedGeo = function( uf ){ var geoPair, parts, longitude, latitude, valid = true; - + if(uf.type && uf.type.indexOf('h-geo') > -1){ - + // has no latitude or longitude property if(uf.properties.latitude === undefined || uf.properties.longitude === undefined ){ geoPair = (uf.properties.name)? uf.properties.name[0] : null; geoPair = (!geoPair && uf.properties.value)? uf.properties.value : geoPair; - + if(geoPair){ // allow for the use of a ';' as in microformats and also ',' as in Geo URL geoPair = geoPair.replace(';',','); - + // has sep char if(geoPair.indexOf(',') > -1 ){ parts = geoPair.split(','); - + // only correct if we have two or more parts if(parts.length > 1){ - // latitude no value outside the range -90 or 90 + // latitude no value outside the range -90 or 90 latitude = parseFloat( parts[0] ); if(modules.utils.isNumber(latitude) && latitude > 90 || latitude < -90){ valid = false; } - + // longitude no value outside the range -180 to 180 longitude = parseFloat( parts[1] ); if(modules.utils.isNumber(longitude) && longitude > 180 || longitude < -180){ valid = false; } - + if(valid){ uf.properties.latitude = [latitude]; uf.properties.longitude = [longitude]; } } - + } } } } return uf; }; - - + + /** * if a backwards compat built structure has no properties add name through this.impliedName * * @param {Object} uf * @return {Object} - */ + */ modules.Parser.prototype.impliedBackwardComp = function(node, uf, parentClasses){ - + // look for pattern in parent classes like "p-geo h-geo" // these are structures built from backwards compat parsing of geo if(parentClasses.root.length === 1 && parentClasses.properties.length === 1) { if(parentClasses.root[0].replace('h-','') === this.removePropPrefix(parentClasses.properties[0][0])) { - + // if microformat has no properties apply the impliedName rule to get value from containing node // this will get value from html such as Brighton if( modules.utils.hasProperties(uf.properties) === false ){ @@ -426,12 +426,12 @@ var Modules = (function (modules) { } } } - + return uf; }; - - - + + + } return modules; diff --git a/toolkit/components/microformats/test/lib/parser-includes.js b/toolkit/components/microformats/test/lib/parser-includes.js index 957a5cb99e77..f0967710d09c 100644 --- a/toolkit/components/microformats/test/lib/parser-includes.js +++ b/toolkit/components/microformats/test/lib/parser-includes.js @@ -1,7 +1,7 @@ /*! Parser includes All the functions that deal with microformats v1 include rules - + Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt Dependencies dates.js, domutils.js, html.js, isodate,js, text.js, utilities.js @@ -9,23 +9,23 @@ var Modules = (function (modules) { - + // check parser module is loaded if(modules.Parser){ - - + + /** * appends clones of include Nodes into the DOM structure * * @param {DOM node} rootNode - */ + */ modules.Parser.prototype.addIncludes = function(rootNode) { this.addAttributeIncludes(rootNode, 'itemref'); this.addAttributeIncludes(rootNode, 'headers'); this.addClassIncludes(rootNode); }; - - + + /** * appends clones of include Nodes into the DOM structure for attribute based includes * @@ -39,7 +39,7 @@ var Modules = (function (modules) { x, z, y; - + arr = modules.domUtils.getNodesByAttribute(rootNode, attributeName); x = 0; i = arr.length; @@ -56,8 +56,8 @@ var Modules = (function (modules) { x++; } }; - - + + /** * appends clones of include Nodes into the DOM structure for class based includes * @@ -68,7 +68,7 @@ var Modules = (function (modules) { arr, x = 0, i; - + arr = modules.domUtils.getNodesByAttributeValue(rootNode, 'class', 'include'); i = arr.length; while(x < i) { @@ -80,8 +80,8 @@ var Modules = (function (modules) { x++; } }; - - + + /** * appends a clone of an include into another Node using Id * @@ -91,7 +91,7 @@ var Modules = (function (modules) { modules.Parser.prototype.apppendInclude = function(node, id){ var include, clone; - + id = modules.utils.trim(id.replace('#', '')); include = modules.domUtils.getElementById(this.document, id); if(include) { @@ -100,18 +100,18 @@ var Modules = (function (modules) { modules.domUtils.appendChild(node, clone); } }; - - + + /** - * adds an attribute marker to all the child microformat roots + * adds an attribute marker to all the child microformat roots * * @param {DOM node} rootNode - */ + */ modules.Parser.prototype.markIncludeChildren = function(rootNode) { var arr, x, i; - + // loop the array and add the attribute arr = this.findRootNodes(rootNode); x = 0; @@ -123,17 +123,17 @@ var Modules = (function (modules) { x++; } }; - - + + /** - * removes all appended include clones from DOM + * removes all appended include clones from DOM * * @param {DOM node} rootNode - */ + */ modules.Parser.prototype.removeIncludes = function(rootNode){ var arr, i; - + // remove all the items that were added as includes arr = modules.domUtils.getNodesByAttribute(rootNode, 'data-include'); i = arr.length; @@ -141,8 +141,8 @@ var Modules = (function (modules) { modules.domUtils.removeChild(rootNode,arr[i]); } }; - - + + } return modules; diff --git a/toolkit/components/microformats/test/lib/parser-rels.js b/toolkit/components/microformats/test/lib/parser-rels.js index 7670c1b94c1c..63ef674469ab 100644 --- a/toolkit/components/microformats/test/lib/parser-rels.js +++ b/toolkit/components/microformats/test/lib/parser-rels.js @@ -1,7 +1,7 @@ /*! Parser rels All the functions that deal with microformats v2 rel structures - + Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt Dependencies dates.js, domutils.js, html.js, isodate,js, text.js, utilities.js, url.js @@ -9,10 +9,10 @@ var Modules = (function (modules) { - + // check parser module is loaded if(modules.Parser){ - + /** * finds rel=* structures * @@ -34,36 +34,36 @@ var Modules = (function (modules) { item, value, arr; - + arr = modules.domUtils.getNodesByAttribute(rootNode, 'rel'); x = 0; i = arr.length; while(x < i) { relList = modules.domUtils.getAttribute(arr[x], 'rel'); - + if(relList) { items = relList.split(' '); - - + + // add rels z = 0; y = items.length; while(z < y) { item = modules.utils.trim(items[z]); - + // get rel value value = modules.domUtils.getAttrValFromTagList(arr[x], ['a', 'area'], 'href'); if(!value) { value = modules.domUtils.getAttrValFromTagList(arr[x], ['link'], 'href'); } - + // create the key if(!out.rels[item]) { out.rels[item] = []; } - + if(typeof this.options.baseUrl === 'string' && typeof value === 'string') { - + var resolved = modules.url.resolve(value, this.options.baseUrl); // do not add duplicate rels - based on resolved URLs if(out.rels[item].indexOf(resolved) === -1){ @@ -72,8 +72,8 @@ var Modules = (function (modules) { } z++; } - - + + var url = null; if(modules.domUtils.hasAttribute(arr[x], 'href')){ url = modules.domUtils.getAttribute(arr[x], 'href'); @@ -81,8 +81,8 @@ var Modules = (function (modules) { url = modules.url.resolve(url, this.options.baseUrl ); } } - - + + // add to rel-urls var relUrl = this.getRelProperties(arr[x]); relUrl.rels = items; @@ -90,15 +90,15 @@ var Modules = (function (modules) { if(url && out['rel-urls'][url] === undefined){ out['rel-urls'][url] = relUrl; } - - + + } x++; } return out; }; - - + + /** * gets the properties of a rel=* * @@ -107,7 +107,7 @@ var Modules = (function (modules) { */ modules.Parser.prototype.getRelProperties = function(node){ var obj = {}; - + if(modules.domUtils.hasAttribute(node, 'media')){ obj.media = modules.domUtils.getAttribute(node, 'media'); } @@ -122,12 +122,12 @@ var Modules = (function (modules) { } if(modules.utils.trim(this.getPValue(node, false)) !== ''){ obj.text = this.getPValue(node, false); - } - + } + return obj; }; - - + + /** * finds any alt rel=* mappings for a given node/microformat * @@ -139,7 +139,7 @@ var Modules = (function (modules) { var out, map, i; - + map = this.getMapping(ufName); if(map) { for(var key in map.properties) { @@ -147,8 +147,8 @@ var Modules = (function (modules) { var prop = map.properties[key], propName = (prop.map) ? prop.map : 'p-' + key, relCount = 0; - - // is property an alt rel=* mapping + + // is property an alt rel=* mapping if(prop.relAlt && modules.domUtils.hasAttribute(node, 'rel')) { i = prop.relAlt.length; while(i--) { @@ -165,8 +165,8 @@ var Modules = (function (modules) { } return out; }; - - + + /** * returns whether a node or its children has rel=* microformat * @@ -176,8 +176,8 @@ var Modules = (function (modules) { modules.Parser.prototype.hasRel = function(node) { return (this.countRels(node) > 0); }; - - + + /** * returns the number of rel=* microformats * @@ -190,9 +190,9 @@ var Modules = (function (modules) { } return 0; }; - - - + + + } return modules; diff --git a/toolkit/components/microformats/test/lib/text.js b/toolkit/components/microformats/test/lib/text.js index 8b7ea1b5a23a..fe94dae0a3f4 100644 --- a/toolkit/components/microformats/test/lib/text.js +++ b/toolkit/components/microformats/test/lib/text.js @@ -1,9 +1,9 @@ /* text - Extracts text string from DOM nodes. Was created to extract text in a whitespace-normalized form. - It works like a none-CSS aware version of IE's innerText function. DO NOT replace this module + Extracts text string from DOM nodes. Was created to extract text in a whitespace-normalized form. + It works like a none-CSS aware version of IE's innerText function. DO NOT replace this module with functions such as textContent as it will reduce the quality of data provided to the API user. - + Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt Dependencies utilities.js, domutils.js @@ -11,26 +11,26 @@ var Modules = (function (modules) { - - + + modules.text = { - + // normalised or whitespace or whitespacetrimmed - textFormat: 'whitespacetrimmed', - + textFormat: 'whitespacetrimmed', + // block level tags, used to add line returns blockLevelTags: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'hr', 'pre', 'table', - 'address', 'article', 'aside', 'blockquote', 'caption', 'col', 'colgroup', 'dd', 'div', - 'dt', 'dir', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'header', 'hgroup', 'hr', - 'li', 'map', 'menu', 'nav', 'optgroup', 'option', 'section', 'tbody', 'testarea', + 'address', 'article', 'aside', 'blockquote', 'caption', 'col', 'colgroup', 'dd', 'div', + 'dt', 'dir', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'header', 'hgroup', 'hr', + 'li', 'map', 'menu', 'nav', 'optgroup', 'option', 'section', 'tbody', 'testarea', 'tfoot', 'th', 'thead', 'tr', 'td', 'ul', 'ol', 'dl', 'details'], - // tags to exclude + // tags to exclude excludeTags: ['noframe', 'noscript', 'template', 'script', 'style', 'frames', 'frameset'], - - + + /** - * parses the text from the DOM Node + * parses the text from the DOM Node * * @param {DOM Node} node * @param {String} textFormat @@ -50,54 +50,54 @@ var Modules = (function (modules) { return this.formatText( doc, modules.domUtils.textContent(node), this.textFormat ); } }, - - + + /** - * parses the text from a html string + * parses the text from a html string * * @param {DOM Document} doc * @param {String} text * @param {String} textFormat * @return {String} - */ + */ parseText: function( doc, text, textFormat ){ var node = modules.domUtils.createNodeWithText( 'div', text ); return this.parse( doc, node, textFormat ); }, - - + + /** * parses the text from a html string - only for whitespace or whitespacetrimmed formats * * @param {String} text * @param {String} textFormat * @return {String} - */ + */ formatText: function( doc, text, textFormat ){ this.textFormat = (textFormat)? textFormat : this.textFormat; if(text){ var out = '', regex = /(<([^>]+)>)/ig; - - out = text.replace(regex, ''); - if(this.textFormat === 'whitespacetrimmed') { + + out = text.replace(regex, ''); + if(this.textFormat === 'whitespacetrimmed') { out = modules.utils.trimWhitespace( out ); } - + //return entities.decode( out, 2 ); return modules.domUtils.decodeEntities( doc, out ); }else{ - return ''; + return ''; } }, - - + + /** - * normalises whitespace in given text + * normalises whitespace in given text * * @param {String} text * @return {String} - */ + */ normalise: function( doc, text ){ text = text.replace( / /g, ' ') ; // exchanges html entity for space into space char text = modules.utils.collapseWhiteSpace( text ); // removes linefeeds, tabs and addtional spaces @@ -105,27 +105,27 @@ var Modules = (function (modules) { text = text.replace( '–', '-' ); // correct dash decoding return modules.utils.trim( text ); }, - - + + /** * walks DOM tree parsing the text from DOM Nodes * * @param {DOM Node} node * @return {String} - */ + */ walkTreeForText: function( node ) { var out = '', j = 0; - + if(node.tagName && this.excludeTags.indexOf( node.tagName.toLowerCase() ) > -1){ return out; } - + // if node is a text node get its text if(node.nodeType && node.nodeType === 3){ - out += modules.domUtils.getElementText( node ); + out += modules.domUtils.getElementText( node ); } - + // get the text of the child nodes if(node.childNodes && node.childNodes.length > 0){ for (j = 0; j < node.childNodes.length; j++) { @@ -135,17 +135,17 @@ var Modules = (function (modules) { } } } - + // if it's a block level tag add an additional space at the end if(node.tagName && this.blockLevelTags.indexOf( node.tagName.toLowerCase() ) !== -1){ out += ' '; - } - + } + return (out === '')? undefined : out ; } - + }; - + return modules; } (Modules || {})); diff --git a/toolkit/components/microformats/test/lib/utilities.js b/toolkit/components/microformats/test/lib/utilities.js index 3fd0de51a280..c54714811396 100644 --- a/toolkit/components/microformats/test/lib/utilities.js +++ b/toolkit/components/microformats/test/lib/utilities.js @@ -1,14 +1,14 @@ /* Utilities - + Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt */ var Modules = (function (modules) { - + modules.utils = { - + /** * is the object a string * @@ -18,7 +18,7 @@ var Modules = (function (modules) { isString: function( obj ) { return typeof( obj ) === 'string'; }, - + /** * is the object a number * @@ -28,8 +28,8 @@ var Modules = (function (modules) { isNumber: function( obj ) { return !isNaN(parseFloat( obj )) && isFinite( obj ); }, - - + + /** * is the object an array * @@ -39,8 +39,8 @@ var Modules = (function (modules) { isArray: function( obj ) { return obj && !( obj.propertyIsEnumerable( 'length' ) ) && typeof obj === 'object' && typeof obj.length === 'number'; }, - - + + /** * is the object a function * @@ -50,8 +50,8 @@ var Modules = (function (modules) { isFunction: function(obj) { return !!(obj && obj.constructor && obj.call && obj.apply); }, - - + + /** * does the text start with a test string * @@ -62,8 +62,8 @@ var Modules = (function (modules) { startWith: function( text, test ) { return(text.indexOf(test) === 0); }, - - + + /** * removes spaces at front and back of text * @@ -77,8 +77,8 @@ var Modules = (function (modules) { return ''; } }, - - + + /** * replaces a character in text * @@ -89,13 +89,13 @@ var Modules = (function (modules) { */ replaceCharAt: function( text, index, character ) { if(text && text.length > index){ - return text.substr(0, index) + character + text.substr(index+character.length); + return text.substr(0, index) + character + text.substr(index+character.length); }else{ return text; } }, - - + + /** * removes whitespace, tabs and returns from start and end of text * @@ -106,7 +106,7 @@ var Modules = (function (modules) { if(text && text.length){ var i = text.length, x = 0; - + // turn all whitespace chars at end into spaces while (i--) { if(this.isOnlyWhiteSpace(text[i])){ @@ -115,7 +115,7 @@ var Modules = (function (modules) { break; } } - + // turn all whitespace chars at start into spaces i = text.length; while (x < i) { @@ -129,8 +129,8 @@ var Modules = (function (modules) { } return this.trim(text); }, - - + + /** * does text only contain whitespace characters * @@ -140,8 +140,8 @@ var Modules = (function (modules) { isOnlyWhiteSpace: function( text ){ return !(/[^\t\n\r ]/.test( text )); }, - - + + /** * removes whitespace from text (leaves a single space) * @@ -151,14 +151,14 @@ var Modules = (function (modules) { collapseWhiteSpace: function( text ){ return text.replace(/[\t\n\r ]+/g, ' '); }, - - + + /** * does an object have any of its own properties * * @param {Object} obj * @return {Boolean} - */ + */ hasProperties: function( obj ) { var key; for(key in obj) { @@ -168,15 +168,15 @@ var Modules = (function (modules) { } return false; }, - - + + /** * a sort function - to sort objects in an array by a given property * * @param {String} property * @param {Boolean} reverse * @return {Int} - */ + */ sortObjects: function(property, reverse) { reverse = (reverse) ? -1 : 1; return function (a, b) { @@ -191,9 +191,9 @@ var Modules = (function (modules) { return 0; }; } - + }; - + return modules; } (Modules || {})); diff --git a/toolkit/components/microformats/test/module-tests/dates-test.js b/toolkit/components/microformats/test/module-tests/dates-test.js index 88a3b3e3e79d..e5e034190e89 100644 --- a/toolkit/components/microformats/test/module-tests/dates-test.js +++ b/toolkit/components/microformats/test/module-tests/dates-test.js @@ -4,13 +4,13 @@ Unit test for dates assert = chai.assert; -// Tests the private Modules.dates object -// Modules.dates is unit tested as it has an interface access by other modules +// Tests the private Modules.dates object +// Modules.dates is unit tested as it has an interface access by other modules describe('Modules.dates', function() { - - + + it('hasAM', function(){ assert.isTrue( Modules.dates.hasAM( '5am' ) ); assert.isTrue( Modules.dates.hasAM( '5AM' ) ); @@ -19,8 +19,8 @@ describe('Modules.dates', function() { assert.isTrue( Modules.dates.hasAM( '5:20 a.m.' ) ); assert.isFalse( Modules.dates.hasAM( '5pm' ) ); }); - - + + it('hasPM', function(){ assert.isTrue( Modules.dates.hasPM( '5pm' ) ); assert.isTrue( Modules.dates.hasPM( '5PM' ) ); @@ -29,8 +29,8 @@ describe('Modules.dates', function() { assert.isTrue( Modules.dates.hasPM( '5:20 p.m.' ) ); assert.isFalse( Modules.dates.hasPM( '5am' ) ); }); - - + + it('removeAMPM', function(){ assert.equal( Modules.dates.removeAMPM( '5pm' ), '5' ); assert.equal( Modules.dates.removeAMPM( '5 pm' ), '5 ' ); @@ -39,8 +39,8 @@ describe('Modules.dates', function() { assert.equal( Modules.dates.removeAMPM( '5a.m.' ), '5' ); assert.equal( Modules.dates.removeAMPM( '5' ), '5' ); }); - - + + it('isDuration', function(){ assert.isTrue( Modules.dates.isDuration( 'PY17M' ) ); assert.isTrue( Modules.dates.isDuration( 'PW12' ) ); @@ -50,8 +50,8 @@ describe('Modules.dates', function() { assert.isFalse( Modules.dates.isDuration( '2015-01-23 13:45' ) ); assert.isFalse( Modules.dates.isDuration( '20150123T1345' ) ); }); - - + + it('isTime', function(){ assert.isTrue( Modules.dates.isTime( '8:43' ) ); assert.isTrue( Modules.dates.isTime( '08:43' ) ); @@ -67,10 +67,10 @@ describe('Modules.dates', function() { assert.isFalse( Modules.dates.isTime( '2015-01-23 13:45' ) ); assert.isFalse( Modules.dates.isTime( '20150123T1345' ) ); assert.isFalse( Modules.dates.isTime( 'abc' ) ); - assert.isFalse( Modules.dates.isTime( '12345' ) ); + assert.isFalse( Modules.dates.isTime( '12345' ) ); }); - - + + it('parseAmPmTime', function(){ assert.equal( Modules.dates.parseAmPmTime( '5am' ), '05' ); assert.equal( Modules.dates.parseAmPmTime( '12pm' ), '12' ); @@ -82,8 +82,8 @@ describe('Modules.dates', function() { assert.equal( Modules.dates.parseAmPmTime( '05:34:00' ), '05:34:00' ); assert.equal( Modules.dates.parseAmPmTime( '1:52:04pm' ), '13:52:04' ); }); - - + + it('dateTimeUnion', function(){ assert.equal( Modules.dates.dateTimeUnion( '2015-01-23', '05:34:00', 'HTML5' ).toString('HTML5'), '2015-01-23 05:34:00' ); assert.equal( Modules.dates.dateTimeUnion( '2015-01-23', '05:34', 'HTML5' ).toString('HTML5'), '2015-01-23 05:34' ); @@ -93,8 +93,8 @@ describe('Modules.dates', function() { assert.equal( Modules.dates.dateTimeUnion( '2015-01-23', '', 'HTML5' ).toString('HTML5'), '2015-01-23' ); assert.equal( Modules.dates.dateTimeUnion( '', '', 'HTML5' ).toString('HTML5'), '' ); }); - - + + it('concatFragments', function(){ assert.equal( Modules.dates.concatFragments( ['2015-01-23', '05:34:00'], 'HTML5' ).toString('HTML5'), '2015-01-23 05:34:00' ); assert.equal( Modules.dates.concatFragments( ['05:34:00', '2015-01-23'], 'HTML5' ).toString('HTML5'), '2015-01-23 05:34:00' ); @@ -103,11 +103,11 @@ describe('Modules.dates', function() { assert.equal( Modules.dates.concatFragments( ['2015-01-23', '05:34', '-01'], 'HTML5' ).toString('HTML5'), '2015-01-23 05:34-01' ); assert.equal( Modules.dates.concatFragments( ['2015-01-23', '05:34', '-01:00'], 'HTML5' ).toString('HTML5'), '2015-01-23 05:34-01:00' ); assert.equal( Modules.dates.concatFragments( ['2015-01-23', '05:34-01:00'], 'HTML5' ).toString('HTML5'), '2015-01-23 05:34-01:00' ); - + }); - - - + + + }); diff --git a/toolkit/components/microformats/test/module-tests/domutils-test.js b/toolkit/components/microformats/test/module-tests/domutils-test.js index 501269690970..5d3f036a9fcb 100644 --- a/toolkit/components/microformats/test/module-tests/domutils-test.js +++ b/toolkit/components/microformats/test/module-tests/domutils-test.js @@ -5,85 +5,85 @@ Unit test for domutils assert = chai.assert; -// Tests the private Modules.domUtils object -// Modules.domUtils is unit tested as it has an interface access by other modules +// Tests the private Modules.domUtils object +// Modules.domUtils is unit tested as it has an interface access by other modules describe('Modules.domutils', function() { - + it('ownerDocument', function(){ - var node = document.createElement('div'); + var node = document.createElement('div'); assert.equal( Modules.domUtils.ownerDocument( node ).nodeType, 9); }); - - + + it('innerHTML', function(){ var html = 'Glenn Jones', node = document.createElement('div'); - + node.innerHTML = html; assert.equal( Modules.domUtils.innerHTML( node ), html ); }); - - + + it('hasAttribute', function(){ var node = document.createElement('a'); - + node.href = 'http://glennjones.net'; assert.isTrue( Modules.domUtils.hasAttribute( node, 'href' ) ); assert.isFalse( Modules.domUtils.hasAttribute( node, 'class' ) ); }); - - + + it('hasAttributeValue', function(){ var node = document.createElement('a'); - + node.href = 'http://glennjones.net'; assert.isTrue( Modules.domUtils.hasAttributeValue( node, 'href', 'http://glennjones.net' ) ); assert.isFalse( Modules.domUtils.hasAttributeValue( node, 'href', 'http://example.net' ) ); assert.isFalse( Modules.domUtils.hasAttributeValue( node, 'class', 'test' ) ); }); - - + + it('getAttribute', function(){ var node = document.createElement('a'); - + node.href = 'http://glennjones.net'; assert.equal( Modules.domUtils.getAttribute( node, 'href' ), 'http://glennjones.net' ); }); - - + + it('setAttribute', function(){ var node = document.createElement('a'); - + Modules.domUtils.setAttribute(node, 'href', 'http://glennjones.net') assert.equal( Modules.domUtils.getAttribute( node, 'href' ), 'http://glennjones.net' ); }); - - + + it('removeAttribute', function(){ var node = document.createElement('a'); - + node.href = 'http://glennjones.net'; Modules.domUtils.removeAttribute(node, 'href') assert.isFalse( Modules.domUtils.hasAttribute( node, 'href' ) ); }); - + it('getAttributeList', function(){ var node = document.createElement('a'); - + node.rel = 'next'; assert.deepEqual( Modules.domUtils.getAttributeList( node, 'rel'), ['next'] ); node.rel = 'next bookmark'; assert.deepEqual( Modules.domUtils.getAttributeList( node, 'rel'), ['next','bookmark'] ); }); - - + + it('hasAttributeValue', function(){ var node = document.createElement('a'); - + node.href = 'http://glennjones.net'; node.rel = 'next bookmark'; assert.isTrue( Modules.domUtils.hasAttributeValue( node, 'href', 'http://glennjones.net' ) ); @@ -92,115 +92,115 @@ describe('Modules.domutils', function() { assert.isTrue( Modules.domUtils.hasAttributeValue( node, 'rel', 'bookmark' ) ); assert.isFalse( Modules.domUtils.hasAttributeValue( node, 'rel', 'previous' ) ); }); - - + + it('getNodesByAttribute', function(){ var node = document.createElement('ul'); node.innerHTML = '
  • one
  • two
  • three
  • '; - + assert.equal( Modules.domUtils.getNodesByAttribute( node, 'class' ).length, 2 ); assert.equal( Modules.domUtils.getNodesByAttribute( node, 'href' ).length, 0 ); }); - - + + it('getNodesByAttributeValue', function(){ var node = document.createElement('ul'); node.innerHTML = '
  • one
  • two
  • three
  • four
  • '; - + assert.equal( Modules.domUtils.getNodesByAttributeValue( node, 'class', 'h-card' ).length, 2 ); assert.equal( Modules.domUtils.getNodesByAttributeValue( node, 'class', 'p-name' ).length, 1 ); assert.equal( Modules.domUtils.getNodesByAttributeValue( node, 'class', 'u-url' ).length, 0 ); }); - + it('getAttrValFromTagList', function(){ var node = document.createElement('a'); - + node.href = 'http://glennjones.net'; - + assert.equal( Modules.domUtils.getAttrValFromTagList( node, ['a','area'], 'href' ), 'http://glennjones.net' ); assert.equal( Modules.domUtils.getAttrValFromTagList( node, ['a','area'], 'class' ), null ); assert.equal( Modules.domUtils.getAttrValFromTagList( node, ['p'], 'href' ), null ); }); - - + + it('getSingleDescendant', function(){ var html = 'Glenn Jones', node = document.createElement('div'); - + node.innerHTML = html, - - // one instance of a element + + // one instance of a element assert.equal( Modules.domUtils.getSingleDescendant( node ).outerHTML, html ); - - // two instances of a element + + // two instances of a element node.appendChild(document.createElement('a')); assert.equal( Modules.domUtils.getSingleDescendant( node ), null ); - + }); - + it('getSingleDescendantOfType', function(){ var html = 'Glenn Jones', node = document.createElement('div'); - + node.innerHTML = html, - - // one instance of a element + + // one instance of a element assert.equal( Modules.domUtils.getSingleDescendantOfType( node, ['a', 'link']).outerHTML, html ); assert.equal( Modules.domUtils.getSingleDescendantOfType( node, ['img','area']), null ); - + node.appendChild(document.createElement('p')); assert.equal( Modules.domUtils.getSingleDescendantOfType( node, ['a', 'link']).outerHTML, html ); - - // two instances of a element + + // two instances of a element node.appendChild(document.createElement('a')); assert.equal( Modules.domUtils.getSingleDescendantOfType( node, ['a', 'link']), null ); - + }); - - + + it('appendChild', function(){ var node = document.createElement('div'), child = document.createElement('a'); - - Modules.domUtils.appendChild( node, child ); + + Modules.domUtils.appendChild( node, child ); assert.equal( node.innerHTML, '' ); }); - - + + it('removeChild', function(){ var node = document.createElement('div'), child = document.createElement('a'); - - node.appendChild(child) - - assert.equal( node.innerHTML, '' ); - Modules.domUtils.removeChild( child ); + + node.appendChild(child) + + assert.equal( node.innerHTML, '' ); + Modules.domUtils.removeChild( child ); assert.equal( node.innerHTML, '' ); }); - - + + it('clone', function(){ var node = document.createElement('div'); - + node.innerHTML = 'text content'; assert.equal( Modules.domUtils.clone( node ).outerHTML, '
    text content
    ' ); }); - + it('getElementText', function(){ assert.equal( Modules.domUtils.getElementText( {} ), '' ); }); - - + + it('getNodePath', function(){ var node = document.createElement('ul'); node.innerHTML = '
    • one
    • two
    • three
    • four
    '; - var child = node.querySelector('.p-name'); - + var child = node.querySelector('.p-name'); + assert.deepEqual( Modules.domUtils.getNodePath( child ), [0,0,3] ); }); - - + + }); diff --git a/toolkit/components/microformats/test/module-tests/html-test.js b/toolkit/components/microformats/test/module-tests/html-test.js index 8ba77c789952..cd06c7b7f787 100644 --- a/toolkit/components/microformats/test/module-tests/html-test.js +++ b/toolkit/components/microformats/test/module-tests/html-test.js @@ -4,47 +4,47 @@ Unit test for html assert = chai.assert; -// Tests the private Modules.html object -// Modules.html is unit tested as it has an interface access by other modules +// Tests the private Modules.html object +// Modules.html is unit tested as it has an interface access by other modules describe('Modules.html', function() { - - + + it('parse', function(){ var html = 'Glenn Jones', bloghtml = '
    1. This be the title

      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque venenatis nunc vitae libero iaculis elementum. Nullam et justo non sapien dapibus blandit nec et leo. Ut ut malesuada tellus.

    ', node = document.createElement('div'); - + node.innerHTML = html; assert.equal(Modules.html.parse( node ), html ); - + // make sure excludes 'data-include' marked items var child = document.createElement('p'); child.setAttribute('data-include', 'true'); node.appendChild(child); assert.equal( Modules.html.parse( node ), html ); - + node = document.createElement('div'); node.innerHTML = bloghtml; assert.equal( Modules.html.parse( node ), bloghtml ); - + node = document.createElement('div'); assert.equal( Modules.html.parse( node ), '' ); - + child = document.createElement('br'); node.appendChild(child); assert.equal( Modules.html.parse( node ), '
    ' ); - + node = document.createComment('test comment'); assert.equal( Modules.html.parse( node ), '' ); - + }); - - - - - - + + + + + + }); diff --git a/toolkit/components/microformats/test/module-tests/isodate-test.js b/toolkit/components/microformats/test/module-tests/isodate-test.js index a87a183e915b..5f081f81cc39 100644 --- a/toolkit/components/microformats/test/module-tests/isodate-test.js +++ b/toolkit/components/microformats/test/module-tests/isodate-test.js @@ -5,14 +5,14 @@ Unit test for dates assert = chai.assert; -// Tests private Modules.ISODate object -// Modules.ISODate is unit tested as it has an interface access by other modules +// Tests private Modules.ISODate object +// Modules.ISODate is unit tested as it has an interface access by other modules describe('Modules.ISODates', function() { - - + + it('constructor', function(){ assert.equal( new Modules.ISODate().toString('auto'), '' ); assert.equal( new Modules.ISODate('2015-01-23T05:34:00', 'html5').toString('html5'), '2015-01-23 05:34:00' ); @@ -20,30 +20,30 @@ describe('Modules.ISODates', function() { assert.equal( new Modules.ISODate('2015-01-23T05:34:00', 'html5').toString('rfc3339'), '20150123T053400' ); assert.equal( new Modules.ISODate('2015-01-23T05:34:00', 'auto').toString('auto'), '2015-01-23T05:34:00' ); }); - - + + it('parse', function(){ assert.equal( new Modules.ISODate().parse('2015-01-23T05:34:00', 'html5').toString('html5'), '2015-01-23 05:34:00' ); assert.equal( new Modules.ISODate().parse('2015-01-23T05:34:00', 'auto').toString('auto'), '2015-01-23T05:34:00' ); assert.equal( new Modules.ISODate().parse('2015-01-23t05:34:00', 'auto').toString('auto'), '2015-01-23t05:34:00' ); - + assert.equal( new Modules.ISODate().parse('2015-01-23t05:34:00Z', 'auto').toString('auto'), '2015-01-23t05:34:00Z' ); assert.equal( new Modules.ISODate().parse('2015-01-23t05:34:00z', 'auto').toString('auto'), '2015-01-23t05:34:00z' ); assert.equal( new Modules.ISODate().parse('2015-01-23 05:34:00Z', 'auto').toString('auto'), '2015-01-23 05:34:00Z' ); assert.equal( new Modules.ISODate().parse('2015-01-23 05:34', 'auto').toString('auto'), '2015-01-23 05:34' ); assert.equal( new Modules.ISODate().parse('2015-01-23 05', 'auto').toString('auto'), '2015-01-23 05' ); - + assert.equal( new Modules.ISODate().parse('2015-01-23 05:34+01:00', 'auto').toString('auto'), '2015-01-23 05:34+01:00' ); assert.equal( new Modules.ISODate().parse('2015-01-23 05:34-01:00', 'auto').toString('auto'), '2015-01-23 05:34-01:00' ); assert.equal( new Modules.ISODate().parse('2015-01-23 05:34-01', 'auto').toString('auto'), '2015-01-23 05:34-01' ); - - + + assert.equal( new Modules.ISODate().parse('2015-01-23', 'auto').toString('auto'), '2015-01-23' ); // TODO support for importing rfc3339 profile dates // assert.equal( new Modules.ISODate().parse('20150123t0534', 'auto').toString('auto'), '2015-01-23 05:34' ); }); - - + + it('parseDate', function(){ assert.equal( new Modules.ISODate().parseDate('2015-01-23T05:34:00', 'html5'), '2015-01-23' ); assert.equal( new Modules.ISODate().parseDate('2015-01-23', 'auto'), '2015-01-23' ); @@ -51,95 +51,95 @@ describe('Modules.ISODates', function() { assert.equal( new Modules.ISODate().parseDate('2015', 'auto'), '2015' ); assert.equal( new Modules.ISODate().parseDate('2015-134', 'auto'), '2015-134' ); }); - - + + it('parseTime', function(){ assert.equal( new Modules.ISODate().parseTime('05:34:00.1267', 'html5'), '05:34:00.1267' ); assert.equal( new Modules.ISODate().parseTime('05:34:00', 'html5'), '05:34:00' ); assert.equal( new Modules.ISODate().parseTime('05:34', 'html5'), '05:34' ); assert.equal( new Modules.ISODate().parseTime('05', 'html5'), '05' ); }); - + it('parseTimeZone', function(){ var date = new Modules.ISODate(); date.parseTime('14:00'); assert.equal( date.parseTimeZone('-01:00', 'auto'), '14:00-01:00' ); - + date.clear(); date.parseTime('14:00'); assert.equal( date.parseTimeZone('-01', 'auto'), '14:00-01' ); - + date.clear(); date.parseTime('14:00'); assert.equal( date.parseTimeZone('+01:00', 'auto').toString('auto'), '14:00+01:00' ); - + date.clear(); date.parseTime('15:00'); assert.equal( date.parseTimeZone('Z', 'auto').toString('auto'), '15:00Z' ); - + date.clear(); date.parseTime('16:00'); assert.equal( date.parseTimeZone('z', 'auto'), '16:00z' ); - + }); - - - + + + it('toString', function(){ - var date = new Modules.ISODate(); + var date = new Modules.ISODate(); date.parseTime('05:34:00.1267'); - + assert.equal( date.toString('html5'), '05:34:00.1267' ); }); - - + + it('toTimeString', function(){ - var date = new Modules.ISODate(); + var date = new Modules.ISODate(); date.parseTime('05:34:00.1267'); - + assert.equal( date.toTimeString('html5'), '05:34:00.1267' ); }); - - + + it('hasFullDate', function(){ var dateEmpty = new Modules.ISODate(), date = new Modules.ISODate('2015-01-23T05:34:00'); - - assert.isFalse( dateEmpty.hasFullDate() ); - assert.isTrue( date.hasFullDate() ); + + assert.isFalse( dateEmpty.hasFullDate() ); + assert.isTrue( date.hasFullDate() ); }); - - + + it('hasDate', function(){ var dateEmpty = new Modules.ISODate(), date = new Modules.ISODate('2015-01-23'); - - assert.isFalse( dateEmpty.hasDate() ); - assert.isTrue( date.hasDate() ); + + assert.isFalse( dateEmpty.hasDate() ); + assert.isTrue( date.hasDate() ); }); - - + + it('hasTime', function(){ var dateEmpty = new Modules.ISODate(), date = new Modules.ISODate(); - + date.parseTime('12:34'); - - assert.isFalse( dateEmpty.hasTime() ); - assert.isTrue( date.hasTime() ); + + assert.isFalse( dateEmpty.hasTime() ); + assert.isTrue( date.hasTime() ); }); - - + + it('hasTimeZone', function(){ var dateEmpty = new Modules.ISODate(), date = new Modules.ISODate(); - + date.parseTime('12:34'), date.parseTimeZone('-01:00'); - - assert.isFalse( dateEmpty.hasTimeZone() ); - assert.isTrue( date.hasTimeZone() ); + + assert.isFalse( dateEmpty.hasTimeZone() ); + assert.isTrue( date.hasTimeZone() ); }); - - + + }); diff --git a/toolkit/components/microformats/test/module-tests/text-test.js b/toolkit/components/microformats/test/module-tests/text-test.js index 216931424b52..f1f2e775cfca 100644 --- a/toolkit/components/microformats/test/module-tests/text-test.js +++ b/toolkit/components/microformats/test/module-tests/text-test.js @@ -4,53 +4,53 @@ Unit test for text assert = chai.assert; -// Tests the private Modules.text object -// Modules.text is unit tested as it has an interface access by other modules +// Tests the private Modules.text object +// Modules.text is unit tested as it has an interface access by other modules describe('Modules.text', function() { - - + + it('parse', function(){ var html = '\n Glenn\n Jones \n \n', node = document.createElement('div'); - + node.innerHTML = html; assert.equal( Modules.text.parse( document, node, 'whitespacetrimmed' ), 'Glenn\n Jones' ); assert.equal( Modules.text.parse( document, node, 'whitespace' ), '\n Glenn\n Jones \n \n' ); assert.equal( Modules.text.parse( document, node, 'normalised' ), 'Glenn Jones' ); - + // exclude tags node.innerHTML = 'text'; assert.equal( Modules.text.parse( document, node, 'normalised' ), 'text' ); - - // block level + + // block level node.innerHTML = '

    test

    text'; //assert.equal( Modules.text.parse( document, node, 'normalised' ), 'test text' ); - + // node with no text data node = document.createComment('test comment'); assert.equal( Modules.text.parse( document, node, 'normalised' ), '' ); - + }); - - + + it('parseText', function(){ var text = '\n Glenn\n Jones \n \n'; - + // create DOM context first Modules.domUtils.getDOMContext( {} ); - + assert.equal( Modules.text.parseText( document, text, 'whitespacetrimmed' ), 'Glenn\n Jones' ); assert.equal( Modules.text.parseText( document, text, 'whitespace' ), '\n Glenn\n Jones \n \n' ); assert.equal( Modules.text.parseText( document, text, 'normalised' ), 'Glenn Jones' ); }); - - - it('formatText', function(){ + + + it('formatText', function(){ assert.equal( Modules.text.formatText( document, null, 'whitespacetrimmed' ), '' ); }); - - + + }); diff --git a/toolkit/components/microformats/test/module-tests/url-test.js b/toolkit/components/microformats/test/module-tests/url-test.js index b3f46df0b9a5..788e8fdb51c2 100644 --- a/toolkit/components/microformats/test/module-tests/url-test.js +++ b/toolkit/components/microformats/test/module-tests/url-test.js @@ -5,21 +5,21 @@ Unit test for url assert = chai.assert; -// Tests the private Modules.url object -// Modules.url is unit tested as it has an interface access by other modules +// Tests the private Modules.url object +// Modules.url is unit tested as it has an interface access by other modules describe('Modules.url', function() { - + it('resolve', function(){ assert.equal( Modules.url.resolve( 'docs/index.html', 'http://example.org' ), 'http://example.org/docs/index.html' ); assert.equal( Modules.url.resolve( '../index.html', 'http://example.org/docs/' ), 'http://example.org/index.html' ); assert.equal( Modules.url.resolve( '/', 'http://example.org/' ), 'http://example.org/' ); assert.equal( Modules.url.resolve( 'http://glennjones.net/', 'http://example.org/' ), 'http://glennjones.net/' ); - + assert.equal( Modules.url.resolve( undefined, 'http://example.org/' ), '' ); assert.equal( Modules.url.resolve( undefined, undefined ), '' ); assert.equal( Modules.url.resolve( 'http://glennjones.net/', undefined ), 'http://glennjones.net/' ); }); - + }); diff --git a/toolkit/components/microformats/test/module-tests/utilities-test.js b/toolkit/components/microformats/test/module-tests/utilities-test.js index 634fa46bdc9a..b37236a6bc44 100644 --- a/toolkit/components/microformats/test/module-tests/utilities-test.js +++ b/toolkit/components/microformats/test/module-tests/utilities-test.js @@ -4,14 +4,14 @@ Unit test for utilities assert = chai.assert; -// Tests the private Modules.utils object -// Modules.utils is unit tested as it has an interface access by other modules +// Tests the private Modules.utils object +// Modules.utils is unit tested as it has an interface access by other modules describe('Modules.utilities', function() { - - - it('isString', function(){ + + + it('isString', function(){ assert.isTrue( Modules.utils.isString( 'abc' ) ); assert.isFalse( Modules.utils.isString( 123 ) ); assert.isFalse( Modules.utils.isString( 1.23 ) ); @@ -19,21 +19,21 @@ describe('Modules.utilities', function() { assert.isFalse( Modules.utils.isString( ['abc'] ) ); assert.isFalse( Modules.utils.isString( true ) ); }); - - + + it('isArray', function(){ assert.isTrue( Modules.utils.isArray( ['abc'] ) ); assert.isFalse( Modules.utils.isArray( 123 ) ); - assert.isFalse( Modules.utils.isArray( 1.23 ) ); + assert.isFalse( Modules.utils.isArray( 1.23 ) ); assert.isFalse( Modules.utils.isArray( 'abc' ) ); assert.isFalse( Modules.utils.isArray( {'abc': 'abc'} ) ); assert.isFalse( Modules.utils.isArray( true ) ); }); - - + + it('isNumber', function(){ assert.isTrue( Modules.utils.isNumber( 123 ) ); - assert.isTrue( Modules.utils.isNumber( 1.23 ) ); + assert.isTrue( Modules.utils.isNumber( 1.23 ) ); assert.isFalse( Modules.utils.isNumber( 'abc' ) ); assert.isFalse( Modules.utils.isNumber( {'abc': 'abc'} ) ); assert.isFalse( Modules.utils.isNumber( ['abc'] ) ); @@ -46,48 +46,48 @@ describe('Modules.utilities', function() { assert.isFalse( Modules.utils.startWith( 'p-name', 'name' ) ); assert.isFalse( Modules.utils.startWith( 'p-name', 'u-' ) ); }); - - + + it('trim', function(){ assert.equal( Modules.utils.trim( ' Glenn Jones ' ), 'Glenn Jones' ); assert.equal( Modules.utils.trim( 'Glenn Jones' ), 'Glenn Jones' ); assert.equal( Modules.utils.trim( undefined ), '' ); }); - - + + it('replaceCharAt', function(){ assert.equal( Modules.utils.replaceCharAt( 'Glenn Jones', 5, '-' ), 'Glenn-Jones' ); assert.equal( Modules.utils.replaceCharAt( 'Glenn Jones', 50, '-' ), 'Glenn Jones' ); - }); - - + }); + + it('isOnlyWhiteSpace', function(){ assert.isTrue( Modules.utils.isOnlyWhiteSpace( ' ') ); assert.isTrue( Modules.utils.isOnlyWhiteSpace( ' \n\r') ); assert.isFalse( Modules.utils.isOnlyWhiteSpace( ' text\n\r') ); }); - - + + it('collapseWhiteSpace', function(){ assert.equal( Modules.utils.collapseWhiteSpace( ' '), ' ' ); assert.equal( Modules.utils.collapseWhiteSpace( ' \n\r'), ' ' ); assert.equal( Modules.utils.collapseWhiteSpace( ' text\n\r'), ' text ' ); - }); - - + }); + + it('hasProperties', function(){ assert.isTrue( Modules.utils.hasProperties( {name: 'glennjones'} ) ); assert.isFalse( Modules.utils.hasProperties( {} ) ); }); - - + + it('sortObjects', function(){ var arr = [{'name': 'one'},{'name': 'two'},{'name': 'three'},{'name': 'three'}]; - + assert.deepEqual( arr.sort( Modules.utils.sortObjects( 'name', true ) ), [{"name":"two"},{"name":"three"},{'name': 'three'},{"name":"one"}] ); assert.deepEqual( arr.sort( Modules.utils.sortObjects( 'name', false ) ), [{"name":"one"},{"name":"three"},{'name': 'three'},{"name":"two"}] ); }); - - - + + + }); diff --git a/toolkit/components/microformats/test/standards-tests/mf-mixed-h-card-mixedpropertries.js b/toolkit/components/microformats/test/standards-tests/mf-mixed-h-card-mixedpropertries.js index bf8efc17ae5e..d038d9f14762 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-mixed-h-card-mixedpropertries.js +++ b/toolkit/components/microformats/test/standards-tests/mf-mixed-h-card-mixedpropertries.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-mixed/h-card/mixedpropertries The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-mixed-h-card-tworoots.js b/toolkit/components/microformats/test/standards-tests/mf-mixed-h-card-tworoots.js index 92eedbef2238..77bb85514fdc 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-mixed-h-card-tworoots.js +++ b/toolkit/components/microformats/test/standards-tests/mf-mixed-h-card-tworoots.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-mixed/h-card/tworoots The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-mixed-h-entry-mixedroots.js b/toolkit/components/microformats/test/standards-tests/mf-mixed-h-entry-mixedroots.js index eff3ff018ac6..08bfd7e32d81 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-mixed-h-entry-mixedroots.js +++ b/toolkit/components/microformats/test/standards-tests/mf-mixed-h-entry-mixedroots.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-mixed/h-entry/mixedroots The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-mixed-h-resume-mixedroots.js b/toolkit/components/microformats/test/standards-tests/mf-mixed-h-resume-mixedroots.js index 6a07cc994fb9..2add91be68f3 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-mixed-h-resume-mixedroots.js +++ b/toolkit/components/microformats/test/standards-tests/mf-mixed-h-resume-mixedroots.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-mixed/h-resume/mixedroots The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-adr-simpleproperties.js b/toolkit/components/microformats/test/standards-tests/mf-v1-adr-simpleproperties.js index 37108f6ccd2f..2e25dfa07d6a 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-adr-simpleproperties.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-adr-simpleproperties.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/adr/simpleproperties The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-geo-abbrpattern.js b/toolkit/components/microformats/test/standards-tests/mf-v1-geo-abbrpattern.js index a674ff95c7cb..4b62dbfc1c5a 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-geo-abbrpattern.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-geo-abbrpattern.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/geo/abbrpattern The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-geo-hidden.js b/toolkit/components/microformats/test/standards-tests/mf-v1-geo-hidden.js index e0e2d2ff7df7..4167700c7256 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-geo-hidden.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-geo-hidden.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/geo/hidden The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-geo-simpleproperties.js b/toolkit/components/microformats/test/standards-tests/mf-v1-geo-simpleproperties.js index d14ece14beb3..88bbfa26be9f 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-geo-simpleproperties.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-geo-simpleproperties.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/geo/simpleproperties The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-geo-valuetitleclass.js b/toolkit/components/microformats/test/standards-tests/mf-v1-geo-valuetitleclass.js index 0daf716a75aa..bc18bd449902 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-geo-valuetitleclass.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-geo-valuetitleclass.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/geo/valuetitleclass The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-ampm.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-ampm.js index 994dd69f50fc..f51f2b88df07 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-ampm.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-ampm.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hcalendar/ampm The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-attendees.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-attendees.js index edd59954eb64..203cbce68f88 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-attendees.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-attendees.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hcalendar/attendees The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-combining.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-combining.js index 3f7c7be9c14d..0c0f23ba9007 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-combining.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-combining.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hcalendar/combining The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-concatenate.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-concatenate.js index 42483afae76e..803a2223d837 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-concatenate.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-concatenate.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hcalendar/concatenate The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-time.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-time.js index 8c89de2dae55..c81fa61a671c 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-time.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-time.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hcalendar/time The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-email.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-email.js index bdf9556012ca..17d7d56960c6 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-email.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-email.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hcard/email The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-format.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-format.js index 432e3a104f87..a743458acf5d 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-format.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-format.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hcard/format The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-hyperlinkedphoto.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-hyperlinkedphoto.js index 76c7fb1dd12f..8540f9429083 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-hyperlinkedphoto.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-hyperlinkedphoto.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hcard/hyperlinkedphoto The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-justahyperlink.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-justahyperlink.js index 7716dacf5c2c..07e197d5f8c0 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-justahyperlink.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-justahyperlink.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hcard/justahyperlink The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-justaname.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-justaname.js index 8e6355c52bdb..2222ade516a6 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-justaname.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-justaname.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hcard/justaname The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-multiple.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-multiple.js index d39fd924cda1..3f09e7196c05 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-multiple.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-multiple.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hcard/multiple The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-name.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-name.js index 18ab81aa9302..e5290aae75a9 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-name.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-name.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hcard/name The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-single.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-single.js index e3ea7c2e72f6..e537f5a6db65 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-single.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-single.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hcard/single The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hentry-summarycontent.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hentry-summarycontent.js index 33361bb54cd3..1f025ed1110a 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hentry-summarycontent.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hentry-summarycontent.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hentry/summarycontent The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hfeed-simple.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hfeed-simple.js index 12a7871e63d6..0fcbb319b2a4 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hfeed-simple.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hfeed-simple.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hfeed/simple The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hnews-all.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hnews-all.js index 025623418248..49cfbc9632ba 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hnews-all.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hnews-all.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hnews/all The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hnews-minimum.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hnews-minimum.js index 0dab869251ba..e083f2451995 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hnews-minimum.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hnews-minimum.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hnews/minimum The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hproduct-aggregate.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hproduct-aggregate.js index cdbf6717e8fb..150afa914afb 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hproduct-aggregate.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hproduct-aggregate.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hproduct/aggregate The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hproduct-simpleproperties.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hproduct-simpleproperties.js index 905d7cab9cd3..18b8d30f2983 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hproduct-simpleproperties.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hproduct-simpleproperties.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hproduct/simpleproperties The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-affiliation.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-affiliation.js index c75e3f5755df..cc8cbdbd87d9 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-affiliation.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-affiliation.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hresume/affiliation The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-contact.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-contact.js index 582f50f2b6d6..7e9c0e7c30a6 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-contact.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-contact.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hresume/contact The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-education.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-education.js index 7c1354881c15..db437b8bcc84 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-education.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-education.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hresume/education The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-skill.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-skill.js index 77be113df0b5..8fa51bbf58af 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-skill.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-skill.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hresume/skill The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-work.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-work.js index f6bedd484c38..8dc5cb3cbb31 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-work.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-work.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hresume/work The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-aggregate-hcard.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-aggregate-hcard.js index 2194e5a66e5e..a9b18c2c5679 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-aggregate-hcard.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-aggregate-hcard.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hreview-aggregate/hcard The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-aggregate-justahyperlink.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-aggregate-justahyperlink.js index f2663b28448b..b96df8a5d58f 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-aggregate-justahyperlink.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-aggregate-justahyperlink.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hreview-aggregate/justahyperlink The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-aggregate-vevent.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-aggregate-vevent.js index 448d9ea57716..597d5a5b87e3 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-aggregate-vevent.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-aggregate-vevent.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hreview-aggregate/vevent The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-item.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-item.js index 8d3d9e1fb48c..3c896789073b 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-item.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-item.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hreview/item The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-vcard.js b/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-vcard.js index ced727858401..360828bae3c6 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-vcard.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-vcard.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/hreview/vcard The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-includes-hcarditemref.js b/toolkit/components/microformats/test/standards-tests/mf-v1-includes-hcarditemref.js index 12fc2fac7e6f..8ce62303e5d0 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-includes-hcarditemref.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-includes-hcarditemref.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/includes/hcarditemref The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-includes-heventitemref.js b/toolkit/components/microformats/test/standards-tests/mf-v1-includes-heventitemref.js index c070c0122ada..7fa1ac5973e6 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-includes-heventitemref.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-includes-heventitemref.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/includes/heventitemref The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-includes-hyperlink.js b/toolkit/components/microformats/test/standards-tests/mf-v1-includes-hyperlink.js index 246eccdd427d..7b8eb5f1c9d9 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-includes-hyperlink.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-includes-hyperlink.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/includes/hyperlink The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-includes-object.js b/toolkit/components/microformats/test/standards-tests/mf-v1-includes-object.js index 1d7d2849a32a..faa4eea5353c 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-includes-object.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-includes-object.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/includes/object The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v1-includes-table.js b/toolkit/components/microformats/test/standards-tests/mf-v1-includes-table.js index e52a312e1418..b9e0cbcd63da 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v1-includes-table.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v1-includes-table.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/includes/table The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-geo.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-geo.js index befd63d9d741..7177213b5f22 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-geo.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-geo.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-adr/geo The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-geourl.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-geourl.js index f69a393efd42..6c296b13b93f 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-geourl.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-geourl.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-adr/geourl The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-justaname.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-justaname.js index 30928436393d..95f412d09d3b 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-justaname.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-justaname.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-adr/justaname The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-simpleproperties.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-simpleproperties.js index ba33a40fc612..cf11dff5e983 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-simpleproperties.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-simpleproperties.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-adr/simpleproperties The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-as-note-note.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-as-note-note.js index 2ffac8d303f4..a0df716d3ed6 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-as-note-note.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-as-note-note.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-as-note/note The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-baseurl.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-baseurl.js index 5f3eb584bb38..263c33dd94de 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-baseurl.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-baseurl.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-card/baseurl The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-childimplied.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-childimplied.js index 8d50f1e07568..9ee107ef6ede 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-childimplied.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-childimplied.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-card/childimplied The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-extendeddescription.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-extendeddescription.js index 52f5471e3a68..f2e174e61a74 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-extendeddescription.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-extendeddescription.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-card/extendeddescription The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-hcard.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-hcard.js index 2d0ae63b866e..2a957db109f0 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-hcard.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-hcard.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-card/hcard The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-horghcard.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-horghcard.js index 61e35b912af5..c6eaa4f78cb1 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-horghcard.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-horghcard.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-card/horghcard The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-hyperlinkedphoto.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-hyperlinkedphoto.js index cbc843564706..8d86278a38ca 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-hyperlinkedphoto.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-hyperlinkedphoto.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-card/hyperlinkedphoto The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-impliedname.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-impliedname.js index 1156f08f82ae..67ea53eae8f7 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-impliedname.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-impliedname.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-card/impliedname The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-impliedphoto.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-impliedphoto.js index 3ee065bfc0e2..16915985875b 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-impliedphoto.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-impliedphoto.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-card/impliedphoto The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-impliedurl.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-impliedurl.js index 9fc9bdab3f7c..8ca532c83b02 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-impliedurl.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-impliedurl.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-card/impliedurl The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-justahyperlink.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-justahyperlink.js index 6c833535bc16..021547267bed 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-justahyperlink.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-justahyperlink.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-card/justahyperlink The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-justaname.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-justaname.js index b1be8a43d3fe..008f065643bc 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-justaname.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-justaname.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-card/justaname The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-nested.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-nested.js index 22ac59a545c5..6c1f3fa6afce 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-nested.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-nested.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-card/nested The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-p-property.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-p-property.js index ad5a55b80355..c5854270a4f8 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-p-property.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-p-property.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-card/p-property The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-relativeurls.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-relativeurls.js index 367460f12271..2b86697ab057 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-relativeurls.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-relativeurls.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-card/relativeurls The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-impliedvalue-nested.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-impliedvalue-nested.js index 227abad64af3..8c455b21eca4 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-impliedvalue-nested.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-impliedvalue-nested.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-entry/impliedvalue-nested The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-justahyperlink.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-justahyperlink.js index 26a4617eac99..cab50a28cd90 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-justahyperlink.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-justahyperlink.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-entry/justahyperlink The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-justaname.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-justaname.js index ffed9c0e413e..930e1980d2a7 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-justaname.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-justaname.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-entry/justaname The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-summarycontent.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-summarycontent.js index 360a93c51091..5179101349e8 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-summarycontent.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-summarycontent.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-entry/summarycontent The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-u-property.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-u-property.js index c04ae59bd1c3..884773138c5a 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-u-property.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-u-property.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-entry/u-property The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-urlincontent.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-urlincontent.js index 58565f60fc35..5e4025443a52 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-urlincontent.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-urlincontent.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-entry/urlincontent The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-ampm.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-ampm.js index 474d6a451102..db26cc1826b5 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-ampm.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-ampm.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-event/ampm The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-attendees.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-attendees.js index cbc4488d738f..202afa7900a4 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-attendees.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-attendees.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-event/attendees The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-combining.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-combining.js index 201229121152..e9e8328b650e 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-combining.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-combining.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-event/combining The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-concatenate.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-concatenate.js index a89280016377..dc95e9c61c3b 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-concatenate.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-concatenate.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-event/concatenate The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-dates.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-dates.js index 49d04ddaf346..03faed64ddee 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-dates.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-dates.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-event/dates The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-dt-property.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-dt-property.js index 73da54ab81ed..2d8a41f1efcd 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-dt-property.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-dt-property.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-event/dt-property The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-justahyperlink.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-justahyperlink.js index 1f647c34b724..7f4ce5ec1478 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-justahyperlink.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-justahyperlink.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-event/justahyperlink The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-justaname.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-justaname.js index 6cce97852dc2..b6c8caefb102 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-justaname.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-justaname.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-event/justaname The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-time.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-time.js index e99c337d2ca7..da099bf63a03 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-time.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-time.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-event/time The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-feed-implied-title.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-feed-implied-title.js index 032c4bc076a2..6a5589183081 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-feed-implied-title.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-feed-implied-title.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-feed/implied-title The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-feed-simple.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-feed-simple.js index 8e92d7bff2f3..8ec1c386f968 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-feed-simple.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-feed-simple.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-feed/simple The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-abbrpattern.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-abbrpattern.js index f58d56569e89..9630ac02d8a1 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-abbrpattern.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-abbrpattern.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-geo/abbrpattern The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-altitude.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-altitude.js index 701e22d6f40f..55fd1972e774 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-altitude.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-altitude.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-geo/altitude The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-hidden.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-hidden.js index cad6aa198f83..147132f7b639 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-hidden.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-hidden.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-geo/hidden The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-justaname.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-justaname.js index 548342b6d096..c97eef79cd44 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-justaname.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-justaname.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-geo/justaname The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-simpleproperties.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-simpleproperties.js index 33bbc507fe81..73c62f393fc8 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-simpleproperties.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-simpleproperties.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-geo/simpleproperties The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-valuetitleclass.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-valuetitleclass.js index 92ab8e673cab..c4fca8bdc3e0 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-valuetitleclass.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-valuetitleclass.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-geo/valuetitleclass The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-news-all.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-news-all.js index f333ffa7c2fb..aadb1751aebd 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-news-all.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-news-all.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-news/all The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-news-minimum.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-news-minimum.js index 9bedc5086eb3..284e48f2b3be 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-news-minimum.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-news-minimum.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-news/minimum The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-org-hyperlink.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-org-hyperlink.js index 93213a954ea5..af4b41dc0306 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-org-hyperlink.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-org-hyperlink.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-org/hyperlink The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-org-simple.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-org-simple.js index effb37456e67..aca999d307f2 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-org-simple.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-org-simple.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-org/simple The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-org-simpleproperties.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-org-simpleproperties.js index 77b8ccb049ed..094bcb06de0d 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-org-simpleproperties.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-org-simpleproperties.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-org/simpleproperties The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-aggregate.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-aggregate.js index 28e8964406aa..5974ec0e2129 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-aggregate.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-aggregate.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-product/aggregate The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-justahyperlink.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-justahyperlink.js index 98963f782a4c..3643c1009b48 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-justahyperlink.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-justahyperlink.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-product/justahyperlink The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-justaname.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-justaname.js index 9f72d4761007..ffefae2ec293 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-justaname.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-justaname.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-product/justaname The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-simpleproperties.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-simpleproperties.js index 329b6d0cf497..b53d37cb7123 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-simpleproperties.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-simpleproperties.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-product/simpleproperties The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-recipe-all.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-recipe-all.js index dec7493bf3b2..5efe283a8b08 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-recipe-all.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-recipe-all.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-recipe/all The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-recipe-minimum.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-recipe-minimum.js index 638d64d65972..5f2f52a94154 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-recipe-minimum.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-recipe-minimum.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-recipe/minimum The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-affiliation.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-affiliation.js index 15faa25077b5..be2242fe6dc8 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-affiliation.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-affiliation.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-resume/affiliation The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-contact.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-contact.js index 6932557ac772..d178f7bccc39 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-contact.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-contact.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-resume/contact The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-education.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-education.js index 1842351ae317..b8b905e1b606 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-education.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-education.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-resume/education The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-justaname.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-justaname.js index ec3005ddb646..0cd808a6c4c9 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-justaname.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-justaname.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-resume/justaname The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-skill.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-skill.js index caa90f67b950..1a45ebef4608 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-skill.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-skill.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-resume/skill The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-work.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-work.js index 99ff87ce2b97..6028c378398f 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-work.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-work.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-resume/work The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-aggregate-hevent.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-aggregate-hevent.js index 4bb6a3b1c273..f3496fbb728c 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-aggregate-hevent.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-aggregate-hevent.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-review-aggregate/hevent The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-aggregate-justahyperlink.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-aggregate-justahyperlink.js index c51e9763b1f1..afc602e59bec 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-aggregate-justahyperlink.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-aggregate-justahyperlink.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-review-aggregate/justahyperlink The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-aggregate-simpleproperties.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-aggregate-simpleproperties.js index 603f81836512..a4cdcdf741ed 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-aggregate-simpleproperties.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-aggregate-simpleproperties.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-review-aggregate/simpleproperties The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-hyperlink.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-hyperlink.js index 28ae0505cb3f..f50df619d181 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-hyperlink.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-hyperlink.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-review/hyperlink The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-implieditem.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-implieditem.js index 1d97f65ce368..37eadeb457e0 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-implieditem.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-implieditem.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-review/implieditem The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-item.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-item.js index a189eec95646..62bfa8a3a526 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-item.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-item.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-review/item The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-justaname.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-justaname.js index 6def0709cb09..f7d694751a0c 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-justaname.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-justaname.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-review/justaname The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-photo.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-photo.js index 92741873b001..043f2b8d332c 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-photo.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-photo.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-review/photo The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-vcard.js b/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-vcard.js index db6a7430089d..10d96be47f6d 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-vcard.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-vcard.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-review/vcard The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-duplicate-rels.js b/toolkit/components/microformats/test/standards-tests/mf-v2-rel-duplicate-rels.js index 72af915e0102..633fb488c14a 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-duplicate-rels.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-rel-duplicate-rels.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/rel/duplicate-rels The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-license.js b/toolkit/components/microformats/test/standards-tests/mf-v2-rel-license.js index 944e1599b9c0..bee1baa58e72 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-license.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-rel-license.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/rel/license The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-nofollow.js b/toolkit/components/microformats/test/standards-tests/mf-v2-rel-nofollow.js index 19089178f93d..ec0d6548cd77 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-nofollow.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-rel-nofollow.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/rel/nofollow The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-rel-urls.js b/toolkit/components/microformats/test/standards-tests/mf-v2-rel-rel-urls.js index 88d0857bc792..ca78303e2582 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-rel-urls.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-rel-rel-urls.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/rel/rel-urls The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-varying-text-duplicate-rels.js b/toolkit/components/microformats/test/standards-tests/mf-v2-rel-varying-text-duplicate-rels.js index 1fdc423a894c..c2a54b76f08b 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-varying-text-duplicate-rels.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-rel-varying-text-duplicate-rels.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/rel/varying-text-duplicate-rels The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-xfn-all.js b/toolkit/components/microformats/test/standards-tests/mf-v2-rel-xfn-all.js index ecdd9e66e635..713286e65bb6 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-xfn-all.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-rel-xfn-all.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/rel/xfn-all The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-xfn-elsewhere.js b/toolkit/components/microformats/test/standards-tests/mf-v2-rel-xfn-elsewhere.js index 0aeee2919031..582381d246a4 100644 --- a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-xfn-elsewhere.js +++ b/toolkit/components/microformats/test/standards-tests/mf-v2-rel-xfn-elsewhere.js @@ -1,5 +1,5 @@ /* -Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 +Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/rel/xfn-elsewhere The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ diff --git a/toolkit/components/microformats/test/static/javascript/DOMParser.js b/toolkit/components/microformats/test/static/javascript/DOMParser.js index caffb8fb4584..fa26bcdfd9b8 100644 --- a/toolkit/components/microformats/test/static/javascript/DOMParser.js +++ b/toolkit/components/microformats/test/static/javascript/DOMParser.js @@ -53,7 +53,7 @@ // Mess with DOMParser.prototype (less than optimal...) if one of the above worked // Assume can write to the prototype, if not, make this a stand alone function - if (DOMParser.prototype && (htmlElInnerHTML || textXML)) { + if (DOMParser.prototype && (htmlElInnerHTML || textXML)) { DOMParser_proto = DOMParser.prototype; real_parseFromString = DOMParser_proto.parseFromString; @@ -76,7 +76,7 @@ // Make sure markup is wrapped in HTML tags // Should probably allow for a DOCTYPE if (!(/^$/i.test(markup))) { - markup = '' + markup + '<\/html>'; + markup = '' + markup + '<\/html>'; } doc = (new DOMParser).parseFromString(markup, 'text/xml'); doc_el = doc.documentElement; diff --git a/toolkit/components/microformats/test/static/javascript/beautify.js b/toolkit/components/microformats/test/static/javascript/beautify.js index 68cc89eb70b7..55d06cb08b7d 100644 --- a/toolkit/components/microformats/test/static/javascript/beautify.js +++ b/toolkit/components/microformats/test/static/javascript/beautify.js @@ -3,10 +3,10 @@ JS Beautifier --------------- - Written by Einars "elfz" Lielmanis, + Written by Einars "elfz" Lielmanis, http://elfz.laacz.lv/beautify/ - Originally converted to javascript by Vital, + Originally converted to javascript by Vital, http://my.opera.com/Vital/blog/2007/11/21/javascript-beautify-on-javascript-translated @@ -411,7 +411,7 @@ function js_beautify(js_source_text, indent_size, indent_character) } return [c, 'TK_WORD']; } - + if (c == '(' || c == '[') { return [c, 'TK_START_EXPR']; } diff --git a/toolkit/components/microformats/test/static/javascript/chai.js b/toolkit/components/microformats/test/static/javascript/chai.js index 53bffed34d02..b93c6f6e00dc 100644 --- a/toolkit/components/microformats/test/static/javascript/chai.js +++ b/toolkit/components/microformats/test/static/javascript/chai.js @@ -3155,7 +3155,7 @@ module.exports = function (chai, util) { * ### .ifError(object) * * Asserts if value is not a false value, and throws if it is a true value. - * This is added to allow for chai to be a drop-in replacement for Node's + * This is added to allow for chai to be a drop-in replacement for Node's * assert class. * * var err = new Error('I am a custom error'); @@ -3828,7 +3828,7 @@ var getPathInfo = require('./getPathInfo'); module.exports = function(path, obj) { var info = getPathInfo(path, obj); return info.value; -}; +}; },{"./getPathInfo":16}],18:[function(require,module,exports){ /*! @@ -3896,7 +3896,7 @@ var type = require('type-detect'); * hasProperty('str', obj); // true * hasProperty('constructor', obj); // true * hasProperty('bar', obj); // false - * + * * hasProperty('length', obj.str); // true * hasProperty(1, obj.str); // true * hasProperty(5, obj.str); // false diff --git a/toolkit/components/microformats/test/static/javascript/count.js b/toolkit/components/microformats/test/static/javascript/count.js index 52876bb7a9ce..3dcf56974ab2 100644 --- a/toolkit/components/microformats/test/static/javascript/count.js +++ b/toolkit/components/microformats/test/static/javascript/count.js @@ -1,5 +1,5 @@ /*! - parse + parse Used by http://localhost:3000/ Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt @@ -8,28 +8,28 @@ window.onload = function() { var form; - form= document.getElementById('mf-form'); - + form= document.getElementById('mf-form'); + form.onsubmit = function(e){ e.preventDefault(); - + var html, doc, node, options, mfJSON, parserJSONElt; - + // get data from html html = document.getElementById('html').value; parserJSONElt = document.querySelector('#parser-json pre code') - + // createHTMLDocument is not well support below ie9 doc = document.implementation.createHTMLDocument("New Document"); node = document.createElement('div'); node.innerHTML = html; - doc.body.appendChild(node); - + doc.body.appendChild(node); + options ={ 'node': node }; @@ -42,13 +42,13 @@ window.onload = function() { mfJSON = Microformats.count(options); } - + // format output parserJSONElt.innerHTML = htmlEscape( js_beautify( JSON.stringify(mfJSON) ) ); - //prettyPrint(); - + //prettyPrint(); + } - + function htmlEscape(str) { return String(str) .replace(/&/g, '&') @@ -57,6 +57,6 @@ window.onload = function() { .replace(//g, '>'); } - - -}; + + +}; diff --git a/toolkit/components/microformats/test/static/javascript/parse.js b/toolkit/components/microformats/test/static/javascript/parse.js index 8ea6fb17aa63..588e403eef27 100644 --- a/toolkit/components/microformats/test/static/javascript/parse.js +++ b/toolkit/components/microformats/test/static/javascript/parse.js @@ -1,5 +1,5 @@ /*! - parse + parse Used by http://localhost:3000/ Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt @@ -8,18 +8,18 @@ window.onload = function() { var form; - form= document.getElementById('mf-form'); - + form= document.getElementById('mf-form'); + form.onsubmit = function(e){ e = (e)? e : window.event; - + if (e.preventDefault) { - e.preventDefault(); + e.preventDefault(); } else { - event.returnValue = false; + event.returnValue = false; } - + var html, baseUrl, filter, @@ -33,34 +33,34 @@ window.onload = function() { options, mfJSON, parserJSONElt; - + // get data from html html = document.getElementById('html').value; baseUrl = document.getElementById('baseurl').value; filters = document.getElementById('filters').value; - collapsewhitespace = document.getElementById('collapsewhitespace').checked; + collapsewhitespace = document.getElementById('collapsewhitespace').checked; //overlappingversions = document.getElementById('overlappingversions').checked; - //impliedPropertiesByVersion = document.getElementById('impliedPropertiesByVersion').checked; - parseLatLonGeo = document.getElementById('parseLatLonGeo').checked; + //impliedPropertiesByVersion = document.getElementById('impliedPropertiesByVersion').checked; + parseLatLonGeo = document.getElementById('parseLatLonGeo').checked; dateformatElt = document.getElementById("dateformat"); dateformat = dateformatElt.options[dateformatElt.selectedIndex].value; parserJSONElt = document.querySelector('#parser-json pre code') - - + + var dom = new DOMParser(); doc = dom.parseFromString( html, 'text/html' ); - + options ={ 'document': doc, 'node': doc, 'dateFormat': dateformat, 'parseLatLonGeo': false }; - + if(baseUrl.trim() !== ''){ options.baseUrl = baseUrl; } - + if(filters.trim() !== ''){ if(filters.indexOf(',') > -1){ options.filters = trimArrayItems(filters.split(',')); @@ -68,31 +68,31 @@ window.onload = function() { options.filters = [filters.trim()]; } } - + if(collapsewhitespace === true){ options.textFormat = 'normalised'; } - + /* if(overlappingversions === true){ options.overlappingVersions = false; } - + if(impliedPropertiesByVersion === true){ options.impliedPropertiesByVersion = true; } */ - + if(parseLatLonGeo === true){ options.parseLatLonGeo = true } - + if(options.baseUrl){ html = '' + html; } - - + + // parse direct into Modules to help debugging if(window.Modules){ var parser = new Modules.Parser(); @@ -101,15 +101,15 @@ window.onload = function() { mfJSON = Microformats.get(options); } - + // format output parserJSONElt.innerHTML = htmlEscape( js_beautify( JSON.stringify(mfJSON) ) ); - //prettyPrint(); - + //prettyPrint(); + } - - -}; + + +}; diff --git a/toolkit/components/microformats/test/static/javascript/prettify.js b/toolkit/components/microformats/test/static/javascript/prettify.js index ea8715b2a773..b8a5e792e3d3 100644 --- a/toolkit/components/microformats/test/static/javascript/prettify.js +++ b/toolkit/components/microformats/test/static/javascript/prettify.js @@ -67,7 +67,7 @@ window['PR_SHOULD_USE_CONTINUATION'] = true; // We use things that coerce to strings to make them compact when minified // and to defeat aggressive optimizers that fold large string constants. var FLOW_CONTROL_KEYWORDS = ["break,continue,do,else,for,if,return,while"]; - var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," + + var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," + "double,enum,extern,float,goto,int,long,register,short,signed,sizeof," + "static,struct,switch,typedef,union,unsigned,void,volatile"]; var COMMON_KEYWORDS = [C_KEYWORDS,"catch,class,delete,false,import," + @@ -220,7 +220,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& */ function combinePrefixPatterns(regexs) { var capturedGroupIndex = 0; - + var needToFoldCase = false; var ignoreCase = false; for (var i = 0, n = regexs.length; i < n; ++i) { @@ -234,7 +234,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& break; } } - + var escapeCharToCodeUnit = { 'b': 8, 't': 9, @@ -243,7 +243,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& 'f': 0xc, 'r': 0xd }; - + function decodeEscape(charsetPart) { var cc0 = charsetPart.charCodeAt(0); if (cc0 !== 92 /* \\ */) { @@ -261,7 +261,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& return charsetPart.charCodeAt(1); } } - + function encodeEscape(charCode) { if (charCode < 0x20) { return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16); @@ -272,7 +272,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& } return ch; } - + function caseFoldCharset(charSet) { var charsetParts = charSet.substring(1, charSet.length - 1).match( new RegExp( @@ -315,7 +315,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& } } } - + // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]] // -> [[1, 12], [14, 14], [16, 17]] ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1] - a[1]); }); @@ -329,7 +329,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& consolidatedRanges.push(lastRange = range); } } - + var out = ['[']; if (inverse) { out.push('^'); } out.push.apply(out, groups); @@ -344,7 +344,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& out.push(']'); return out.join(''); } - + function allowAnywhereFoldCaseAndRenumberGroups(regex) { // Split into character sets, escape sequences, punctuation strings // like ('(', '(?:', ')', '^'), and runs of characters that do not @@ -363,12 +363,12 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& + ')', 'g')); var n = parts.length; - + // Maps captured group numbers to the number they will occupy in // the output or to -1 if that has not been determined, or to // undefined if they need not be capturing in the output. var capturedGroups = []; - + // Walk over and identify back references to build the capturedGroups // mapping. for (var i = 0, groupIndex = 0; i < n; ++i) { @@ -383,7 +383,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& } } } - + // Renumber groups and reduce capturing groups to non-capturing groups // where possible. for (i = 1; i < capturedGroups.length; ++i) { @@ -405,13 +405,13 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& } } } - + // Remove any prefix anchors so that the output will match anywhere. // ^^ really does mean an anchored match though. for (i = 0, groupIndex = 0; i < n; ++i) { if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; } } - + // Expand letters to groups to handle mixing of case-sensitive and // case-insensitive patterns if necessary. if (regex.ignoreCase && needToFoldCase) { @@ -431,10 +431,10 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& } } } - + return parts.join(''); } - + var rewritten = []; for (i = 0, n = regexs.length; i < n; ++i) { regex = regexs[i]; @@ -442,7 +442,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& rewritten.push( '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')'); } - + return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g'); } @@ -492,12 +492,12 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& */ function extractSourceSpans(node) { var nocode = /(?:^|\s)nocode(?:\s|$)/; - + var chunks = []; var length = 0; var spans = []; var k = 0; - + var whitespace; if (node.currentStyle) { whitespace = node.currentStyle.whiteSpace; @@ -506,7 +506,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& .getPropertyValue('white-space'); } var isPreformatted = whitespace && 'pre' === whitespace.substring(0, 3); - + function walk(node) { switch (node.nodeType) { case 1: // Element @@ -538,9 +538,9 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& break; } } - + walk(node); - + return { sourceCode: chunks.join('').replace(/\n$/, ''), spans: spans @@ -910,9 +910,9 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& function numberLines(node, opt_startLineNum) { var nocode = /(?:^|\s)nocode(?:\s|$)/; var lineBreak = /\r\n?|\n/; - + var document = node.ownerDocument; - + var whitespace; if (node.currentStyle) { whitespace = node.currentStyle.whiteSpace; @@ -923,7 +923,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& // If it's preformatted, then we need to split lines on line breaks // in addition to
    s. var isPreformatted = whitespace && 'pre' === whitespace.substring(0, 3); - + var li = document.createElement('LI'); while (node.firstChild) { li.appendChild(node.firstChild); @@ -931,7 +931,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& // An array of lines. We split below, so this is initialized to one // un-split line. var listItems = [li]; - + function walk(node) { switch (node.nodeType) { case 1: // Element @@ -971,7 +971,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& break; } } - + // Split a line after the given node. function breakAfter(lineEndNode) { // If there's nothing to the right, then we can skip ending the line @@ -981,7 +981,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& lineEndNode = lineEndNode.parentNode; if (!lineEndNode) { return; } } - + function breakLeftOf(limit, copy) { // Clone shallowly if this node needs to be on both sides of the break. var rightSide = copy ? limit.cloneNode(false) : limit; @@ -1003,9 +1003,9 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& } return rightSide; } - + var copiedListItem = breakLeftOf(lineEndNode.nextSibling, 0); - + // Walk the parent chain until we reach an unattached LI. for (var parent; // Check nodeType since IE invents document fragments. @@ -1015,19 +1015,19 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& // Put it on the list of lines for later processing. listItems.push(copiedListItem); } - + // Split lines while there are lines left to split. for (var i = 0; // Number of lines that have been split so far. i < listItems.length; // length updated by breakAfter calls. ++i) { walk(listItems[i]); } - + // Make sure numeric indices show correctly. if (opt_startLineNum === (opt_startLineNum|0)) { listItems[0].setAttribute('value', opt_startLineNum); } - + var ol = document.createElement('OL'); ol.className = 'linenums'; var offset = Math.max(0, ((opt_startLineNum - 1 /* zero index */)) | 0) || 0; @@ -1042,7 +1042,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& } ol.appendChild(li); } - + node.appendChild(ol); } @@ -1062,23 +1062,23 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& function recombineTagsAndDecorations(job) { var isIE = /\bMSIE\b/.test(navigator.userAgent); var newlineRe = /\n/g; - + var source = job.sourceCode; var sourceLength = source.length; // Index into source after the last code-unit recombined. var sourceIndex = 0; - + var spans = job.spans; var nSpans = spans.length; // Index into spans after the last span which ends at or before sourceIndex. var spanIndex = 0; - + var decorations = job.decorations; var nDecorations = decorations.length; // Index into decorations after the last decoration which ends at or before // sourceIndex. var decorationIndex = 0; - + // Remove all zero-length decorations. decorations[nDecorations] = sourceLength; var decPos, i; @@ -1091,7 +1091,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& } } nDecorations = decPos; - + // Simplify decorations. for (i = decPos = 0; i < nDecorations;) { var startPos = decorations[i]; @@ -1105,19 +1105,19 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& decorations[decPos++] = startDec; i = end; } - + nDecorations = decorations.length = decPos; - + var decoration = null; while (spanIndex < nSpans) { var spanStart = spans[spanIndex]; var spanEnd = spans[spanIndex + 2] || sourceLength; - + var decStart = decorations[decorationIndex]; var decEnd = decorations[decorationIndex + 2] || sourceLength; - + end = Math.min(spanEnd, decEnd); - + var textNode = spans[spanIndex + 1]; var styledText; if (textNode.nodeType !== 1 // Don't muck with
    s or
  • s @@ -1143,9 +1143,9 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& parentNode.insertBefore(textNode, span.nextSibling); } } - + sourceIndex = end; - + if (sourceIndex >= spanEnd) { spanIndex += 2; } diff --git a/toolkit/components/microformats/test/static/javascript/testrunner.js b/toolkit/components/microformats/test/static/javascript/testrunner.js index b60428dce204..5cdd99f2b7a7 100644 --- a/toolkit/components/microformats/test/static/javascript/testrunner.js +++ b/toolkit/components/microformats/test/static/javascript/testrunner.js @@ -1,5 +1,5 @@ /*! - testrunner + testrunner Used by http://localhost:3000/testrunner.html Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved. MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt @@ -14,11 +14,11 @@ var options = { window.onload = function() { var test = testData.data[0], versionElt = document.querySelector('#version'); - + versionElt.innerHTML = 'v' + testData.version; - + buildTest( test ); - buildList( testData ); + buildList( testData ); } @@ -41,26 +41,26 @@ function buildTest( test ){ jsonElt = document.querySelector('#test-json pre code'), parserElt = document.querySelector('#parser-json pre code'), diffElt = document.querySelector('#test-diff pre code'); - - nameElt.innerHTML = test.name; - htmlElt.innerHTML = htmlEscape( test.html ); - jsonElt.innerHTML = htmlEscape( test.json ); - + + nameElt.innerHTML = test.name; + htmlElt.innerHTML = htmlEscape( test.html ); + jsonElt.innerHTML = htmlEscape( test.json ); + var dom = new DOMParser(); - doc = dom.parseFromString( test.html, 'text/html' ); - + doc = dom.parseFromString( test.html, 'text/html' ); + options.node = doc; var mfJSON = Microformats.get( options ); parserElt.innerHTML = htmlEscape( js_beautify( JSON.stringify(mfJSON) ) ); - + // diff json var diff = DeepDiff(JSON.parse(test.json), mfJSON); if(diff !== undefined){ - diffElt.innerHTML = htmlEscape( js_beautify( JSON.stringify(diff) ) ); + diffElt.innerHTML = htmlEscape( js_beautify( JSON.stringify(diff) ) ); }else{ - diffElt.innerHTML = ''; + diffElt.innerHTML = ''; } - + console.log(diff) if(diff !== undefined){ addClass(nameElt, 'failed'); @@ -71,9 +71,9 @@ function buildTest( test ){ removeClass(testDetailElt, 'test-failed'); addClass(testDetailElt, 'test-passed'); } - + testDetailElt.style.display = 'block'; - + //prettyPrint(); } @@ -82,13 +82,13 @@ function buildTest( test ){ function passTest( test ){ var dom = new DOMParser(), doc = dom.parseFromString( test.html, 'text/html' ); - + options.node = doc; var mfJSON = Microformats.get( options ); - + // diff json var diff = DeepDiff(JSON.parse(test.json), mfJSON); - return (diff === undefined); + return (diff === undefined); } @@ -98,24 +98,24 @@ function buildList( tests ){ var total = tests.data.length, passed = 0, testResultListElt = document.querySelector('.test-result-list'); - + tests.data.forEach(function(item){ var li = document.createElement('li'); li.innerHTML = item.name; testResultListElt.appendChild(li); - + if( passTest( item ) === false ){ //li.classList.add('failed') addClass(li, 'failed'); }else{ passed ++; } - + li.addEventListener('click', function(e){ e.preventDefault(); displayTest(e); }); - + }); updateCounts( { 'total': total, diff --git a/toolkit/components/microformats/tests/test_Microformats_geo.html b/toolkit/components/microformats/tests/test_Microformats_geo.html index 0fffaf31bb09..7ec9a0fb5f48 100644 --- a/toolkit/components/microformats/tests/test_Microformats_geo.html +++ b/toolkit/components/microformats/tests/test_Microformats_geo.html @@ -107,7 +107,7 @@ function test_geo() { is(Geo.latitude, 30.267991, "01-geo-abbr - latitude"); is(Geo.longitude, -97.739568, "01-geo-abbr - longitude"); - + Geo = new geo(document.getElementById("02-geo-vcard-01")); is(Geo.toString(), "John Doe", "02-geo-vcard-01"); diff --git a/toolkit/components/microformats/tests/test_Microformats_getters.html b/toolkit/components/microformats/tests/test_Microformats_getters.html index b12995ad1190..bae0228e2b3e 100644 --- a/toolkit/components/microformats/tests/test_Microformats_getters.html +++ b/toolkit/components/microformats/tests/test_Microformats_getters.html @@ -45,7 +45,7 @@ mfs = Microformats.get("hCalendar", document.getElementById("secondnode")); - is(mfs[0].summary, "Pseudo Conference", + is(mfs[0].summary, "Pseudo Conference", "Make sure we get the proper hCalendar from the second level node"); is(mfs.length, 1, "And we should only get one hCalendar not two from this node."); } diff --git a/toolkit/components/microformats/tests/test_Microformats_hCard.html b/toolkit/components/microformats/tests/test_Microformats_hCard.html index 8b4ae9cacfa9..99d9c8558c01 100644 --- a/toolkit/components/microformats/tests/test_Microformats_hCard.html +++ b/toolkit/components/microformats/tests/test_Microformats_hCard.html @@ -806,7 +806,7 @@ function test_hCard() { is(hcard.tel[0].type[0], "home", "21-tel.2 - type"); is(hcard.tel[0].value, "+1.415.555.1212", "21-tel.2 - tel"); - + hcard = new hCard(document.getElementById("21-tel.3")); is(hcard.tel[0].type[0], "home", "21-tel.3 - type (home)"); @@ -884,7 +884,7 @@ function test_hCard() { is(hcard.fn, "Paradise", "25-geo-abbr - fn"); is(hcard.geo.latitude, 30.267991, "25-geo-abbr - geo.latitude"); is(hcard.geo.longitude, -97.739568, "25-geo-abbr - geo.longitude"); - + hcard = new hCard(document.getElementById("26-ancestors")); is(hcard.fn, "John Doe", "26-ancestors - fn"); @@ -945,7 +945,7 @@ function test_hCard() { hcard = new hCard(document.getElementById("30-fn-org.2")); - + is(hcard.fn, "Dan Connolly", "30-fn-org.2 - fn"); is(hcard.n["given-name"][0], "Dan", "30-fn-org.2 - given-name"); is(hcard.n["family-name"][0], "Connolly", "30-fn-org.2 - family-name"); @@ -1030,21 +1030,21 @@ function test_hCard() { is(String(hcard.url), "http://example.com/", "33-area.2 - url"); is(hcard.email[0].value, "joe@example.com", "33-area.2 - email"); is(hcard.org[0]["organization-name"], "Joe Public", "33-area.2 - organization-name"); - + hcard = new hCard(document.getElementById("33-area.3")); is(hcard.fn, "Joe Public", "33-area.3 - fn"); is(String(hcard.url), "http://example.com/", "33-area.3 - url"); is(hcard.email[0].value, "joe@example.com", "33-area.3 - email"); is(hcard.org[0]["organization-name"], "Joe Public", "33-area.3 - organization-name"); - + hcard = new hCard(document.getElementById("33-area.4")); is(hcard.fn, "Joe Public", "33-area.4 - fn"); is(String(hcard.url), "http://example.com/", "33-area.4 - url"); is(hcard.email[0].value, "joe@example.com", "33-area.4 - email"); is(hcard.org[0]["organization-name"], "Joe Public", "33-area.4 - organization-name"); - + hcard = new hCard(document.getElementById("33-area.5")); is(hcard.fn, "Joe Public", "33-area.5 - fn"); diff --git a/toolkit/components/nsDefaultCLH.js b/toolkit/components/nsDefaultCLH.js index 56dd0962dcee..fec3652f5c7b 100644 --- a/toolkit/components/nsDefaultCLH.js +++ b/toolkit/components/nsDefaultCLH.js @@ -74,7 +74,7 @@ nsDefaultCLH.prototype = { dump(out + "\n"); Components.utils.reportError(out); } - + if (cmdLine.handleFlag("silent", false)) { cmdLine.preventDefault = true; } @@ -101,7 +101,7 @@ nsDefaultCLH.prototype = { } catch (e) { } - // if the pref is missing, ignore the exception + // if the pref is missing, ignore the exception try { var chromeURI = prefs.getCharPref("toolkit.defaultChromeURI"); diff --git a/toolkit/components/perfmonitoring/PerformanceStats.jsm b/toolkit/components/perfmonitoring/PerformanceStats.jsm index bef641e8fd07..04cdec2e373e 100644 --- a/toolkit/components/perfmonitoring/PerformanceStats.jsm +++ b/toolkit/components/perfmonitoring/PerformanceStats.jsm @@ -393,7 +393,7 @@ var Probes = { */ function PerformanceMonitor(probes) { this._probes = probes; - + // Activate low-level features as needed for (let probe of probes) { probe.acquire(); @@ -429,7 +429,7 @@ PerformanceMonitor.prototype = { * `promiseSnapshot()` and `subtract()`. * * On the other hand, numeric values are also monotonic across several instances - * of a PerformanceMonitor with the same probes. + * of a PerformanceMonitor with the same probes. * let a = PerformanceStats.getMonitor(someProbes); * let snapshot1 = yield a.promiseSnapshot(); * diff --git a/toolkit/components/perfmonitoring/tests/browser/browser_compartments.js b/toolkit/components/perfmonitoring/tests/browser/browser_compartments.js index 28afa513fbe4..268b0636bf70 100644 --- a/toolkit/components/perfmonitoring/tests/browser/browser_compartments.js +++ b/toolkit/components/perfmonitoring/tests/browser/browser_compartments.js @@ -60,7 +60,7 @@ function frameScript() { }); } catch (ex) { Cu.reportError("Error in content (setup): " + ex); - Cu.reportError(ex.stack); + Cu.reportError(ex.stack); } } diff --git a/toolkit/components/perfmonitoring/tests/browser/browser_webpagePerformanceAlerts.js b/toolkit/components/perfmonitoring/tests/browser/browser_webpagePerformanceAlerts.js index 3780ca78bec7..aed730c57986 100644 --- a/toolkit/components/perfmonitoring/tests/browser/browser_webpagePerformanceAlerts.js +++ b/toolkit/components/perfmonitoring/tests/browser/browser_webpagePerformanceAlerts.js @@ -54,7 +54,7 @@ add_task(function* test_open_window_then_watch_it() { yield BrowserTestUtils.browserLoaded(otherTab.linkedBrowser); info(`Check that burning CPU triggers the real listener, but not the fake listener`); let fakeListener = new WebpageListener(otherTab.linkedBrowser.outerWindowID, group => group.windowId == burner.windowId); // This listener should never be triggered. - let universalListener = new WebpageListener(0, alerts => + let universalListener = new WebpageListener(0, alerts => alerts.find(alert => alert.source.windowId == burner.windowId) ); diff --git a/toolkit/components/places/BookmarkHTMLUtils.jsm b/toolkit/components/places/BookmarkHTMLUtils.jsm index 276777d90e9a..faa7cdfbcabb 100644 --- a/toolkit/components/places/BookmarkHTMLUtils.jsm +++ b/toolkit/components/places/BookmarkHTMLUtils.jsm @@ -289,7 +289,7 @@ function Frame(aFrameId) { * contains the URL of the previous bookmark created. This is used so that * when we encounter a
    , we know what bookmark to associate the text with. * This is cleared whenever we hit a

    , so that we know NOT to save this - * with a bookmark, but to keep it until + * with a bookmark, but to keep it until */ this.previousLink = null; // nsIURI @@ -346,7 +346,7 @@ BookmarkImporter.prototype = { switch (containerType) { case Container_Normal: // append a new folder - containerId = + containerId = PlacesUtils.bookmarks.createFolder(frame.containerId, containerTitle, PlacesUtils.bookmarks.DEFAULT_INDEX); @@ -765,14 +765,14 @@ BookmarkImporter.prototype = { frame.previousText = ""; // Set last-modified a 2nd time for all items with descriptions - // we need to set last-modified as the *last* step in processing + // we need to set last-modified as the *last* step in processing // any item type in the bookmarks.html file, so that we do - // not overwrite the imported value. for items without descriptions, - // setting this value after setting the item title is that + // not overwrite the imported value. for items without descriptions, + // setting this value after setting the item title is that // last point at which we can save this value before it gets reset. // for items with descriptions, it must set after that point. - // however, at the point at which we set the title, there's no way - // to determine if there will be a description following, + // however, at the point at which we set the title, there's no way + // to determine if there will be a description following, // so we need to set the last-modified-date at both places. let lastModified; diff --git a/toolkit/components/places/Bookmarks.jsm b/toolkit/components/places/Bookmarks.jsm index fd469666ab25..7a93bdd43b60 100644 --- a/toolkit/components/places/Bookmarks.jsm +++ b/toolkit/components/places/Bookmarks.jsm @@ -693,7 +693,7 @@ function updateBookmark(info, item, newParent) { if (info.hasOwnProperty("url")) { // Ensure a page exists in moz_places for this URL. yield db.executeCached( - `INSERT OR IGNORE INTO moz_places (url, rev_host, hidden, frecency, guid) + `INSERT OR IGNORE INTO moz_places (url, rev_host, hidden, frecency, guid) VALUES (:url, :rev_host, 0, :frecency, GENERATE_GUID()) `, { url: info.url ? info.url.href : null, rev_host: PlacesUtils.getReversedHost(info.url), @@ -781,7 +781,7 @@ function insertBookmark(item, parent) { if (item.type == Bookmarks.TYPE_BOOKMARK) { // Ensure a page exists in moz_places for this URL. yield db.executeCached( - `INSERT OR IGNORE INTO moz_places (url, rev_host, hidden, frecency, guid) + `INSERT OR IGNORE INTO moz_places (url, rev_host, hidden, frecency, guid) VALUES (:url, :rev_host, 0, :frecency, GENERATE_GUID()) `, { url: item.url.href, rev_host: PlacesUtils.getReversedHost(item.url), frecency: item.url.protocol == "place:" ? 0 : -1 }); diff --git a/toolkit/components/places/PlacesBackups.jsm b/toolkit/components/places/PlacesBackups.jsm index c8c102432b6e..58d897e2ff07 100644 --- a/toolkit/components/places/PlacesBackups.jsm +++ b/toolkit/components/places/PlacesBackups.jsm @@ -515,7 +515,7 @@ this.PlacesBackups = { * * index: the position in the parent * * dateAdded: microseconds from the epoch * * lastModified: microseconds from the epoch - * * type: type of the originating node as defined in PlacesUtils + * * type: type of the originating node as defined in PlacesUtils * The following properties exist only for a subset of bookmarks: * * annos: array of annotations * * uri: url diff --git a/toolkit/components/places/PlacesUtils.jsm b/toolkit/components/places/PlacesUtils.jsm index 89692fb0a058..df753f49642e 100644 --- a/toolkit/components/places/PlacesUtils.jsm +++ b/toolkit/components/places/PlacesUtils.jsm @@ -1456,7 +1456,7 @@ this.PlacesUtils = { yield conn.executeCached(QUERY_STR, { url: spec }, aRow => { if (abort) throw StopIteration; - itemIds.push(aRow.getResultByIndex(0)); + itemIds.push(aRow.getResultByIndex(0)); }); if (!abort) aCallback(itemIds, aURI); @@ -2623,8 +2623,8 @@ BaseTransaction.prototype = { /** - * Transaction for performing several Places Transactions in a single batch. - * + * Transaction for performing several Places Transactions in a single batch. + * * @param aName * title of the aggregate transactions * @param aTransactions @@ -2732,7 +2732,7 @@ PlacesCreateFolderTransaction.prototype = { __proto__: BaseTransaction.prototype, doTransaction: function CFTXN_doTransaction() - { + { this.item.id = PlacesUtils.bookmarks.createFolder(this.item.parentId, this.item.title, this.item.index); @@ -2827,7 +2827,7 @@ PlacesCreateBookmarkTransaction.prototype = { } if (this.item.annotations && this.item.annotations.length > 0) PlacesUtils.setAnnotationsForItem(this.item.id, this.item.annotations); - + if (this.childTransactions && this.childTransactions.length > 0) { // Set the new item id into child transactions. for (let i = 0; i < this.childTransactions.length; ++i) { @@ -3280,7 +3280,7 @@ PlacesEditBookmarkURITransaction.prototype = { undoTransaction: function EBUTXN_undoTransaction() { PlacesUtils.bookmarks.changeBookmarkURI(this.item.id, this.item.uri); - // move tags from new URI to old URI + // move tags from new URI to old URI if (this.item.tags.length > 0) { // only untag the new URI if this is the only bookmark if (PlacesUtils.getBookmarksForURI(this.new.uri, {}).length == 0) @@ -3499,7 +3499,7 @@ PlacesEditBookmarkPostDataTransaction.prototype = { * @param aItemId * id of the item to edit * @param aNewDateAdded - * new date added for the item + * new date added for the item * * @return nsITransaction object */ @@ -3538,7 +3538,7 @@ PlacesEditItemDateAddedTransaction.prototype = { * @param aItemId * id of the item to edit * @param aNewLastModified - * new last modified date for the item + * new last modified date for the item * * @return nsITransaction object */ @@ -3586,7 +3586,7 @@ PlacesEditItemLastModifiedTransaction.prototype = { this.PlacesSortFolderByNameTransaction = function PlacesSortFolderByNameTransaction(aFolderId) { - this.item = new TransactionItemCache(); + this.item = new TransactionItemCache(); this.item.id = aFolderId; } @@ -3602,7 +3602,7 @@ PlacesSortFolderByNameTransaction.prototype = { let count = contents.childCount; // sort between separators - let newOrder = []; + let newOrder = []; let preSep = []; // temporary array for sorting each group of items let sortingMethod = function (a, b) { diff --git a/toolkit/components/places/nsTaggingService.js b/toolkit/components/places/nsTaggingService.js index d0445961b9cc..d6a940049d45 100644 --- a/toolkit/components/places/nsTaggingService.js +++ b/toolkit/components/places/nsTaggingService.js @@ -308,7 +308,7 @@ TaggingService.prototype = { return tags; }, - __tagFolders: null, + __tagFolders: null, get _tagFolders() { if (!this.__tagFolders) { this.__tagFolders = []; @@ -482,7 +482,7 @@ function TagAutoCompleteResult(searchString, searchResult, } TagAutoCompleteResult.prototype = { - + /** * The original search string */ @@ -595,7 +595,7 @@ function TagAutoCompleteSearch() { } TagAutoCompleteSearch.prototype = { - _stopped : false, + _stopped : false, /* * Search for a given string and notify a listener (either synchronously @@ -613,10 +613,10 @@ TagAutoCompleteSearch.prototype = { this._stopped = false; // only search on characters for the last tag - var index = Math.max(searchString.lastIndexOf(","), + var index = Math.max(searchString.lastIndexOf(","), searchString.lastIndexOf(";")); - var before = ''; - if (index != -1) { + var before = ''; + if (index != -1) { before = searchString.slice(0, index+1); searchString = searchString.slice(index+1); // skip past whitespace @@ -633,7 +633,7 @@ TagAutoCompleteSearch.prototype = { listener.onSearchResult(self, newResult); return; } - + var self = this; // generator: if yields true, not done function* doSearch() { @@ -648,7 +648,7 @@ TagAutoCompleteSearch.prototype = { results.push(before + searchResults[i]); comments.push(searchResults[i]); } - + ++i; /* TODO: bug 481451 @@ -679,7 +679,7 @@ TagAutoCompleteSearch.prototype = { listener.onSearchResult(self, newResult); yield false; } - + // chunk the search results via the generator var gen = doSearch(); while (gen.next().value); diff --git a/toolkit/components/places/tests/autocomplete/test_match_beginning.js b/toolkit/components/places/tests/autocomplete/test_match_beginning.js index fba47d852e99..e363e90feed6 100644 --- a/toolkit/components/places/tests/autocomplete/test_match_beginning.js +++ b/toolkit/components/places/tests/autocomplete/test_match_beginning.js @@ -33,7 +33,7 @@ var gTests = [ "x", [0]], ["3: Match at the beginning of urls", "y", [1]], - + // Tests after this one will match against word boundaries and anywhere ["4: Sanity check that matching anywhere finds more", "a", [0,1], diff --git a/toolkit/components/places/tests/bookmarks/test_384228.js b/toolkit/components/places/tests/bookmarks/test_384228.js index f4bcc63bc12f..8b7c95a84cb8 100644 --- a/toolkit/components/places/tests/bookmarks/test_384228.js +++ b/toolkit/components/places/tests/bookmarks/test_384228.js @@ -16,7 +16,7 @@ try { var histsvc = Cc["@mozilla.org/browser/nav-history-service;1"].getService(Ci.nsINavHistoryService); } catch(ex) { do_throw("Could not get history service\n"); -} +} // get bookmarks root id var root = bmsvc.bookmarksMenuFolder; diff --git a/toolkit/components/places/tests/bookmarks/test_385829.js b/toolkit/components/places/tests/bookmarks/test_385829.js index 28b7be054671..383943285eda 100644 --- a/toolkit/components/places/tests/bookmarks/test_385829.js +++ b/toolkit/components/places/tests/bookmarks/test_385829.js @@ -16,7 +16,7 @@ try { var histsvc = Cc["@mozilla.org/browser/nav-history-service;1"].getService(Ci.nsINavHistoryService); } catch(ex) { do_throw("Could not get history service\n"); -} +} // get bookmarks root id var root = bmsvc.bookmarksMenuFolder; diff --git a/toolkit/components/places/tests/bookmarks/test_388695.js b/toolkit/components/places/tests/bookmarks/test_388695.js index 323d6ea96a88..d93ed5a1e605 100644 --- a/toolkit/components/places/tests/bookmarks/test_388695.js +++ b/toolkit/components/places/tests/bookmarks/test_388695.js @@ -35,7 +35,7 @@ function run_test() { } function phase2() { - gItemId2 = bmsvc.insertBookmark(gTestRoot, gURI, bmsvc.DEFAULT_INDEX, ""); + gItemId2 = bmsvc.insertBookmark(gTestRoot, gURI, bmsvc.DEFAULT_INDEX, ""); var b = bmsvc.getBookmarkIdsForURI(gURI); do_check_eq(b[0], gItemId2); do_check_eq(b[1], gItemId1); diff --git a/toolkit/components/places/tests/bookmarks/test_395101.js b/toolkit/components/places/tests/bookmarks/test_395101.js index 955fabc3f82b..290ebf85255a 100644 --- a/toolkit/components/places/tests/bookmarks/test_395101.js +++ b/toolkit/components/places/tests/bookmarks/test_395101.js @@ -16,7 +16,7 @@ try { var histsvc = Cc["@mozilla.org/browser/nav-history-service;1"].getService(Ci.nsINavHistoryService); } catch(ex) { do_throw("Could not get history service\n"); -} +} // Get tagging service try { diff --git a/toolkit/components/places/tests/bookmarks/test_405938_restore_queries.js b/toolkit/components/places/tests/bookmarks/test_405938_restore_queries.js index ef134d209032..e317cc2e9e3d 100644 --- a/toolkit/components/places/tests/bookmarks/test_405938_restore_queries.js +++ b/toolkit/components/places/tests/bookmarks/test_405938_restore_queries.js @@ -53,10 +53,10 @@ var test = { // create test folders each with a bookmark for (var i = 0; i < this._count; i++) { - var folderId = + var folderId = PlacesUtils.bookmarks.createFolder(this._testRootId, "folder" + i, DEFAULT_INDEX); this._folderIds.push(folderId) - + var bookmarkURI = uri("http://" + i); PlacesUtils.bookmarks.insertBookmark(folderId, bookmarkURI, DEFAULT_INDEX, "bookmark" + i); diff --git a/toolkit/components/places/tests/bookmarks/test_417228-exclude-from-backup.js b/toolkit/components/places/tests/bookmarks/test_417228-exclude-from-backup.js index 5957db512be2..85d392f2a6ce 100644 --- a/toolkit/components/places/tests/bookmarks/test_417228-exclude-from-backup.js +++ b/toolkit/components/places/tests/bookmarks/test_417228-exclude-from-backup.js @@ -52,7 +52,7 @@ var test = { EXCLUDE_FROM_BACKUP_ANNO, 1, 0, PlacesUtils.annotations.EXPIRE_NEVER); - // create a root to be exclude + // create a root to be exclude this._excludeRootTitle = "exclude root"; this._excludeRootId = PlacesUtils.bookmarks .createFolder(PlacesUtils.placesRootId, diff --git a/toolkit/components/places/tests/bookmarks/test_424958-json-quoted-folders.js b/toolkit/components/places/tests/bookmarks/test_424958-json-quoted-folders.js index 4884f7661043..7da1146cfc94 100644 --- a/toolkit/components/places/tests/bookmarks/test_424958-json-quoted-folders.js +++ b/toolkit/components/places/tests/bookmarks/test_424958-json-quoted-folders.js @@ -24,7 +24,7 @@ var quotesTest = { _folderId: null, populate: function () { - this._folderId = + this._folderId = PlacesUtils.bookmarks.createFolder(PlacesUtils.toolbarFolderId, this._folderTitle, PlacesUtils.bookmarks.DEFAULT_INDEX); diff --git a/toolkit/components/places/tests/bookmarks/test_448584.js b/toolkit/components/places/tests/bookmarks/test_448584.js index 5416b4e48aa4..4d9c62fe55c5 100644 --- a/toolkit/components/places/tests/bookmarks/test_448584.js +++ b/toolkit/components/places/tests/bookmarks/test_448584.js @@ -32,7 +32,7 @@ var invalidURITest = { PlacesUtils.bookmarks.DEFAULT_INDEX, this._itemTitle); // this bookmark will go corrupt - this._itemId = + this._itemId = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.toolbarFolderId, PlacesUtils._uri(this._itemUrl), PlacesUtils.bookmarks.DEFAULT_INDEX, diff --git a/toolkit/components/places/tests/bookmarks/test_818584-discard-duplicate-backups.js b/toolkit/components/places/tests/bookmarks/test_818584-discard-duplicate-backups.js index 189c4f4e9bc5..c88323478f3d 100644 --- a/toolkit/components/places/tests/bookmarks/test_818584-discard-duplicate-backups.js +++ b/toolkit/components/places/tests/bookmarks/test_818584-discard-duplicate-backups.js @@ -31,7 +31,7 @@ add_task(function*() { // Get the hash of the generated backup let backupFiles = yield PlacesBackups.getBackupFiles(); do_check_eq(backupFiles.length, 1); - + let matches = OS.Path.basename(backupFiles[0]).match(PlacesBackups.filenamesRegex); do_check_eq(matches[1], PlacesBackups.toISODateString(new Date())); do_check_eq(matches[2], count); diff --git a/toolkit/components/places/tests/bookmarks/test_997030-bookmarks-html-encode.js b/toolkit/components/places/tests/bookmarks/test_997030-bookmarks-html-encode.js index 201a3c817d1e..b900887b56f9 100644 --- a/toolkit/components/places/tests/bookmarks/test_997030-bookmarks-html-encode.js +++ b/toolkit/components/places/tests/bookmarks/test_997030-bookmarks-html-encode.js @@ -5,7 +5,7 @@ /** * Checks that we don't encodeURI twice when creating bookmarks.html. */ - + function run_test() { run_next_test(); } diff --git a/toolkit/components/places/tests/bookmarks/test_bmindex.js b/toolkit/components/places/tests/bookmarks/test_bmindex.js index cdc2550d1943..c764e431004b 100644 --- a/toolkit/components/places/tests/bookmarks/test_bmindex.js +++ b/toolkit/components/places/tests/bookmarks/test_bmindex.js @@ -107,7 +107,7 @@ function run_test() { if (newIndex >= -1) do_throw("Moving an item to a valid index should not throw\n"); } - + } check_contiguous_indexes(bookmarks); diff --git a/toolkit/components/places/tests/bookmarks/test_bookmarks_fetch.js b/toolkit/components/places/tests/bookmarks/test_bookmarks_fetch.js index 1050da6a5f7e..9527f02e61d6 100644 --- a/toolkit/components/places/tests/bookmarks/test_bookmarks_fetch.js +++ b/toolkit/components/places/tests/bookmarks/test_bookmarks_fetch.js @@ -177,7 +177,7 @@ add_task(function* fetch_separator() { Assert.ok(!("url" in bm2)); Assert.ok(!("title" in bm2)); - yield PlacesUtils.bookmarks.remove(bm1.guid); + yield PlacesUtils.bookmarks.remove(bm1.guid); }); add_task(function* fetch_byposition_nonexisting_parentGuid() { diff --git a/toolkit/components/places/tests/browser/browser_bug680727.js b/toolkit/components/places/tests/browser/browser_bug680727.js index c41c77d9ea3b..112b20a5afaf 100644 --- a/toolkit/components/places/tests/browser/browser_bug680727.js +++ b/toolkit/components/places/tests/browser/browser_bug680727.js @@ -8,7 +8,7 @@ const kUniqueURI = Services.io.newURI("http://mochi.test:8888/#bug_680727", null, null); -var gAsyncHistory = +var gAsyncHistory = Cc["@mozilla.org/browser/history;1"].getService(Ci.mozIAsyncHistory); var proxyPrefValue; @@ -87,7 +87,7 @@ function reloadListener() { ok(!Services.io.offline, "Services.io.offline is false."); // This is not an error page. - is(gBrowser.contentDocument.documentURI, kUniqueURI.spec, + is(gBrowser.contentDocument.documentURI, kUniqueURI.spec, "Document URI is not the offline-error page, but the original URI."); // Check if global history remembers the successfully-requested URI. diff --git a/toolkit/components/places/tests/history/test_remove.js b/toolkit/components/places/tests/history/test_remove.js index 7046c7d2c3bb..e8ff77632fde 100644 --- a/toolkit/components/places/tests/history/test_remove.js +++ b/toolkit/components/places/tests/history/test_remove.js @@ -274,7 +274,7 @@ add_task(function* test_remove_many() { add_task(function* cleanup() { yield PlacesTestUtils.clearHistory(); - yield PlacesUtils.bookmarks.eraseEverything(); + yield PlacesUtils.bookmarks.eraseEverything(); }); // Test the various error cases diff --git a/toolkit/components/places/tests/queries/test_415716.js b/toolkit/components/places/tests/queries/test_415716.js index be06ea2b4e77..d3d9879f3acd 100644 --- a/toolkit/components/places/tests/queries/test_415716.js +++ b/toolkit/components/places/tests/queries/test_415716.js @@ -75,7 +75,7 @@ add_task(function* test_buildTestDatabase() * Annotation == "moz-test-places/testing123" && * TimeRange == "now() - 2d" && * minVisits == 2 && - * maxVisits == 10 + * maxVisits == 10 */ add_task(function test_execute() { diff --git a/toolkit/components/places/tests/queries/test_onlyBookmarked.js b/toolkit/components/places/tests/queries/test_onlyBookmarked.js index 431702bc9e00..380c709b6229 100644 --- a/toolkit/components/places/tests/queries/test_onlyBookmarked.js +++ b/toolkit/components/places/tests/queries/test_onlyBookmarked.js @@ -57,7 +57,7 @@ add_task(function* test_onlyBookmarked() var query = PlacesUtils.history.getNewQuery(); query.setFolders([PlacesUtils.toolbarFolderId], 1); query.onlyBookmarked = true; - + // query options var options = PlacesUtils.history.getNewQueryOptions(); options.queryType = options.QUERY_TYPE_HISTORY; @@ -66,7 +66,7 @@ add_task(function* test_onlyBookmarked() var result = PlacesUtils.history.executeQuery(query, options); var root = result.root; root.containerOpen = true; - + // You can use this to compare the data in the array with the result set, // if the array's isInQuery: true items are sorted the same way as the result // set. @@ -77,7 +77,7 @@ add_task(function* test_onlyBookmarked() /* ****************** Test live-update ********************/ - + var liveUpdateTestData = [ //Add a bookmark that should show up { isBookmark: true, @@ -93,7 +93,7 @@ add_task(function* test_onlyBookmarked() index: PlacesUtils.bookmarks.DEFAULT_INDEX, isInQuery: false } ]; - + yield task_populateDB(liveUpdateTestData); // add to the db // add to the test data diff --git a/toolkit/components/places/tests/queries/test_transitions.js b/toolkit/components/places/tests/queries/test_transitions.js index b2d683912388..4092af448dfd 100644 --- a/toolkit/components/places/tests/queries/test_transitions.js +++ b/toolkit/components/places/tests/queries/test_transitions.js @@ -80,7 +80,7 @@ var testData = [ }]; // sets of indices of testData array by transition type var testDataTyped = [0, 5, 7, 9]; -var testDataDownload = [1, 2, 4, 6, 10]; +var testDataDownload = [1, 2, 4, 6, 10]; var testDataBookmark = [3, 8, 11]; /** diff --git a/toolkit/components/places/tests/unit/test_331487.js b/toolkit/components/places/tests/unit/test_331487.js index 22ccd7d14067..cbf30521e0cc 100644 --- a/toolkit/components/places/tests/unit/test_331487.js +++ b/toolkit/components/places/tests/unit/test_331487.js @@ -9,7 +9,7 @@ try { var histsvc = Cc["@mozilla.org/browser/nav-history-service;1"].getService(Ci.nsINavHistoryService); } catch(ex) { do_throw("Could not get history service\n"); -} +} var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"]. getService(Ci.nsINavBookmarksService); @@ -88,7 +88,7 @@ function run_test() { root.containerOpen = false; // XXX TODO - // test that if we have: more than one query, + // test that if we have: more than one query, // multiple folders, a begin time, an end time, a domain, a uri // or a search term, that we get the (correct) flat list results // (like we do when specified maxResults) diff --git a/toolkit/components/places/tests/unit/test_384370.js b/toolkit/components/places/tests/unit/test_384370.js index ce168e3f45cb..ec6f43683e85 100644 --- a/toolkit/components/places/tests/unit/test_384370.js +++ b/toolkit/components/places/tests/unit/test_384370.js @@ -128,7 +128,7 @@ function* testToolbarBookmarks() { // child count (add 2 for pre-existing items) Assert.equal(root.childCount, bookmarkData.length + 2); - + let livemarkNode = root.getChild(1); Assert.equal("Latest Headlines", livemarkNode.title); diff --git a/toolkit/components/places/tests/unit/test_385397.js b/toolkit/components/places/tests/unit/test_385397.js index 9b68d5cf308a..0bde8d0fcd87 100644 --- a/toolkit/components/places/tests/unit/test_385397.js +++ b/toolkit/components/places/tests/unit/test_385397.js @@ -80,7 +80,7 @@ add_task(function* test_execute() root.containerOpen = true; cc = root.childCount; // 2 * TOTAL_SITES because we count the TYPED and LINK, but not EMBED or FRAMED - do_check_eq(cc, 2 * TOTAL_SITES); + do_check_eq(cc, 2 * TOTAL_SITES); for (let i=0; i < TOTAL_SITES; i++) { let index = i * 2; let node = root.getChild(index); diff --git a/toolkit/components/places/tests/unit/test_408221.js b/toolkit/components/places/tests/unit/test_408221.js index 235268cc22b2..1c1b671bff54 100644 --- a/toolkit/components/places/tests/unit/test_408221.js +++ b/toolkit/components/places/tests/unit/test_408221.js @@ -10,31 +10,31 @@ function AutoCompleteInput(aSearches) { this.searches = aSearches; } AutoCompleteInput.prototype = { - constructor: AutoCompleteInput, + constructor: AutoCompleteInput, searches: null, - + minResultsForPopup: 0, timeout: 10, searchParam: "", textValue: "", - disableAutoComplete: false, + disableAutoComplete: false, completeDefaultIndex: false, - + get searchCount() { return this.searches.length; }, - + getSearchAt: function(aIndex) { return this.searches[aIndex]; }, - + onSearchBegin: function() {}, onSearchComplete: function() {}, - - popupOpen: false, - - popup: { + + popupOpen: false, + + popup: { setSelectedIndex: function(aIndex) {}, invalidate: function() {}, @@ -45,9 +45,9 @@ AutoCompleteInput.prototype = { return this; throw Components.results.NS_ERROR_NO_INTERFACE; - } + } }, - + // nsISupports implementation QueryInterface: function(iid) { if (iid.equals(Ci.nsISupports) || @@ -69,8 +69,8 @@ try { function ensure_tag_results(uris, searchTerm) { var controller = Components.classes["@mozilla.org/autocomplete/controller;1"]. - getService(Components.interfaces.nsIAutoCompleteController); - + getService(Components.interfaces.nsIAutoCompleteController); + // Make an AutoCompleteInput that uses our searches // and confirms results on search complete var input = new AutoCompleteInput(["history"]); @@ -88,7 +88,7 @@ function ensure_tag_results(uris, searchTerm) input.onSearchComplete = function() { do_check_eq(numSearchesStarted, 1); - do_check_eq(controller.searchStatus, + do_check_eq(controller.searchStatus, Ci.nsIAutoCompleteController.STATUS_COMPLETE_MATCH); do_check_eq(controller.matchCount, uris.length); let vals = []; @@ -99,7 +99,7 @@ function ensure_tag_results(uris, searchTerm) } // Sort the results then check if we have the right items vals.sort().forEach((val, i) => do_check_eq(val, uris[i].spec)) - + if (current_test < (tests.length - 1)) { current_test++; tests[current_test](); @@ -117,9 +117,9 @@ var uri3 = uri("http://site.tld/3"); var uri4 = uri("http://site.tld/4"); var uri5 = uri("http://site.tld/5"); var uri6 = uri("http://site.tld/6"); - -var tests = [function() { ensure_tag_results([uri1, uri2, uri3], "foo"); }, - function() { ensure_tag_results([uri1, uri2, uri3], "Foo"); }, + +var tests = [function() { ensure_tag_results([uri1, uri2, uri3], "foo"); }, + function() { ensure_tag_results([uri1, uri2, uri3], "Foo"); }, function() { ensure_tag_results([uri1, uri2, uri3], "foO"); }, function() { ensure_tag_results([uri4, uri5, uri6], "bar mud"); }, function() { ensure_tag_results([uri4, uri5, uri6], "BAR MUD"); }, @@ -141,7 +141,7 @@ function tagURI(aURI, aTags) { tagssvc.tagURI(aURI, aTags); } -/** +/** * Test bug #408221 */ function run_test() { diff --git a/toolkit/components/places/tests/unit/test_413784.js b/toolkit/components/places/tests/unit/test_413784.js index 9efb5bae00d6..c26afd016a61 100644 --- a/toolkit/components/places/tests/unit/test_413784.js +++ b/toolkit/components/places/tests/unit/test_413784.js @@ -29,7 +29,7 @@ function AutoCompleteInput(aSearches) { } AutoCompleteInput.prototype = { - constructor: AutoCompleteInput, + constructor: AutoCompleteInput, searches: null, @@ -37,7 +37,7 @@ AutoCompleteInput.prototype = { timeout: 10, searchParam: "", textValue: "", - disableAutoComplete: false, + disableAutoComplete: false, completeDefaultIndex: false, get searchCount() { diff --git a/toolkit/components/places/tests/unit/test_419792_node_tags_property.js b/toolkit/components/places/tests/unit/test_419792_node_tags_property.js index 0603afa7c633..4c726d667293 100644 --- a/toolkit/components/places/tests/unit/test_419792_node_tags_property.js +++ b/toolkit/components/places/tests/unit/test_419792_node_tags_property.js @@ -31,7 +31,7 @@ function run_test() { do_check_eq(node.itemId, bookmarkId); // confirm there's no tags via the .tags property - do_check_eq(node.tags, null); + do_check_eq(node.tags, null); // add a tag tagssvc.tagURI(bookmarkURI, ["foo"]); @@ -43,7 +43,7 @@ function run_test() { // remove the tags, confirming the property is cleared tagssvc.untagURI(bookmarkURI, null); - do_check_eq(node.tags, null); + do_check_eq(node.tags, null); toolbarNode.containerOpen = false; } diff --git a/toolkit/components/places/tests/unit/test_429505_remove_shortcuts.js b/toolkit/components/places/tests/unit/test_429505_remove_shortcuts.js index c0567c3f73d9..e0b6be64cd72 100644 --- a/toolkit/components/places/tests/unit/test_429505_remove_shortcuts.js +++ b/toolkit/components/places/tests/unit/test_429505_remove_shortcuts.js @@ -16,13 +16,13 @@ function run_test() { const IDX = PlacesUtils.bookmarks.DEFAULT_INDEX; - var folderId = + var folderId = PlacesUtils.bookmarks.createFolder(PlacesUtils.toolbarFolderId, "", IDX); var queryId = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.toolbarFolderId, uri("place:folder=" + folderId), IDX, ""); - + var root = PlacesUtils.getFolderContents(PlacesUtils.toolbarFolderId, false, true).root; var oldCount = root.childCount; diff --git a/toolkit/components/places/tests/unit/test_PlacesUtils_lazyobservers.js b/toolkit/components/places/tests/unit/test_PlacesUtils_lazyobservers.js index 5398db58552f..f0e9c5517aaf 100644 --- a/toolkit/components/places/tests/unit/test_PlacesUtils_lazyobservers.js +++ b/toolkit/components/places/tests/unit/test_PlacesUtils_lazyobservers.js @@ -3,7 +3,7 @@ function run_test() { do_test_pending(); - + const TEST_URI = NetUtil.newURI("http://moz.org/") let observer = { QueryInterface: XPCOMUtils.generateQI([ diff --git a/toolkit/components/places/tests/unit/test_adaptive_bug527311.js b/toolkit/components/places/tests/unit/test_adaptive_bug527311.js index 386282030fc1..c392b10a76c3 100644 --- a/toolkit/components/places/tests/unit/test_adaptive_bug527311.js +++ b/toolkit/components/places/tests/unit/test_adaptive_bug527311.js @@ -128,7 +128,7 @@ function run_test() { do_test_pending(); // Add a bookmark to our url. - bs.insertBookmark(bs.unfiledBookmarksFolder, uri(TEST_URL), + bs.insertBookmark(bs.unfiledBookmarksFolder, uri(TEST_URL), bs.DEFAULT_INDEX, "test_book"); // We want to search only history. for (let type of SUGGEST_TYPES) { diff --git a/toolkit/components/places/tests/unit/test_async_history_api.js b/toolkit/components/places/tests/unit/test_async_history_api.js index 738973656943..34b693716924 100644 --- a/toolkit/components/places/tests/unit/test_async_history_api.js +++ b/toolkit/components/places/tests/unit/test_async_history_api.js @@ -108,7 +108,7 @@ VisitObserver.prototype = { { do_print("onVisit(" + aURI.spec + ", " + aVisitId + ", " + aTime + ", " + aSessionId + ", " + aReferringId + ", " + - aTransitionType + ", " + aGUID + ")"); + aTransitionType + ", " + aGUID + ")"); if (!this.uri.equals(aURI) || this.guid != aGUID) { return; } diff --git a/toolkit/components/places/tests/unit/test_bookmark_catobs.js b/toolkit/components/places/tests/unit/test_bookmark_catobs.js index 90e074ebf868..e2b589090f2c 100644 --- a/toolkit/components/places/tests/unit/test_bookmark_catobs.js +++ b/toolkit/components/places/tests/unit/test_bookmark_catobs.js @@ -23,7 +23,7 @@ add_task(function* test_observers() { let initialObservers = PlacesUtils.bookmarks.getObservers(); // Add a common observer, it should be invoked after the category observer. - let notificationsPromised = new Promise((resolve, reject) => { + let notificationsPromised = new Promise((resolve, reject) => { PlacesUtils.bookmarks.addObserver( { __proto__: NavBookmarkObserver.prototype, onItemAdded() { diff --git a/toolkit/components/places/tests/unit/test_bookmarks_html_import_tags.js b/toolkit/components/places/tests/unit/test_bookmarks_html_import_tags.js index 18c133dc56b9..e4ba433a3480 100644 --- a/toolkit/components/places/tests/unit/test_bookmarks_html_import_tags.js +++ b/toolkit/components/places/tests/unit/test_bookmarks_html_import_tags.js @@ -28,7 +28,7 @@ add_task(function* test_import_tags() { // Adds bookmarks and tags to the database. let bookmarkList = new Set(); for (let { uri, title, tags } of bookmarkData) { - bookmarkList.add(yield PlacesUtils.bookmarks.insert({ + bookmarkList.add(yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid, url: uri, title })); diff --git a/toolkit/components/places/tests/unit/test_frecency.js b/toolkit/components/places/tests/unit/test_frecency.js index 3c09bb65d727..756d06394b25 100644 --- a/toolkit/components/places/tests/unit/test_frecency.js +++ b/toolkit/components/places/tests/unit/test_frecency.js @@ -120,7 +120,7 @@ try { getService(Ci.nsINavBookmarksService); } catch(ex) { do_throw("Could not get history service\n"); -} +} function* task_setCountDate(aURI, aCount, aDate) { diff --git a/toolkit/components/places/tests/unit/test_history.js b/toolkit/components/places/tests/unit/test_history.js index b7bf5f36ba21..3fef2d5817b4 100644 --- a/toolkit/components/places/tests/unit/test_history.js +++ b/toolkit/components/places/tests/unit/test_history.js @@ -124,7 +124,7 @@ add_task(function* test_execute() result.root.containerOpen = true; do_check_eq(result.root.childCount, 2); result.root.containerOpen = false; - + // test annotation-based queries var annos = Cc["@mozilla.org/browser/annotation-service;1"]. getService(Ci.nsIAnnotationService); diff --git a/toolkit/components/places/tests/unit/test_history_autocomplete_tags.js b/toolkit/components/places/tests/unit/test_history_autocomplete_tags.js index 1d4ecbc992c3..e43b416dfc84 100644 --- a/toolkit/components/places/tests/unit/test_history_autocomplete_tags.js +++ b/toolkit/components/places/tests/unit/test_history_autocomplete_tags.js @@ -10,31 +10,31 @@ function AutoCompleteInput(aSearches) { this.searches = aSearches; } AutoCompleteInput.prototype = { - constructor: AutoCompleteInput, + constructor: AutoCompleteInput, searches: null, - + minResultsForPopup: 0, timeout: 10, searchParam: "", textValue: "", - disableAutoComplete: false, + disableAutoComplete: false, completeDefaultIndex: false, - + get searchCount() { return this.searches.length; }, - + getSearchAt: function(aIndex) { return this.searches[aIndex]; }, - + onSearchBegin: function() {}, onSearchComplete: function() {}, - - popupOpen: false, - - popup: { + + popupOpen: false, + + popup: { setSelectedIndex: function(aIndex) {}, invalidate: function() {}, @@ -45,9 +45,9 @@ AutoCompleteInput.prototype = { return this; throw Components.results.NS_ERROR_NO_INTERFACE; - } + } }, - + // nsISupports implementation QueryInterface: function(iid) { if (iid.equals(Ci.nsISupports) || @@ -70,8 +70,8 @@ function ensure_tag_results(uris, searchTerm) { print("Searching for '" + searchTerm + "'"); var controller = Components.classes["@mozilla.org/autocomplete/controller;1"]. - getService(Components.interfaces.nsIAutoCompleteController); - + getService(Components.interfaces.nsIAutoCompleteController); + // Make an AutoCompleteInput that uses our searches // and confirms results on search complete var input = new AutoCompleteInput(["history"]); @@ -89,7 +89,7 @@ function ensure_tag_results(uris, searchTerm) input.onSearchComplete = function() { do_check_eq(numSearchesStarted, 1); - do_check_eq(controller.searchStatus, + do_check_eq(controller.searchStatus, uris.length ? Ci.nsIAutoCompleteController.STATUS_COMPLETE_MATCH : Ci.nsIAutoCompleteController.STATUS_COMPLETE_NO_MATCH); @@ -102,7 +102,7 @@ function ensure_tag_results(uris, searchTerm) } // Sort the results then check if we have the right items vals.sort().forEach((val, i) => do_check_eq(val, uris[i].spec)) - + if (current_test < (tests.length - 1)) { current_test++; tests[current_test](); @@ -120,7 +120,7 @@ var uri3 = uri("http://site.tld/3/aaa"); var uri4 = uri("http://site.tld/4/bbb"); var uri5 = uri("http://site.tld/5/aaa"); var uri6 = uri("http://site.tld/6/bbb"); - + var tests = [ () => ensure_tag_results([uri1, uri4, uri6], "foo"), () => ensure_tag_results([uri1], "foo aaa"), @@ -164,7 +164,7 @@ function tagURI(aURI, aTags) { tagssvc.tagURI(aURI, aTags); } -/** +/** * Test history autocomplete */ function run_test() { diff --git a/toolkit/components/places/tests/unit/test_history_sidebar.js b/toolkit/components/places/tests/unit/test_history_sidebar.js index d73ec4adefc7..63aa9af99238 100644 --- a/toolkit/components/places/tests/unit/test_history_sidebar.js +++ b/toolkit/components/places/tests/unit/test_history_sidebar.js @@ -438,7 +438,7 @@ add_task(function* test_history_sidebar() yield task_test_date_liveupdate(Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_QUERY); // The remaining views are - // RESULTS_AS_URI + SORT_BY_VISITCOUNT_DESCENDING + // RESULTS_AS_URI + SORT_BY_VISITCOUNT_DESCENDING // -> test_399266.js // RESULTS_AS_URI + SORT_BY_DATE_DESCENDING // -> test_385397.js diff --git a/toolkit/components/places/tests/unit/test_isvisited.js b/toolkit/components/places/tests/unit/test_isvisited.js index 4f1e9020f1bd..49281f7d510a 100644 --- a/toolkit/components/places/tests/unit/test_isvisited.js +++ b/toolkit/components/places/tests/unit/test_isvisited.js @@ -13,12 +13,12 @@ add_task(function* test_execute() { var referrer = uri("about:blank"); - // add a http:// uri + // add a http:// uri var uri1 = uri("http://mozilla.com"); yield PlacesTestUtils.addVisits({uri: uri1, referrer: referrer}); do_check_guid_for_uri(uri1); do_check_true(yield promiseIsURIVisited(uri1)); - + // add a https:// uri var uri2 = uri("https://etrade.com"); yield PlacesTestUtils.addVisits({uri: uri2, referrer: referrer}); diff --git a/toolkit/components/places/tests/unit/test_keywords.js b/toolkit/components/places/tests/unit/test_keywords.js index 9e3d181a93eb..27ba31084c49 100644 --- a/toolkit/components/places/tests/unit/test_keywords.js +++ b/toolkit/components/places/tests/unit/test_keywords.js @@ -32,7 +32,7 @@ function* promiseKeyword(keyword, expectedHref) { yield new Promise(resolve => do_timeout(100, resolve)); let entry = yield PlacesUtils.keywords.fetch(keyword); if (entry) - href = entry.url.href; + href = entry.url.href; } while (href != expectedHref); } diff --git a/toolkit/components/places/tests/unit/test_placeURIs.js b/toolkit/components/places/tests/unit/test_placeURIs.js index a5780e7de44c..9f54aa489006 100644 --- a/toolkit/components/places/tests/unit/test_placeURIs.js +++ b/toolkit/components/places/tests/unit/test_placeURIs.js @@ -10,7 +10,7 @@ try { var histsvc = Cc["@mozilla.org/browser/nav-history-service;1"].getService(Ci.nsINavHistoryService); } catch(ex) { do_throw("Could not get history service\n"); -} +} // main function run_test() { diff --git a/toolkit/components/places/tests/unit/test_removeVisitsByTimeframe.js b/toolkit/components/places/tests/unit/test_removeVisitsByTimeframe.js index 1194d3b30a48..7cc499558d9a 100644 --- a/toolkit/components/places/tests/unit/test_removeVisitsByTimeframe.js +++ b/toolkit/components/places/tests/unit/test_removeVisitsByTimeframe.js @@ -17,7 +17,7 @@ function* cleanup() { add_task(function* remove_visits_outside_unbookmarked_uri() { do_print("*** TEST: Remove some visits outside valid timeframe from an unbookmarked URI"); - + do_print("Add 10 visits for the URI from way in the past."); let visits = []; for (let i = 0; i < 10; i++) { diff --git a/toolkit/components/places/tests/unit/test_tag_autocomplete_search.js b/toolkit/components/places/tests/unit/test_tag_autocomplete_search.js index 48f363fd1173..6fb467b8a499 100644 --- a/toolkit/components/places/tests/unit/test_tag_autocomplete_search.js +++ b/toolkit/components/places/tests/unit/test_tag_autocomplete_search.js @@ -10,31 +10,31 @@ function AutoCompleteInput(aSearches) { this.searches = aSearches; } AutoCompleteInput.prototype = { - constructor: AutoCompleteInput, + constructor: AutoCompleteInput, searches: null, - + minResultsForPopup: 0, timeout: 10, searchParam: "", textValue: "", - disableAutoComplete: false, + disableAutoComplete: false, completeDefaultIndex: false, - + get searchCount() { return this.searches.length; }, - + getSearchAt: function(aIndex) { return this.searches[aIndex]; }, - + onSearchBegin: function() {}, onSearchComplete: function() {}, - - popupOpen: false, - - popup: { + + popupOpen: false, + + popup: { setSelectedIndex: function(aIndex) {}, invalidate: function() {}, @@ -45,9 +45,9 @@ AutoCompleteInput.prototype = { return this; throw Components.results.NS_ERROR_NO_INTERFACE; - } + } }, - + // nsISupports implementation QueryInterface: function(iid) { if (iid.equals(Ci.nsISupports) || @@ -69,8 +69,8 @@ try { function ensure_tag_results(results, searchTerm) { var controller = Cc["@mozilla.org/autocomplete/controller;1"]. - getService(Ci.nsIAutoCompleteController); - + getService(Ci.nsIAutoCompleteController); + // Make an AutoCompleteInput that uses our searches // and confirms results on search complete var input = new AutoCompleteInput(["places-tag-autocomplete"]); @@ -86,10 +86,10 @@ function ensure_tag_results(results, searchTerm) input.onSearchComplete = function input_onSearchComplete() { do_check_eq(numSearchesStarted, 1); if (results.length) - do_check_eq(controller.searchStatus, + do_check_eq(controller.searchStatus, Ci.nsIAutoCompleteController.STATUS_COMPLETE_MATCH); else - do_check_eq(controller.searchStatus, + do_check_eq(controller.searchStatus, Ci.nsIAutoCompleteController.STATUS_COMPLETE_NO_MATCH); do_check_eq(controller.matchCount, results.length); @@ -111,20 +111,20 @@ function ensure_tag_results(results, searchTerm) } var uri1 = uri("http://site.tld/1"); - + var tests = [ function test1() { ensure_tag_results(["bar", "Baz", "boo"], "b"); }, function test2() { ensure_tag_results(["bar", "Baz"], "ba"); }, function test3() { ensure_tag_results(["bar", "Baz"], "Ba"); }, function test4() { ensure_tag_results(["bar"], "bar"); }, - function test5() { ensure_tag_results(["Baz"], "Baz"); }, - function test6() { ensure_tag_results([], "barb"); }, + function test5() { ensure_tag_results(["Baz"], "Baz"); }, + function test6() { ensure_tag_results([], "barb"); }, function test7() { ensure_tag_results([], "foo"); }, function test8() { ensure_tag_results(["first tag, bar", "first tag, Baz"], "first tag, ba"); }, function test9() { ensure_tag_results(["first tag; bar", "first tag; Baz"], "first tag; ba"); } ]; -/** +/** * Test tag autocomplete */ function run_test() { diff --git a/toolkit/components/places/tests/unit/test_utils_getURLsForContainerNode.js b/toolkit/components/places/tests/unit/test_utils_getURLsForContainerNode.js index 27bc20104606..ecebce94a6de 100644 --- a/toolkit/components/places/tests/unit/test_utils_getURLsForContainerNode.js +++ b/toolkit/components/places/tests/unit/test_utils_getURLsForContainerNode.js @@ -148,7 +148,7 @@ function() { ]; /** - * Executes a query and checks number of uri nodes in the first container in + * Executes a query and checks number of uri nodes in the first container in * query's results. To correctly test a container ensure that the query will * return only your container in the first level. * diff --git a/toolkit/components/printing/content/printPageSetup.js b/toolkit/components/printing/content/printPageSetup.js index da56a03158e8..8b530c0242f3 100644 --- a/toolkit/components/printing/content/printPageSetup.js +++ b/toolkit/components/printing/content/printPageSetup.js @@ -66,12 +66,12 @@ function initDialog() function isListOfPrinterFeaturesAvailable() { var has_printerfeatures = false; - + try { has_printerfeatures = gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".has_special_printerfeatures"); } catch(ex) { } - + return has_printerfeatures; } @@ -91,7 +91,7 @@ function setOrientation() var selection = gDialog.orientation.selectedItem; var style = "background-color:white;"; - if ((selection == gDialog.portrait && gPageWidth > gPageHeight) || + if ((selection == gDialog.portrait && gPageWidth > gPageHeight) || (selection == gDialog.landscape && gPageWidth < gPageHeight)) { // Swap width/height. var temp = gPageHeight; @@ -236,13 +236,13 @@ function setPrinterDefaultsForSelectedPrinter() if (gPrintSettings.printerName == "") { gPrintSettings.printerName = gPrintService.defaultPrinterName; } - - // First get any defaults from the printer + + // First get any defaults from the printer gPrintService.initPrintSettingsFromPrinter(gPrintSettings.printerName, gPrintSettings); // now augment them with any values from last time gPrintService.initPrintSettingsFromPrefs(gPrintSettings, true, gPrintSettingsInterface.kInitSaveAll); - + if (gDoDebug) { dump("pagesetup/setPrinterDefaultsForSelectedPrinter: printerName='"+gPrintSettings.printerName+"', orientation='"+gPrintSettings.orientation+"'\n"); } @@ -259,7 +259,7 @@ function loadDialog() try { gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch); - + gPrintService = Components.classes["@mozilla.org/gfx/printsettings-service;1"]; if (gPrintService) { gPrintService = gPrintService.getService(); diff --git a/toolkit/components/printing/content/printPreviewProgress.js b/toolkit/components/printing/content/printPreviewProgress.js index dc2b61f058c0..42b403e03cc2 100644 --- a/toolkit/components/printing/content/printPreviewProgress.js +++ b/toolkit/components/printing/content/printPreviewProgress.js @@ -8,7 +8,7 @@ var dialog; // the printProgress is a nsIPrintProgress object -var printProgress = null; +var printProgress = null; // random global variables... var targetFile; @@ -28,7 +28,7 @@ function ellipseString(aStr, doFront) if (doFront) return "..." + aStr.substr(aStr.length-fixedLen, fixedLen); - + return aStr.substr(0, fixedLen) + "..."; } @@ -40,7 +40,7 @@ var progressListener = { if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP) window.close(); }, - + onProgressChange: function (aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) { if (!progressParams) @@ -70,7 +70,7 @@ var progressListener = { QueryInterface: function (iid) { if (iid.equals(Components.interfaces.nsIWebProgressListener) || iid.equals(Components.interfaces.nsISupportsWeakReference)) - return this; + return this; throw Components.results.NS_NOINTERFACE; } } @@ -107,7 +107,7 @@ function onLoad() { window.setTimeout(doneIniting, 100); } -function onUnload() +function onUnload() { if (!printProgress) return; @@ -136,19 +136,19 @@ function getString (stringId) { } // If the user presses cancel, tell the app launcher and close the dialog... -function onCancel () +function onCancel () { // Cancel app launcher. try { printProgress.processCanceledByUser = true; } catch(e) {return true;} - + // don't Close up dialog by returning false, the backend will close the dialog when everything will be aborted. return false; } -function doneIniting() +function doneIniting() { // called by function timeout in onLoad printProgress.doneIniting(); diff --git a/toolkit/components/printing/content/printProgress.js b/toolkit/components/printing/content/printProgress.js index 9fc2fe49987b..88660761a679 100644 --- a/toolkit/components/printing/content/printProgress.js +++ b/toolkit/components/printing/content/printProgress.js @@ -8,7 +8,7 @@ var dialog; // the printProgress is a nsIPrintProgress object -var printProgress = null; +var printProgress = null; // random global variables... var targetFile; @@ -47,10 +47,10 @@ var progressListener = { // dialog.progress.setAttribute( "value", 0 ); dialog.progress.setAttribute( "mode", "undetermined" ); } - + if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP) { - // we are done printing + // we are done printing // Indicate completion in title area. var msg = getString( "printComplete" ); dialog.title.setAttribute("value", msg); @@ -84,10 +84,10 @@ var progressListener = { window.close(); } }, - + onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) { - if (switchUI) + if (switchUI) { dialog.tempLabel.setAttribute("hidden", "true"); dialog.progress.setAttribute("hidden", "false"); @@ -118,14 +118,14 @@ var progressListener = { // Calculate percentage. var percent; - if ( aMaxTotalProgress > 0 ) + if ( aMaxTotalProgress > 0 ) { percent = Math.round( (aCurTotalProgress*100)/aMaxTotalProgress ); if ( percent > 100 ) percent = 100; - + dialog.progress.removeAttribute( "mode"); - + // Advance progress meter. dialog.progress.setAttribute( "value", percent ); @@ -133,8 +133,8 @@ var progressListener = { var percentPrint = getString( "progressText" ); percentPrint = replaceInsert( percentPrint, 1, percent ); dialog.progressText.setAttribute("value", percentPrint); - } - else + } + else { // Progress meter should be barber-pole in this case. dialog.progress.setAttribute( "mode", "undetermined" ); @@ -163,7 +163,7 @@ var progressListener = { { if (iid.equals(Components.interfaces.nsIWebProgressListener) || iid.equals(Components.interfaces.nsISupportsWeakReference)) return this; - + throw Components.results.NS_NOINTERFACE; } }; @@ -191,7 +191,7 @@ function getString( stringId ) { return dialog.strings[ stringId ]; } -function loadDialog() +function loadDialog() { } @@ -257,35 +257,35 @@ function onLoad() { window.setTimeout(doneIniting, 500); } -function onUnload() +function onUnload() { if (printProgress) { - try + try { printProgress.unregisterListener(progressListener); printProgress = null; } - + catch( exception ) {} } } // If the user presses cancel, tell the app launcher and close the dialog... -function onCancel () +function onCancel () { // Cancel app launcher. - try + try { printProgress.processCanceledByUser = true; } catch( exception ) {return true;} - + // don't Close up dialog by returning false, the backend will close the dialog when everything will be aborted. return false; } -function doneIniting() +function doneIniting() { printProgress.doneIniting(); } diff --git a/toolkit/components/printing/content/printUtils.js b/toolkit/components/printing/content/printUtils.js index 3eee4314a692..4814056ab980 100644 --- a/toolkit/components/printing/content/printUtils.js +++ b/toolkit/components/printing/content/printUtils.js @@ -427,7 +427,7 @@ var PrintUtils = { if (!aPrintSettings.printerName) aPrintSettings.printerName = aPSSVC.defaultPrinterName; - // First get any defaults from the printer + // First get any defaults from the printer aPSSVC.initPrintSettingsFromPrinter(aPrintSettings.printerName, aPrintSettings); // now augment them with any values from last time aPSSVC.initPrintSettingsFromPrefs(aPrintSettings, true, aPrintSettings.kInitSaveAll); diff --git a/toolkit/components/printing/content/printdialog.js b/toolkit/components/printing/content/printdialog.js index 652aa0264aab..83de33750553 100644 --- a/toolkit/components/printing/content/printdialog.js +++ b/toolkit/components/printing/content/printdialog.js @@ -32,7 +32,7 @@ function initDialog() dialog.topageInput = document.getElementById("topageInput"); dialog.topageLabel = document.getElementById("topageLabel"); - dialog.numCopiesInput = document.getElementById("numCopiesInput"); + dialog.numCopiesInput = document.getElementById("numCopiesInput"); dialog.printframeGroup = document.getElementById("printframeGroup"); dialog.aslaidoutRadio = document.getElementById("aslaidoutRadio"); @@ -86,7 +86,7 @@ function getPrinterDescription(printerName) s = gPrefs.getCharPref("print.printer_" + printerName + ".printer_description") } catch(e) { } - + return s; } @@ -108,9 +108,9 @@ listElement.prototype = } }, - appendPrinterNames: - function (aDataObject) - { + appendPrinterNames: + function (aDataObject) + { if ((null == aDataObject) || !aDataObject.hasMore()) { // disable dialog this.listElement.setAttribute("value", ""); @@ -126,14 +126,14 @@ listElement.prototype = } else { // build popup menu from printer names - var list = document.getElementById("printerList"); + var list = document.getElementById("printerList"); do { printerNameStr = aDataObject.getNext(); list.appendItem(printerNameStr, printerNameStr, getPrinterDescription(printerNameStr)); } while (aDataObject.hasMore()); this.listElement.removeAttribute("disabled"); } - } + } }; //--------------------------------------------------- @@ -163,15 +163,15 @@ function getPrinters() function setPrinterDefaultsForSelectedPrinter() { gPrintSettings.printerName = dialog.printerList.value; - + dialog.descText.value = getPrinterDescription(gPrintSettings.printerName); - - // First get any defaults from the printer + + // First get any defaults from the printer printService.initPrintSettingsFromPrinter(gPrintSettings.printerName, gPrintSettings); - + // now augment them with any values from last time printService.initPrintSettingsFromPrefs(gPrintSettings, true, gPrintSetInterface.kInitSaveAll); - + if (doDebug) { dump("setPrinterDefaultsForSelectedPrinter: printerName='"+gPrintSettings.printerName+"', paperName='"+gPrintSettings.paperName+"'\n"); } @@ -371,7 +371,7 @@ function onAccept() saveToPrefs = gPrefs.getBoolPref("print.save_print_settings"); if (saveToPrefs && printService != null) { - var flags = gPrintSetInterface.kInitSavePaperSize | + var flags = gPrintSetInterface.kInitSavePaperSize | gPrintSetInterface.kInitSaveEdges | gPrintSetInterface.kInitSaveInColor | gPrintSetInterface.kInitSaveShrinkToFit | diff --git a/toolkit/components/printing/content/printjoboptions.js b/toolkit/components/printing/content/printjoboptions.js index 041d1c422444..bf7629fb5676 100644 --- a/toolkit/components/printing/content/printjoboptions.js +++ b/toolkit/components/printing/content/printjoboptions.js @@ -36,12 +36,12 @@ function checkDouble(element, maxVal) function isListOfPrinterFeaturesAvailable() { var has_printerfeatures = false; - + try { has_printerfeatures = gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".has_special_printerfeatures"); } catch(ex) { } - + return has_printerfeatures; } @@ -66,7 +66,7 @@ function initDialog() dialog.jobTitleLabel = document.getElementById("jobTitleLabel"); dialog.jobTitleGroup = document.getElementById("jobTitleGroup"); dialog.jobTitleInput = document.getElementById("jobTitleInput"); - + dialog.colorGroup = document.getElementById("colorGroup"); dialog.colorRadioGroup = document.getElementById("colorRadioGroup"); dialog.colorRadio = document.getElementById("colorRadio"); @@ -100,33 +100,33 @@ paperListElement.prototype = this.paperListElement.removeChild(this.paperListElement.firstChild); }, - appendPaperNames: - function (aDataObject) - { - var popupNode = document.createElement("menupopup"); + appendPaperNames: + function (aDataObject) + { + var popupNode = document.createElement("menupopup"); for (var i=0;iExtra content<\/body>"; function runtest(e) diff --git a/toolkit/components/satchel/test/test_form_autocomplete.html b/toolkit/components/satchel/test/test_form_autocomplete.html index 6299552559db..4a25b5710399 100644 --- a/toolkit/components/satchel/test/test_form_autocomplete.html +++ b/toolkit/components/satchel/test/test_form_autocomplete.html @@ -216,7 +216,7 @@ registerPopupShownListener(popupShownListener); * This is a bit hacky, as many operations happen asynchronously. * Various mechanisms call runTests as a result of operations: * - set expectingPopup to true, and the next test will occur when the autocomplete popup is shown - * - call waitForMenuChange(x) to run the next test when the autocomplete popup to have x items in it + * - call waitForMenuChange(x) to run the next test when the autocomplete popup to have x items in it * - addEntry calls runs the test when an entry has been added * - some tests scroll the window. This is because the form fill controller happens to scroll * the field into view near the end of the search, and there isn't any other good notification diff --git a/toolkit/components/satchel/test/test_form_autocomplete_with_list.html b/toolkit/components/satchel/test/test_form_autocomplete_with_list.html index 7351f9fbfdaa..3014196a8b51 100644 --- a/toolkit/components/satchel/test/test_form_autocomplete_with_list.html +++ b/toolkit/components/satchel/test/test_form_autocomplete_with_list.html @@ -99,7 +99,7 @@ registerPopupShownListener(popupShownListener); * This is a bit hacky, as many operations happen asynchronously. * Various mechanisms call runTests as a result of operations: * - set expectingPopup to true, and the next test will occur when the autocomplete popup is shown -* - call waitForMenuChange(x) to run the next test when the autocomplete popup to have x items in it +* - call waitForMenuChange(x) to run the next test when the autocomplete popup to have x items in it */ function runTest() { testNum++; @@ -168,7 +168,7 @@ function runTest() { restoreForm(); doKey("down"); break; - + case 6: //Delete the first entry (of 3) doKey("down"); diff --git a/toolkit/components/social/WorkerAPI.jsm b/toolkit/components/social/WorkerAPI.jsm index 343fb3e9afca..aef2ca48e465 100644 --- a/toolkit/components/social/WorkerAPI.jsm +++ b/toolkit/components/social/WorkerAPI.jsm @@ -145,7 +145,7 @@ WorkerAPI.prototype = { // action was provided. null, listener, - type); + type); }, } } diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryController.js b/toolkit/components/telemetry/tests/unit/test_TelemetryController.js index fdf4d59e19c6..5671f87f3c86 100644 --- a/toolkit/components/telemetry/tests/unit/test_TelemetryController.js +++ b/toolkit/components/telemetry/tests/unit/test_TelemetryController.js @@ -1,5 +1,5 @@ /* Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ + http://creativecommons.org/publicdomain/zero/1.0/ */ /* This testcase triggers two telemetry pings. * diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryLateWrites.js b/toolkit/components/telemetry/tests/unit/test_TelemetryLateWrites.js index 22fc6092d6db..f2b2b3bba4e9 100644 --- a/toolkit/components/telemetry/tests/unit/test_TelemetryLateWrites.js +++ b/toolkit/components/telemetry/tests/unit/test_TelemetryLateWrites.js @@ -1,5 +1,5 @@ /* Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ + http://creativecommons.org/publicdomain/zero/1.0/ */ /* A testcase to make sure reading late writes stacks works. */ diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryLockCount.js b/toolkit/components/telemetry/tests/unit/test_TelemetryLockCount.js index 77a850fd9098..808f2f3ec981 100644 --- a/toolkit/components/telemetry/tests/unit/test_TelemetryLockCount.js +++ b/toolkit/components/telemetry/tests/unit/test_TelemetryLockCount.js @@ -1,5 +1,5 @@ /* Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ + http://creativecommons.org/publicdomain/zero/1.0/ */ /* A testcase to make sure reading the failed profile lock count works. */ diff --git a/toolkit/components/telemetry/tests/unit/test_nsITelemetry.js b/toolkit/components/telemetry/tests/unit/test_nsITelemetry.js index 06b624e6dfea..e855701b05d1 100644 --- a/toolkit/components/telemetry/tests/unit/test_nsITelemetry.js +++ b/toolkit/components/telemetry/tests/unit/test_nsITelemetry.js @@ -174,7 +174,7 @@ function test_getHistogramById() { Telemetry.getHistogramById("nonexistent"); do_throw("This can't happen"); } catch (e) { - + } var h = Telemetry.getHistogramById("CYCLE_COLLECTOR"); var s = h.snapshot(); diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_storage.js b/toolkit/components/thumbnails/test/browser_thumbnails_storage.js index de9f71bda8d8..972f956e5e29 100644 --- a/toolkit/components/thumbnails/test/browser_thumbnails_storage.js +++ b/toolkit/components/thumbnails/test/browser_thumbnails_storage.js @@ -55,7 +55,7 @@ function* runTests() { info("Attempt to clear file"); // Retry until the file is gone because Windows locks it sometimes. - yield promiseClearFile(file, URL); + yield promiseClearFile(file, URL); info("Done"); }); diff --git a/toolkit/components/timermanager/nsUpdateTimerManager.js b/toolkit/components/timermanager/nsUpdateTimerManager.js index 5a6ef5bf86b7..16b6742e30e2 100644 --- a/toolkit/components/timermanager/nsUpdateTimerManager.js +++ b/toolkit/components/timermanager/nsUpdateTimerManager.js @@ -252,7 +252,7 @@ TimerManager.prototype = { if (skippedFirings) timer.delay = this._timerMinimumDelay; else - timer.delay = Math.max(nextDelay * 1000, this._timerMinimumDelay); + timer.delay = Math.max(nextDelay * 1000, this._timerMinimumDelay); this.lastTimerReset = Date.now(); } else { this._cancelTimer(); @@ -272,7 +272,7 @@ TimerManager.prototype = { Ci.nsITimer.TYPE_REPEATING_SLACK); this.lastTimerReset = Date.now(); } else { - if (Date.now() + interval < this.lastTimerReset + this._timer.delay) + if (Date.now() + interval < this.lastTimerReset + this._timer.delay) this._timer.delay = Math.max(this.lastTimerReset + interval - Date.now(), 0); } }, diff --git a/toolkit/components/viewconfig/content/config.js b/toolkit/components/viewconfig/content/config.js index a4636f844ce4..e46c63b04242 100644 --- a/toolkit/components/viewconfig/content/config.js +++ b/toolkit/components/viewconfig/content/config.js @@ -45,11 +45,11 @@ var view = { getCellText : function(index, col) { if (!(index in gPrefView)) return ""; - + var value = gPrefView[index][col.id]; switch (col.id) { - case "lockCol": + case "lockCol": return gLockStrs[value]; case "typeCol": return gTypeStrs[value]; @@ -361,7 +361,7 @@ function ShowPrefs() } gSortFunction = gSortFunctions[gSortedColumn]; gPrefArray.sort(gSortFunction); - + gPrefBranch.addObserver("", gPrefListener, false); var configTree = document.getElementById("configTree"); @@ -441,7 +441,7 @@ function prefColSortFunction(x, y) { if (x.prefCol > y.prefCol) return gSortDirection; - if (x.prefCol < y.prefCol) + if (x.prefCol < y.prefCol) return -gSortDirection; return 0; } @@ -455,7 +455,7 @@ function lockColSortFunction(x, y) function typeColSortFunction(x, y) { - if (x.typeCol != y.typeCol) + if (x.typeCol != y.typeCol) return gSortDirection * (y.typeCol - x.typeCol); return prefColSortFunction(x, y); } @@ -464,16 +464,16 @@ function valueColSortFunction(x, y) { if (x.valueCol > y.valueCol) return gSortDirection; - if (x.valueCol < y.valueCol) + if (x.valueCol < y.valueCol) return -gSortDirection; return prefColSortFunction(x, y); } const gSortFunctions = { - prefCol: prefColSortFunction, - lockCol: lockColSortFunction, - typeCol: typeColSortFunction, + prefCol: prefColSortFunction, + lockCol: lockColSortFunction, + typeCol: typeColSortFunction, valueCol: valueColSortFunction }; diff --git a/toolkit/content/findUtils.js b/toolkit/content/findUtils.js index 723a90f758b8..397a98f6cbb1 100644 --- a/toolkit/content/findUtils.js +++ b/toolkit/content/findUtils.js @@ -37,7 +37,7 @@ nsFindInstData.prototype = var findInFrames = findInst.QueryInterface(Components.interfaces.nsIWebBrowserFindInFrames); findInFrames.rootSearchFrame = this.rootSearchWindow; findInFrames.currentSearchFrame = this.currentSearchWindow; - + // always search in frames for now. We could add a checkbox to the dialog for this. findInst.searchFrames = true; }, @@ -98,7 +98,7 @@ function findAgainInPage(findInstData, reverse) } // Reset to normal value, otherwise setting can get changed in find dialog - findInst.findBackwards = findService.findBackwards; + findInst.findBackwards = findService.findBackwards; } } diff --git a/toolkit/content/finddialog.js b/toolkit/content/finddialog.js index 4a99c6aad9d0..e2e10ca6ad44 100644 --- a/toolkit/content/finddialog.js +++ b/toolkit/content/finddialog.js @@ -38,7 +38,7 @@ function fillDialog() // get the find service, which stores global find state var findService = Components.classes["@mozilla.org/find/find_service;1"] .getService(Components.interfaces.nsIFindService); - + // Set initial dialog field contents. Use the gFindInst attributes first, // this is necessary for window.find() dialog.findKey.value = gFindInst.searchString ? gFindInst.searchString : findService.searchString; @@ -69,15 +69,15 @@ function onLoad() initDialogObject(); // get the find instance - var arg0 = window.arguments[0]; + var arg0 = window.arguments[0]; // If the dialog was opened from window.find(), // arg0 will be an instance of nsIWebBrowserFind if (arg0 instanceof Components.interfaces.nsIWebBrowserFind) { gFindInst = arg0; - } else { - gFindInstData = arg0; - gFindInst = gFindInstData.webBrowserFind; - } + } else { + gFindInstData = arg0; + gFindInst = gFindInstData.webBrowserFind; + } fillDialog(); doEnabling(); @@ -95,7 +95,7 @@ function onUnload() function onAccept() { if (gFindInstData && gFindInst != gFindInstData.webBrowserFind) { - gFindInstData.init(); + gFindInstData.init(); gFindInst = gFindInstData.webBrowserFind; } @@ -108,7 +108,7 @@ function onAccept() gFindInst.matchCase = dialog.caseSensitive.checked; gFindInst.wrapFind = dialog.wrap.checked; gFindInst.findBackwards = dialog.up.selected; - + // Search. var result = gFindInst.findNext(); @@ -120,7 +120,7 @@ function onAccept() dialog.bundle.getString("notFoundWarning")); dialog.findKey.select(); dialog.findKey.focus(); - } + } return false; } diff --git a/toolkit/content/globalOverlay.js b/toolkit/content/globalOverlay.js index 051a98c43486..1df3d65fc164 100644 --- a/toolkit/content/globalOverlay.js +++ b/toolkit/content/globalOverlay.js @@ -44,13 +44,13 @@ function canQuitApplication(aData) var os = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService); if (!os) return true; - + try { var cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"] .createInstance(Components.interfaces.nsISupportsPRBool); os.notifyObservers(cancelQuit, "quit-application-requested", aData || null); - - // Something aborted the quit process. + + // Something aborted the quit process. if (cancelQuit.data) return false; } diff --git a/toolkit/content/nsDragAndDrop.js b/toolkit/content/nsDragAndDrop.js index 40e96f9d1a2c..d76a5a8a87ba 100644 --- a/toolkit/content/nsDragAndDrop.js +++ b/toolkit/content/nsDragAndDrop.js @@ -15,26 +15,26 @@ //////////////////////////////////////////////////////////////////////// -/** +/** * nsTransferable - a wrapper for nsITransferable that simplifies * javascript clipboard and drag&drop. for use in * these situations you should use the nsClipboard * and nsDragAndDrop wrappers for more convenience - **/ - + **/ + var nsTransferable = { /** * nsITransferable set (TransferData aTransferData) ; * * Creates a transferable with data for a list of supported types ("flavours") - * + * * @param TransferData aTransferData - * a javascript object in the format described above - **/ + * a javascript object in the format described above + **/ set: function (aTransferDataSet) { var trans = this.createTransferable(); - for (var i = 0; i < aTransferDataSet.dataList.length; ++i) + for (var i = 0; i < aTransferDataSet.dataList.length; ++i) { var currData = aTransferDataSet.dataList[i]; var currFlavour = currData.flavour.contentType; @@ -49,7 +49,7 @@ var nsTransferable = { supports.data = currData.supports; length = supports.data.length; } - else + else { // non-string data. supports = currData.supports; @@ -59,9 +59,9 @@ var nsTransferable = { } return trans; }, - + /** - * TransferData/TransferDataSet get (FlavourSet aFlavourSet, + * TransferData/TransferDataSet get (FlavourSet aFlavourSet, * Function aRetrievalFunc, Boolean aAnyFlag) ; * * Retrieves data from the transferable provided in aRetrievalFunc, formatted @@ -79,13 +79,13 @@ var nsTransferable = { **/ get: function (aFlavourSet, aRetrievalFunc, aAnyFlag) { - if (!aRetrievalFunc) + if (!aRetrievalFunc) throw "No data retrieval handler provided!"; - + var supportsArray = aRetrievalFunc(aFlavourSet); var dataArray = []; var count = supportsArray.Count(); - + // Iterate over the number of items returned from aRetrievalFunc. For // clipboard operations, this is 1, for drag and drop (where multiple // items may have been dragged) this could be >1. @@ -94,19 +94,19 @@ var nsTransferable = { var trans = supportsArray.GetElementAt(i); if (!trans) continue; trans = trans.QueryInterface(Components.interfaces.nsITransferable); - + var data = { }; var length = { }; - + var currData = null; if (aAnyFlag) - { + { var flavour = { }; trans.getAnyTransferData(flavour, data, length); if (data && flavour) { var selectedFlavour = aFlavourSet.flavourTable[flavour.value]; - if (selectedFlavour) + if (selectedFlavour) dataArray[i] = FlavourToXfer(data.value, length.value, selectedFlavour); } } @@ -121,11 +121,11 @@ var nsTransferable = { return new TransferDataSet(dataArray); }, - /** + /** * nsITransferable createTransferable (void) ; * * Creates and returns a transferable object. - **/ + **/ createTransferable: function () { const kXferableContractID = "@mozilla.org/widget/transferable;1"; @@ -134,17 +134,17 @@ var nsTransferable = { trans.init(null); return trans; } -}; +}; -/** +/** * A FlavourSet is a simple type that represents a collection of Flavour objects. * FlavourSet is constructed from an array of Flavours, and stores this list as * an array and a hashtable. The rationale for the dual storage is as follows: - * - * Array: Ordering is important when adding data flavours to a transferable. - * Flavours added first are deemed to be 'preferred' by the client. + * + * Array: Ordering is important when adding data flavours to a transferable. + * Flavours added first are deemed to be 'preferred' by the client. * Hash: Convenient lookup of flavour data using the content type (MIME type) - * of data as a key. + * of data as a key. */ function FlavourSet(aFlavourList) { @@ -152,7 +152,7 @@ function FlavourSet(aFlavourList) this.flavourTable = { }; this._XferID = "FlavourSet"; - + for (var i = 0; i < this.flavours.length; ++i) this.flavourTable[this.flavours[i].contentType] = this.flavours[i]; } @@ -166,13 +166,13 @@ FlavourSet.prototype = { } }; -/** - * A Flavour is a simple type that represents a data type that can be handled. +/** + * A Flavour is a simple type that represents a data type that can be handled. * It takes a content type (MIME type) which is used when storing data on the * system clipboard/drag and drop, and an IIDKey (string interface name * which is used to QI data to an appropriate form. The default interface is * assumed to be wide-string. - */ + */ function Flavour(aContentType, aDataIIDKey) { this.contentType = aContentType; @@ -194,9 +194,9 @@ TransferDataBase.prototype = { } }; -/** +/** * TransferDataSet is a list (array) of TransferData objects, which represents - * data dragged from one or more elements. + * data dragged from one or more elements. */ function TransferDataSet(aTransferDataList) { @@ -206,9 +206,9 @@ function TransferDataSet(aTransferDataList) } TransferDataSet.prototype = TransferDataBase.prototype; -/** +/** * TransferData is a list (array) of FlavourData for all the applicable content - * types associated with a drag from a single item. + * types associated with a drag from a single item. */ function TransferData(aFlavourDataList) { @@ -218,29 +218,29 @@ function TransferData(aFlavourDataList) } TransferData.prototype = { __proto__: TransferDataBase.prototype, - + addDataForFlavour: function (aFlavourString, aData, aLength, aDataIIDKey) { - this.dataList.push(new FlavourData(aData, aLength, + this.dataList.push(new FlavourData(aData, aLength, new Flavour(aFlavourString, aDataIIDKey))); } }; -/** - * FlavourData is a type that represents data retrieved from the system +/** + * FlavourData is a type that represents data retrieved from the system * clipboard or drag and drop. It is constructed internally by the Transferable * using the raw (nsISupports) data from the clipboard, the length of the data, * and an object of type Flavour representing the type. Clients implementing * IDragDropObserver receive an object of this type in their implementation of - * onDrop. They access the 'data' property to retrieve data, which is either data - * QI'ed to a usable form, or unicode string. + * onDrop. They access the 'data' property to retrieve data, which is either data + * QI'ed to a usable form, or unicode string. */ -function FlavourData(aData, aLength, aFlavour) +function FlavourData(aData, aLength, aFlavour) { this.supports = aData; this.contentLength = aLength; this.flavour = aFlavour || null; - + this._XferID = "FlavourData"; } @@ -249,21 +249,21 @@ FlavourData.prototype = { { if (this.flavour && this.flavour.dataIIDKey != "nsISupportsString") - return this.supports.QueryInterface(Components.interfaces[this.flavour.dataIIDKey]); + return this.supports.QueryInterface(Components.interfaces[this.flavour.dataIIDKey]); var supports = this.supports; if (supports instanceof Components.interfaces.nsISupportsString) return supports.data.substring(0, this.contentLength/2); - + return supports; } } -/** - * Create a TransferData object with a single FlavourData entry. Used when - * unwrapping data of a specific flavour from the drag service. +/** + * Create a TransferData object with a single FlavourData entry. Used when + * unwrapping data of a specific flavour from the drag service. */ -function FlavourToXfer(aData, aLength, aFlavour) +function FlavourToXfer(aData, aLength, aFlavour) { return new TransferData([new FlavourData(aData, aLength, aFlavour)]); } @@ -286,42 +286,42 @@ var transferUtils = { .QueryInterface(Components.interfaces.nsIFileProtocolHandler); return fileHandler.getURLSpecFromFile(aData); } - return null; + return null; } } /** * nsDragAndDrop - a convenience wrapper for nsTransferable, nsITransferable - * and nsIDragService/nsIDragSession. + * and nsIDragService/nsIDragSession. * * Use: map the handler functions to the 'ondraggesture', 'ondragover' and - * 'ondragdrop' event handlers on your XML element, e.g. - * - * - * You need to create an observer js object with the following member - * functions: - * Object onDragStart (event) // called when drag initiated, - * // returns flavour list with data - * // to stuff into transferable - * void onDragOver (Object flavour) // called when element is dragged - * // over, so that it can perform + * 'ondragdrop' event handlers on your XML element, e.g. + * + * + * You need to create an observer js object with the following member + * functions: + * Object onDragStart (event) // called when drag initiated, + * // returns flavour list with data + * // to stuff into transferable + * void onDragOver (Object flavour) // called when element is dragged + * // over, so that it can perform * // any drag-over feedback for provided - * // flavour - * void onDrop (Object data) // formatted data object dropped. - * Object getSupportedFlavours () // returns a flavour list so that + * // flavour + * void onDrop (Object data) // formatted data object dropped. + * Object getSupportedFlavours () // returns a flavour list so that * // nsTransferable can determine - * // whether or not to accept drop. - **/ + * // whether or not to accept drop. + **/ var nsDragAndDrop = { - + _mDS: null, get mDragService() { - if (!this._mDS) + if (!this._mDS) { const kDSContractID = "@mozilla.org/widget/dragservice;1"; const kDSIID = Components.interfaces.nsIDragService; @@ -340,7 +340,7 @@ var nsDragAndDrop = { * @param Object aDragDropObserver * javascript object of format described above that specifies * the way in which the element responds to drag events. - **/ + **/ startDrag: function (aEvent, aDragDropObserver) { if (!("onDragStart" in aDragDropObserver)) @@ -350,11 +350,11 @@ var nsDragAndDrop = { var dragAction = { action: kDSIID.DRAGDROP_ACTION_COPY + kDSIID.DRAGDROP_ACTION_MOVE + kDSIID.DRAGDROP_ACTION_LINK }; var transferData = { data: null }; - try + try { aDragDropObserver.onDragStart(aEvent, transferData, dragAction); } - catch (e) + catch (e) { return; // not a draggable item, bail! } @@ -365,10 +365,10 @@ var nsDragAndDrop = { var dt = aEvent.dataTransfer; var count = 0; do { - var tds = transferData._XferID == "TransferData" - ? transferData + var tds = transferData._XferID == "TransferData" + ? transferData : transferData.dataList[count] - for (var i = 0; i < tds.dataList.length; ++i) + for (var i = 0; i < tds.dataList.length; ++i) { var currData = tds.dataList[i]; var currFlavour = currData.flavour.contentType; @@ -380,7 +380,7 @@ var nsDragAndDrop = { count++; } - while (transferData._XferID == "TransferDataSet" && + while (transferData._XferID == "TransferDataSet" && count < transferData.dataList.length); dt.effectAllowed = "all"; @@ -391,7 +391,7 @@ var nsDragAndDrop = { aEvent.stopPropagation(); }, - /** + /** * void dragOver (DOMEvent aEvent, Object aDragDropObserver) ; * * called when a drag passes over this element @@ -403,8 +403,8 @@ var nsDragAndDrop = { * the way in which the element responds to drag events. **/ dragOver: function (aEvent, aDragDropObserver) - { - if (!("onDragOver" in aDragDropObserver)) + { + if (!("onDragOver" in aDragDropObserver)) return; if (!this.checkCanDrop(aEvent, aDragDropObserver)) return; @@ -413,8 +413,8 @@ var nsDragAndDrop = { { if (this.mDragSession.isDataFlavorSupported(flavour)) { - aDragDropObserver.onDragOver(aEvent, - flavourSet.flavourTable[flavour], + aDragDropObserver.onDragOver(aEvent, + flavourSet.flavourTable[flavour], this.mDragSession); aEvent.stopPropagation(); aEvent.preventDefault(); @@ -425,7 +425,7 @@ var nsDragAndDrop = { mDragSession: null, - /** + /** * void drop (DOMEvent aEvent, Object aDragDropObserver) ; * * called when the user drops on the element @@ -441,7 +441,7 @@ var nsDragAndDrop = { if (!("onDrop" in aDragDropObserver)) return; if (!this.checkCanDrop(aEvent, aDragDropObserver)) - return; + return; var flavourSet = aDragDropObserver.getSupportedFlavours(); @@ -478,7 +478,7 @@ var nsDragAndDrop = { aEvent.stopPropagation(); }, - /** + /** * void dragExit (DOMEvent aEvent, Object aDragDropObserver) ; * * called when a drag leaves this element @@ -495,9 +495,9 @@ var nsDragAndDrop = { return; if ("onDragExit" in aDragDropObserver) aDragDropObserver.onDragExit(aEvent, this.mDragSession); - }, - - /** + }, + + /** * void dragEnter (DOMEvent aEvent, Object aDragDropObserver) ; * * called when a drag enters in this element @@ -514,9 +514,9 @@ var nsDragAndDrop = { return; if ("onDragEnter" in aDragDropObserver) aDragDropObserver.onDragEnter(aEvent, this.mDragSession); - }, + }, - /** + /** * Boolean checkCanDrop (DOMEvent aEvent, Object aDragDropObserver) ; * * Sets the canDrop attribute for the drag session. @@ -530,9 +530,9 @@ var nsDragAndDrop = { **/ checkCanDrop: function (aEvent, aDragDropObserver) { - if (!this.mDragSession) + if (!this.mDragSession) this.mDragSession = this.mDragService.getCurrentSession(); - if (!this.mDragSession) + if (!this.mDragSession) return false; this.mDragSession.canDrop = this.mDragSession.sourceNode != aEvent.target; if ("canDrop" in aDragDropObserver) diff --git a/toolkit/content/tests/browser/browser_bug295977_autoscroll_overflow.js b/toolkit/content/tests/browser/browser_bug295977_autoscroll_overflow.js index ff54ef172039..e6a9e7f32eeb 100644 --- a/toolkit/content/tests/browser/browser_bug295977_autoscroll_overflow.js +++ b/toolkit/content/tests/browser/browser_bug295977_autoscroll_overflow.js @@ -97,7 +97,7 @@ add_task(function* () yield BrowserTestUtils.synthesizeMouse("#" + test.elem, 50, 80, { button: 1 }, gBrowser.selectedBrowser); - + // This ensures bug 605127 is fixed: pagehide in an unrelated document // should not cancel the autoscroll. yield ContentTask.spawn(gBrowser.selectedBrowser, { }, function* () { @@ -168,7 +168,7 @@ add_task(function* () msg += "Failed: "; } msg += 'Window for ' + args.elemid + ' should' + (args.scrollVert ? '' : ' not') + ' have scrolled vertically\n'; - + if (!((args.scrollHori && content.scrollX > 0) || (!args.scrollHori && content.scrollX == 0))) { msg += "Failed: "; diff --git a/toolkit/content/tests/browser/browser_bug982298.js b/toolkit/content/tests/browser/browser_bug982298.js index 243075169951..4889cbcac23c 100644 --- a/toolkit/content/tests/browser/browser_bug982298.js +++ b/toolkit/content/tests/browser/browser_bug982298.js @@ -19,7 +19,7 @@ function test() { waitForExplicitFinish(); - tab = gBrowser.addTab("data:text/html;base64," + + tab = gBrowser.addTab("data:text/html;base64," + btoa(scrollHtml)); browser = gBrowser.getBrowserForTab(tab); gBrowser.selectedTab = tab; diff --git a/toolkit/content/tests/browser/browser_f7_caret_browsing.js b/toolkit/content/tests/browser/browser_f7_caret_browsing.js index 054ac7fbc75b..0a05e30dbf20 100644 --- a/toolkit/content/tests/browser/browser_f7_caret_browsing.js +++ b/toolkit/content/tests/browser/browser_f7_caret_browsing.js @@ -265,7 +265,7 @@ add_task(function* toggleCheckboxWantCaretBrowsing() { syncToggleCaretNoDialog(false); syncToggleCaretNoDialog(true); syncToggleCaretNoDialog(false); - + Services.prefs.setBoolPref(kPrefShortcutEnabled, true); Services.prefs.setBoolPref(kPrefWarnOnEnable, true); Services.prefs.setBoolPref(kPrefCaretBrowsingOn, false); diff --git a/toolkit/content/tests/chrome/RegisterUnregisterChrome.js b/toolkit/content/tests/chrome/RegisterUnregisterChrome.js index 97732dae94ad..7b294a46ce4c 100644 --- a/toolkit/content/tests/chrome/RegisterUnregisterChrome.js +++ b/toolkit/content/tests/chrome/RegisterUnregisterChrome.js @@ -58,7 +58,7 @@ function copyDirToTempProfile(path, subdirname) { if (subdirname === undefined) { subdirname = "mochikit-tmp"; } - + let tmpdir = gDirSvc.get("ProfD", Ci.nsIFile); tmpdir.append(subdirname); tmpdir.createUnique(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0777); @@ -98,7 +98,7 @@ function chromeURIToFile(chromeURI) return convertChromeURI(chromeURI). QueryInterface(Ci.nsIFileURL).file; -} +} // Register a chrome manifest temporarily and return a function which un-does // the registrarion when no longer needed. @@ -154,7 +154,7 @@ function registerManifestTemporarily(manifestURI) function registerManifestPermanently(manifestURI) { var chromepath = chromeURIToFile(manifestURI); - + Components.manager.QueryInterface(Ci.nsIComponentRegistrar). autoRegister(chromepath); return chromepath; diff --git a/toolkit/content/tests/chrome/popup_trigger.js b/toolkit/content/tests/chrome/popup_trigger.js index c9c430e2c75c..c532a408333b 100644 --- a/toolkit/content/tests/chrome/popup_trigger.js +++ b/toolkit/content/tests/chrome/popup_trigger.js @@ -495,7 +495,7 @@ var popupTests = [ var childframe = document.getElementById("childframe"); if (childframe) { for (var t = 0; t < 2; t++) { - var child = childframe.contentDocument; + var child = childframe.contentDocument; var evt = child.createEvent("Event"); evt.initEvent("click", true, true); child.documentElement.dispatchEvent(evt); diff --git a/toolkit/content/tests/chrome/xul_selectcontrol.js b/toolkit/content/tests/chrome/xul_selectcontrol.js index 2751365c7285..d6518c15039e 100644 --- a/toolkit/content/tests/chrome/xul_selectcontrol.js +++ b/toolkit/content/tests/chrome/xul_selectcontrol.js @@ -283,7 +283,7 @@ function test_nsIDOMXULSelectControlElement_UI(element, testprefix) synthesizeMouseExpectEvent(seconditem, 2, 2, {}, element, "select", testid + "mouse select 2"); test_nsIDOMXULSelectControlElement_States(element, testid + "mouse select 2", 2, seconditem, 1, "second"); - + // make sure the element is focused so keyboard navigation will apply element.selectedIndex = 1; element.focus(); @@ -345,7 +345,7 @@ function test_nsIDOMXULSelectControlElement_UI(element, testprefix) // now test whether a disabled item works. element.selectedIndex = 0; seconditem.disabled = true; - + var dontSelectDisabled = (behaviourContains(element.localName, "dont-select-disabled")); // 'mouse select' - check if clicking an item selects it diff --git a/toolkit/content/tests/unit/test_contentAreaUtils.js b/toolkit/content/tests/unit/test_contentAreaUtils.js index 677f21989287..a9e54528e07b 100644 --- a/toolkit/content/tests/unit/test_contentAreaUtils.js +++ b/toolkit/content/tests/unit/test_contentAreaUtils.js @@ -44,7 +44,7 @@ function test_urlSecurityCheck() { urlSecurityCheck(CHROME_URI, nullPrincipal, DISALLOW_INHERIT_PRINCIPAL); } - catch(ex) { + catch(ex) { shouldThrow = false; } if (shouldThrow) diff --git a/toolkit/content/tests/widgets/popup_shared.js b/toolkit/content/tests/widgets/popup_shared.js index ec91d88ba47d..2b64f43a1498 100644 --- a/toolkit/content/tests/widgets/popup_shared.js +++ b/toolkit/content/tests/widgets/popup_shared.js @@ -186,7 +186,7 @@ function checkResult() document.getElementById(test.autohide).hidePopup(); return; } - + goNextStep(); } diff --git a/toolkit/content/tests/widgets/tree_shared.js b/toolkit/content/tests/widgets/tree_shared.js index c0869c91d8e2..7fbfd67e4fd0 100644 --- a/toolkit/content/tests/widgets/tree_shared.js +++ b/toolkit/content/tests/widgets/tree_shared.js @@ -43,7 +43,7 @@ function testtag_tree(treeid, treerowinfoid, seltype, columnstype, testid) is(tree.selType, seltype == "multiple" ? "" : seltype, testid + " seltype"); // note: the functions below should be in this order due to changes made in later tests - + // select the first column in cell selection mode so that the selection // functions can be tested if (seltype == "cell") @@ -74,8 +74,8 @@ function testtag_tree(treeid, treerowinfoid, seltype, columnstype, testid) var ecolumn = tree.columns[0]; ok(!tree.startEditing(1, ecolumn), "non-editable trees shouldn't start editing"); is(tree.editingRow, -1, testid + " failed startEditing shouldn't set editingRow"); - is(tree.editingColumn, null, testid + " failed startEditing shouldn't set editingColumn"); - + is(tree.editingColumn, null, testid + " failed startEditing shouldn't set editingColumn"); + tree.editable = true; ok(tree.startEditing(1, ecolumn), "startEditing should have returned true"); @@ -372,7 +372,7 @@ function testtag_tree_TreeSelection_UI(tree, testid, multiple) selection.select(3); synthesizeKeyExpectEvent("VK_DOWN", {}, tree, "!select", "key down with scroll"); is(tree.treeBoxObject.getFirstVisibleRow(), 1, testid + "key down with scroll"); - + // accel key and cursor movement adjust currentIndex but should not change // the selection. In single selection mode, the selection will not change, // but instead will just scroll up or down a line @@ -722,7 +722,7 @@ function testtag_tree_TreeSelection_UI_cell(tree, testid, rowInfo) } tree.focus(); - + // selection is set, so it should move when the left and right cursor keys are pressed tree.treeBoxObject.scrollToRow(0); selection.select(1); diff --git a/toolkit/content/widgets/button.xml b/toolkit/content/widgets/button.xml index 57f95216770d..01420ced7283 100644 --- a/toolkit/content/widgets/button.xml +++ b/toolkit/content/widgets/button.xml @@ -53,11 +53,11 @@ this.setAttribute("checked", "true"); else this.removeAttribute("checked"); - + return val; ]]> - + - + @@ -102,12 +102,12 @@ this.init(); - + binding must contain an element with anonid=\"button\""; - + var menubuttonParent = this; - btn.addEventListener("mouseover", function() { + btn.addEventListener("mouseover", function() { if (!this.disabled) menubuttonParent.buttonover = true; }, true); @@ -280,15 +280,15 @@ ]]> - + - + - + false @@ -361,7 +361,7 @@ - + @@ -371,5 +371,5 @@ - + diff --git a/toolkit/content/widgets/colorpicker.xml b/toolkit/content/widgets/colorpicker.xml index 121abe47341a..0babeb79f22c 100644 --- a/toolkit/content/widgets/colorpicker.xml +++ b/toolkit/content/widgets/colorpicker.xml @@ -13,7 +13,7 @@ - + @@ -106,7 +106,7 @@